openapi: "3.0.0" info: title: Autopilot API version: 2.0.0 description: API for managing Autopilot configuration and related operations. paths: ############################# # # Autopilot routes # ############################# /autopilot/config/evaluate: post: summary: Evaluate autopilot configuration description: Evaluates the provided autopilot configuration and returns some information about the hosts that would be considered usable using that configuration. If possible, it also returns a recommendation for a better configuration that would allow for forming contracts with more hosts. requestBody: content: application/json: schema: type: object properties: autopilotConfig: $ref: "#/components/schemas/AutopilotConfig" gougingSettings: $ref: "#/components/schemas/GougingSettings" redundancySettings: $ref: "#/components/schemas/RedundancySettings" responses: "400": description: Malformed request content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string "200": description: The evaluated autopilot configuration content: application/json: schema: type: object properties: hosts: type: integer format: uin64 description: Number of hosts available usable: type: integer format: uint64 description: Number of hosts that the autopilot could form contracts with using the provided config unusable: type: object properties: blocked: type: integer format: uint64 description: Number of hosts unavailable due to being blocklisted gouging: type: object properties: contract: type: integer format: uint64 description: Number of hosts that fail the contract gouging checks download: type: integer format: uint64 description: Number of hosts that fail the download gouging checks gouging: type: integer format: uint64 description: Number of hosts that fail the general gouging checks pruning: type: integer format: uint64 description: Number of hosts that fail the pruning gouging checks upload: type: integer format: uint64 description: Number of hosts that fail the upload gouging checks lowMaxDuration: type: integer format: uint64 description: Number of hosts that have a max contract duration that is too low notAcceptingContracts: type: integer format: uint64 description: Number of hosts that are not accepting contracts notScanned: type: integer format: uint64 description: Number of hosts that haven't been successfully scanned yet recommendation: $ref: "#/components/schemas/ConfigRecommendation" /autopilot/state: get: summary: Get the autopilot state description: Returns the current state of the autopilot, including migration, pruning, and scanning status. responses: "200": description: The current state of the autopilot content: application/json: schema: type: object allOf: - $ref: "#/components/schemas/BuildState" properties: enabled: type: boolean description: Whether the autopilot is enabled migrating: type: boolean description: Indicates if the autopilot is currently migrating migratingLastStart: type: string format: date-time description: When migration last started pruning: type: boolean description: Indicates if the autopilot is currently pruning pruningLastStart: type: string format: date-time description: When pruning last started scanning: type: boolean description: Indicates if the autopilot is currently scanning scanningLastStart: type: string format: date-time description: When scanning last started uptimeMs: type: integer format: int64 description: The autopilot uptime in milliseconds startTime: type: string format: date-time description: When the autopilot was started /autopilot/trigger: post: summary: Wake up autopilot description: Triggers the autopilot to start an iteration of contract maintenance and host scanning. requestBody: content: application/json: schema: type: object properties: forceScan: type: boolean description: If true, the autopilot force a new batch of host scans even if it recently scanned the hosts. default: false responses: "400": description: Malformed request content: text/plain: schema: type: string "200": description: Successfully attempted to trigger the autopilot content: application/json: schema: type: object properties: triggered: type: boolean description: Indicates whether the request triggered a new iteration of the maintenance loop. If maintenance was already ongoing, this will be false. ############################# # # Worker routes # ############################# /worker/account/{hostkey}: get: summary: Get a worker account description: Returns the account the worker maintains with the specified host for payment. parameters: - name: hostkey in: path required: true schema: $ref: "#/components/schemas/PublicKey" description: The host's public key responses: "200": description: Successfully retrieved worker account content: application/json: schema: $ref: "#/components/schemas/Account" /worker/accounts: get: summary: Get all worker accounts description: Returns all accounts the worker maintains with hosts for payment. responses: "200": description: Successfully retrieved worker accounts content: application/json: schema: type: array items: $ref: "#/components/schemas/Account" /worker/{id}/resetdrift: post: summary: Reset drift for a worker's account description: Resets the drift for the specified account to 0. parameters: - name: id in: path required: true schema: allOf: - $ref: "#/components/schemas/PublicKey" - description: The account's ID responses: "200": description: Successfully reset drift for worker account content: application/json: schema: $ref: "#/components/schemas/Account" /worker/memory: get: summary: Get overview of worker's memory usage. description: Returns the memory usage of the worker for both uploads and downloads. responses: "200": description: Successfully retrieved memory usage content: application/json: schema: type: object properties: download: allOf: - $ref: "#/components/schemas/MemoryStatus" - description: The memory status for for downloads upload: allOf: - $ref: "#/components/schemas/MemoryStatus" - description: The memory status for for uploads /worker/multipart/{key}: put: summary: Upload a part of an ongoing multipart upload description: Upload a single part of an ongoing multipart upload. Parts can be uploaded in parallel and then combined afterwards. parameters: - name: key description: The key of the file to upload in: path required: true schema: type: string example: "myDir/myFile" minLength: 1 - name: bucket description: The name of the bucket the multipart upload belongs to example: "myBucket" in: query required: true schema: $ref: "#/components/schemas/BucketName" - name: uploadid description: The ID of the ongoing multipart upload in: query required: true schema: allOf: - $ref: "#/components/schemas/MultipartUploadID" - example: 7aaac83c6d553865755286c326e852a68300bebf7feea1b435d61bd3610bf82b - name: partnumber description: The part number of the part being uploaded example: 0 in: query required: true schema: type: integer format: uint32 - name: minshards description: Used to override the minimum number of shards the part should be split into. example: 10 in: query required: false schema: type: integer format: uint32 - name: totalshards description: Used to override the total number of shards the part should be split into. example: 30 in: query required: false schema: type: integer format: uint32 - name: encryptionoffset description: The offset of the part within the final object. This is required unless the upload was explicitly created to not be encrypted before erasure coding. example: 0 in: query required: false schema: type: integer format: uint64 requestBody: content: application/octet-stream: schema: type: string format: binary responses: "200": description: Successfully uploaded part headers: ETag: description: The ETag of the uploaded part schema: $ref: "#/components/schemas/ETag" "400": description: Invalid combination of request parameters content: text/plain: schema: type: string "404": description: Bucket or upload weren't found content: text/plain: schema: type: string "503": description: Consensus isn't synced content: text/plain: schema: type: string /worker/object/{key}: get: summary: Download an object description: Downloads an object from the Sia network. parameters: - name: key description: The key of the file to download in: path required: true schema: type: string example: "myDir/myFile" minLength: 1 - name: bucket description: The name of the bucket the object belongs to example: "myBucket" in: query required: true schema: $ref: "#/components/schemas/BucketName" - name: Range in: header description: The range of bytes to download. If not provided, the entire object will be downloaded. schema: type: string example: "bytes=0-100" responses: "200": description: Successfully downloaded object content: application/octet-stream: schema: type: string format: binary headers: "Accept-Ranges": description: The range units the server supports schema: type: string "Content-Range": description: The range of bytes that were downloaded schema: type: string "Content-Type": description: The content type of the object schema: type: string "ETag": description: The ETag of the downloaded object schema: $ref: "#/components/schemas/ETag" "400": description: Invalid range or missing parameters content: text/plain: schema: type: string example: invalid range "404": description: Object not found content: text/plain: schema: type: string example: object not found "416": description: No overlap between 'Range' and object's content content: text/plain: schema: type: string example: "invalid range: failed to overlap" "500": description: Internal server error content: text/plain: schema: type: string example: "failed to fetch object metadata" put: summary: Upload an object description: Uploads an object to the Sia network. parameters: - name: key description: The key of the file to upload in: path required: true schema: type: string example: "myDir/myFile" minLength: 1 - name: bucket description: The name of the bucket the object belongs to example: "myBucket" in: query required: true schema: $ref: "#/components/schemas/BucketName" - name: minshards description: Used to override the minimum number of shards the object should be split into. example: 10 in: query required: false schema: type: integer format: uint32 - name: totalshards description: Used to override the total number of shards the object should be split into. example: 30 in: query required: false schema: type: integer format: uint32 - name: mimetype description: The MIME type of the object example: "text/plain" in: query required: false schema: type: string requestBody: content: application/octet-stream: schema: type: string format: binary responses: "200": description: Successfully uploaded object headers: ETag: description: The ETag of the uploaded object schema: $ref: "#/components/schemas/ETag" "400": description: Invalid combination of request parameters content: text/plain: schema: type: string "404": description: Bucket not found content: text/plain: schema: type: string "503": description: Consensus isn't synced content: text/plain: schema: type: string delete: summary: Deletes an object description: Deletes an object from the local database. The object is not removed from the network immediately. Instead, the autopilot prunes data from the network periodically. parameters: - name: key description: The key of the file to delete in: path required: true schema: type: string example: "myDir/myFile" minLength: 1 - name: bucket description: The name of the bucket the object belongs to example: "myBucket" in: query required: true schema: $ref: "#/components/schemas/BucketName" responses: "200": description: Successfully deleted object "404": description: Object not found content: text/plain: schema: type: string /worker/objects/remove: post: summary: Delete a batch of objects with a given prefix description: Deletes all objects with the provided prefix from the local database. The objects are not removed from the network immediately. Instead, the autopilot prunes data from the network periodically. requestBody: content: application/json: schema: type: object properties: bucket: allOf: - $ref: "#/components/schemas/BucketName" - description: The name of the bucket the objects belong to prefix: type: string example: "myDir/" minLength: 1 description: The prefix of the objects to delete responses: "200": description: Successfully removed objects "400": description: Missing prefix or bucket content: text/plain: schema: type: string "404": description: Object not found content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string /worker/state: get: summary: Get the worker's state. description: Returns general information about the work. responses: "200": description: Successfully retrieved worker state content: application/json: schema: type: object allOf: - $ref: "#/components/schemas/BuildState" properties: id: type: string description: The worker's ID startTime: type: string format: date-time description: When the worker was started /worker/stats/downloads: get: summary: Get download stats description: Returns the download stats of the worker. responses: "200": description: Successfully retrieved download stats content: application/json: schema: type: object properties: avgDownloadSpeedMbps: type: number format: float description: The average download speed in Mbps avgOverdrivePct: type: number format: float description: The average overdrive percentage healthyDownloaders: type: integer format: uint64 description: The number of healthy downloaders numDownloaders: type: integer format: uint64 description: The number of total downloaders downloadersStats: type: array items: type: object properties: avgSectorDownloadSpeedMbps: type: number format: float description: The average sector download speed in Mbps hostKey: allOf: - $ref: "#/components/schemas/PublicKey" - description: The host's public key /worker/stats/uploads: get: summary: Get upload stats description: Returns the upload stats of the worker. responses: "200": description: Successfully retrieved upload stats content: application/json: schema: type: object properties: avgUploadSpeedMbps: type: number format: float description: The average upload speed in Mbps avgOverdrivePct: type: number format: float description: The average overdrive percentage healthyUploaders: type: integer format: uint64 description: The number of healthy uploaders numUploaders: type: integer format: uint64 description: The number of total uploaders uploadersStats: type: array items: type: object properties: avgSectorUploadSpeedMbps: type: number format: float description: The average sector upload speed in Mbps hostKey: allOf: - $ref: "#/components/schemas/PublicKey" - description: The host's public key ############################# # # Bus routes # ############################# /bus/accounts: get: summary: Get all ephemeral accounts description: Returns all known ephemeral accounts. responses: "200": description: Successfully retrieved ephemeral accounts content: application/json: schema: type: array items: $ref: "#/components/schemas/Account" post: summary: Save accounts description: Saves the provided accounts to the database. requestBody: content: application/json: schema: type: object properties: accounts: type: array items: $ref: "#/components/schemas/Account" responses: "200": description: Successfully saved accounts "400": description: Malformed request content: text/plain: schema: type: string examples: missingOwnerField: summary: Missing owner field example value: "account is missing a valid 'owner' field" "500": description: Internal server error content: text/plain: schema: type: string /bus/accounts/fund: post: summary: Fund account description: Funds the specified account with the provided amount. requestBody: content: application/json: schema: type: object properties: accountID: allOf: - $ref: "#/components/schemas/PublicKey" - description: The ID of the account to fund. amount: allOf: - $ref: "#/components/schemas/Currency" - description: The amount to fund the account with. contractID: allOf: - $ref: "#/components/schemas/FileContractID" - description: The ID of the contract to fund the account with. responses: "200": description: Successfully funded account content: application/json: schema: type: object properties: deposit: allOf: - $ref: "#/components/schemas/Currency" - description: The amount that was deposited into the account "400": description: Malformed request content: text/plain: schema: type: string "404": description: Contract not found content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string /bus/alerts: get: summary: Get all alerts description: Returns all currently registered alerts. parameters: - name: limit in: query description: The maximum number of alerts to return schema: type: integer minimum: -1 default: -1 - name: offset in: query description: The number of alerts to skip schema: type: integer minimum: 0 default: 0 responses: "200": description: Successfully retrieved alerts content: application/json: schema: type: object properties: alerts: type: array items: $ref: "#/components/schemas/Alert" hasMore: type: boolean description: Whether there are more alerts to fetch totals: type: object properties: info: type: integer format: uint64 description: The number of info alerts warning: type: integer format: uint64 description: The number of warning alerts error: type: integer format: uint64 description: The number of error alerts critical: type: integer format: uint64 description: The number of critical alerts "400": description: Malformed request content: text/plain: schema: type: string examples: invalidLimit: summary: Invalid limit example value: "limit must be greater than or equal to -1" invalidOffset: summary: Invalid offset example value: "offset must be greater than or equal to 0" "500": description: Internal server error content: text/plain: schema: type: string /bus/alerts/dismiss: post: summary: Dismiss alerts description: Dismisses the specified alerts. requestBody: content: application/json: schema: type: array items: $ref: "#/components/schemas/Hash256" responses: "200": description: Successfully dismissed alerts "500": description: Internal server error content: text/plain: schema: type: string /bus/alerts/register: post: summary: Register an alert description: Registers a new alert. requestBody: content: application/json: schema: type: object properties: severity: $ref: "#/components/schemas/Alert" responses: "200": description: Successfully registered alert "500": description: Internal server error content: text/plain: schema: type: string /bus/autopilot: get: summary: Get autopilot configuration description: Returns the current autopilot configuration. responses: "200": description: Successfully retrieved autopilot configuration content: application/json: schema: $ref: "#/components/schemas/AutopilotConfig" "500": description: Internal server error content: text/plain: schema: type: string put: summary: Update autopilot configuration description: Updates the autopilot configuration. requestBody: content: application/json: schema: type: object properties: enabled: type: boolean description: Whether the autopilot is enabled contracts: $ref: "#/components/schemas/ContractsConfig" hosts: $ref: "#/components/schemas/HostsConfig" responses: "200": description: Successfully updated autopilot configuration "400": description: Malformed request content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string /bus/buckets: get: summary: Get all buckets description: Returns all known buckets. responses: "200": description: Successfully retrieved buckets content: application/json: schema: type: array items: $ref: "#/components/schemas/Bucket" "500": description: Internal server error content: text/plain: schema: type: string post: summary: Create bucket description: Create a new bucket. requestBody: content: application/json: schema: type: object properties: name: $ref: "#/components/schemas/BucketName" policy: type: object properties: publicReadAccess: type: boolean description: Whether the bucket is publicly readable responses: "200": description: Successfully saved buckets "400": description: Malformed request content: text/plain: schema: type: string examples: invalidBucketName: summary: Invalid bucket name example value: "bucket name must match pattern '^(?!(^xn--|.+-s3alias$))^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$'" bucketAlreadyExists: summary: Bucket already exists example value: "bucket already exists" "500": description: Internal server error content: text/plain: schema: type: string /bus/bucket/{name}/policy: put: summary: Update bucket policy description: Updates the policy of the specified bucket. parameters: - name: name in: path required: true schema: $ref: "#/components/schemas/BucketName" description: The name of the bucket requestBody: content: application/json: schema: type: object properties: policy: type: object properties: publicReadAccess: type: boolean description: Whether the bucket is publicly readable responses: "200": description: Successfully updated bucket policy "400": description: Malformed request content: text/plain: schema: type: string examples: noBucketName: summary: No bucket name provided value: "bucket name is required" "404": description: Bucket not found content: text/plain: schema: type: string /bus/bucket/{name}: get: summary: Get bucket description: Returns the specified bucket. parameters: - name: name in: path required: true schema: $ref: "#/components/schemas/BucketName" description: The name of the bucket responses: "200": description: Successfully retrieved bucket content: application/json: schema: $ref: "#/components/schemas/BucketName" "404": description: Bucket not found content: text/plain: schema: type: string delete: summary: Delete bucket description: Deletes the specified bucket. parameters: - name: name in: path required: true schema: $ref: "#/components/schemas/BucketName" description: The name of the bucket responses: "200": description: Successfully deleted bucket "400": description: Malformed request content: text/plain: schema: type: string examples: noBucketName: summary: No bucket name provided value: "bucket name is required" "404": description: Bucket not found content: text/plain: schema: type: string "409": description: Bucket not empty content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string /bus/consensus/acceptblock: post: summary: Accept block description: Accepts a block from the consensus set. requestBody: content: application/json: schema: $ref: "#/components/schemas/Block" responses: "200": description: Successfully accepted block "500": description: Internal server error content: text/plain: schema: type: string /bus/consensus/network: get: summary: Get network details description: Returns various details about the network. responses: "200": description: Successfully retrieved network content: application/json: schema: $ref: "#/components/schemas/Network" /bus/consensus/siafundfee/{payout}: get: summary: Get siafund fee description: Returns the siafund fee for the specified payout. parameters: - name: payout in: path required: true description: The payout to calculate the fee for schema: $ref: "#/components/schemas/Currency" responses: "200": description: Successfully retrieved siafund fee content: application/json: schema: $ref: "#/components/schemas/Currency" "500": description: Internal server error content: text/plain: schema: type: string /bus/consensus/state: get: summary: Get consensus state description: Returns the current consensus state. responses: "200": description: Successfully retrieved consensus state content: application/json: schema: $ref: "#/components/schemas/ConsensusState" /bus/contracts: get: summary: Get all contracts parameters: - name: filtermode in: query schema: type: string enum: [active, archived, all, good] default: active responses: "200": description: List of contracts content: application/json: schema: type: array items: $ref: "#/components/schemas/ContractMetadata" "400": description: Malformed request content: text/plain: schema: type: string examples: invalidFilterMode: summary: Invalid filter mode example value: "invalid filter mode 'bad', must be one of [active, archived, all, good]" "500": description: Internal server error content: text/plain: schema: type: string put: summary: Add a contract requestBody: content: application/json: schema: $ref: "#/components/schemas/ContractMetadata" responses: "200": description: Successfully updated contract "500": description: Internal server error /contracts/all: delete: summary: Archives all contracts responses: "200": description: All contracts where archived successfully "500": description: Internal server error content: text/plain: schema: type: string /contracts/archive: post: summary: Archive contracts requestBody: content: application/json: schema: type: object description: A mapping of file contract IDs to archive reasons. additionalProperties: $ref: "#/components/schemas/FileContractID" example: "fcid:fd887808d78b3c8c6c04d1bbc14a0f6ebc2f546514e3a4b79102e31da712423c": "custom reason" "fcid:82ffce83b89817e876194a07f1b4442052e2bb4932ca80a6a51753d86da3d840": "custom reason" responses: "200": description: Contracts archived successfully "500": description: Internal server error content: text/plain: schema: type: string /contracts/form: post: summary: Form a new contract requestBody: content: application/json: schema: type: object description: The request body for the POST /contracts endpoint. properties: endHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height at which the contract will end. hostCollateral: allOf: - $ref: "#/components/schemas/Currency" - description: The amount of collateral the host is committing. hostKey: allOf: - $ref: "#/components/schemas/PublicKey" - description: The public key of the host. renterFunds: allOf: - $ref: "#/components/schemas/Currency" - description: The funds the renter is committing. renterAddress: allOf: - $ref: "#/components/schemas/Address" - description: The renter's address responses: "200": description: Contract formed successfully content: application/json: schema: $ref: "#/components/schemas/ContractMetadata" "400": description: Invalid request parameters content: text/plain: schema: type: string examples: invalidEndHeight: summary: No end height provided value: "EndHeight can not be zero" invalidHostKey: summary: No host key provided value: "HostKey must be provided" invalidHostCollateral: summary: No host collateral provided value: "HostCollateral can not be zero" invalidRenterFunds: summary: No renter funds provided value: "RenterFunds can not be zero" invalidRenterAddress: summary: No renter address provided value: "RenterAddress must be provided" "404": description: Host not found "500": description: Internal server error content: text/plain: schema: type: string /contracts/prunable: get: summary: Get prunable contract data responses: "200": description: Prunable contract data content: application/json: schema: type: object description: The response containing prunable contract data and summary statistics. properties: contracts: type: array description: A list of prunable contracts with their size information. items: $ref: "#/components/schemas/ContractSize" totalPrunable: type: integer format: uint64 description: The total prunable size across all contracts in bytes totalSize: type: integer format: uint64 description: The total size of all contracts in bytes /contracts/renewed/{id}: get: summary: Get renewed contract parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" responses: "200": description: Renewed contract metadata content: application/json: schema: $ref: "#/components/schemas/ContractMetadata" "500": description: Internal server error content: text/plain: schema: type: string /contracts/spending: post: summary: Record contract spending requestBody: content: application/json: schema: type: array items: type: object properties: deletions: allOf: - $ref: "#/components/schemas/Currency" - description: Total amount spent on sector deletions fundAccount: allOf: - $ref: "#/components/schemas/Currency" - description: Total amount spent on funding ephemeral accounts sectorRoots: allOf: - $ref: "#/components/schemas/Currency" - description: Total amount spent on listing sector roots uploads: allOf: - $ref: "#/components/schemas/Currency" - description: Total amount spent on storing sectors contractID: $ref: "#/components/schemas/FileContractID" revisionNumber: $ref: "#/components/schemas/RevisionNumber" size: type: integer format: uint64 description: The size of the contract in bytes missedHostPayout: allOf: - $ref: "#/components/schemas/Currency" - description: The amount of siacoins that the host will receive if the contract resolves missed validRenterPayout: allOf: - $ref: "#/components/schemas/Currency" - description: The amount of siacoins that the renter will receive if the contract resolves valid. responses: "200": description: Spending recorded successfully "500": description: Internal server error content: text/plain: schema: type: string /contract/{id}: get: summary: Get contract by ID parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" responses: "200": description: Contract metadata content: application/json: schema: $ref: "#/components/schemas/ContractMetadata" "500": description: Internal server error content: text/plain: schema: type: string delete: summary: Archive contract with archival reason 'removed' parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" responses: "200": description: Contract archived successfully "500": description: Internal server error content: text/plain: schema: type: string /contract/{id}/acquire: post: summary: Acquire contract lock parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" requestBody: content: application/json: schema: type: object properties: duration: allOf: - $ref: "#/components/schemas/DurationMS" - description: The duration of the lock in milliseconds priority: type: integer format: int example: 80 responses: "200": description: Contract lock acquired content: application/json: schema: $ref: "#/components/schemas/ContractLockID" /contract/{id}/ancestors: get: summary: Get contract ancestors parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" - name: minstartheight in: query required: true schema: type: integer format: uint64 responses: "200": description: Contract ancestors content: application/json: schema: type: array items: $ref: "#/components/schemas/ContractMetadata" "500": description: Internal server error content: text/plain: schema: type: string /contract/{id}/broadcast: post: summary: Broadcast contract's revision parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" responses: "200": description: Contract's revision broadcasted successfully "500": description: Internal server error content: text/plain: schema: type: string /contract/{id}/keepalive: post: summary: Keep contract lock alive parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" requestBody: content: application/json: schema: type: object properties: duration: allOf: - $ref: "#/components/schemas/DurationMS" - description: The amount of miliseconds to extend the lock by lockID: $ref: "#/components/schemas/ContractLockID" responses: "200": description: Contract lock keepalive successful "500": description: Internal server error content: text/plain: schema: type: string /contract/{id}/revision: get: summary: Get latest contract revision parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" responses: "200": description: Latest contract revision content: application/json: schema: $ref: "#/components/schemas/Revision" "400": description: Contract not found content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string /contract/{id}/prune: post: summary: Prune contract data parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" requestBody: content: application/json: schema: type: object properties: timeout: $ref: "#/components/schemas/DurationMS" responses: "200": description: Contract pruned successfully content: application/json: schema: type: object properties: size: type: integer format: uint64 description: The size of the pruned contract in bytes pruned: type: integer format: uint64 description: The number of bytes pruned remaining: type: integer format: uint64 description: The number of prunable bytes remaining error: type: string description: An error message if the prune failed "500": description: Internal server error content: text/plain: schema: type: string /contract/{id}/renew: post: summary: Renew contract parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" requestBody: content: application/json: schema: type: object properties: endHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height at which the contract will expire expectedNewStorage: type: integer format: uint64 minNewCollateral: $ref: "#/components/schemas/Currency" renterFunds: $ref: "#/components/schemas/Currency" responses: "200": description: Contract renewed successfully content: application/json: schema: $ref: "#/components/schemas/ContractMetadata" /contract/{id}/release: post: summary: Release contract lock parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" requestBody: content: application/json: schema: type: object properties: lockID: $ref: "#/components/schemas/ContractLockID" responses: "200": description: Contract lock released successfully "500": description: Internal server error content: text/plain: schema: type: string /contract/{id}/roots: get: summary: Get contract sector roots parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" responses: "200": description: Contract sector roots content: application/json: schema: type: array items: $ref: "#/components/schemas/Hash256" /contract/{id}/size: get: summary: Get contract size parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" responses: "200": description: Contract size information content: application/json: schema: $ref: "#/components/schemas/ContractSize" "400": description: Contract not found content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string /contract/{id}/usability: put: summary: Update contract usability parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/FileContractID" requestBody: content: application/json: schema: type: string enum: [good, bad] responses: "200": description: Contract usability updated successfully "400": description: Malformed request content: text/plain: schema: type: string "404": description: Contract not found content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string /bus/syncer/address: get: summary: Get the syncer's address description: Returns the address of the syncer. responses: "200": description: Successfully retrieved syncer address content: application/json: schema: $ref: "#/components/schemas/SyncerAddress" /bus/syncer/connect: post: summary: Connect to a syncer description: Connects to the specified syncer. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/SyncerAddress" - description: The address of the syncer to connect to responses: "200": description: Successfully connected to syncer "500": description: Internal server error content: text/plain: schema: type: string /bus/syncer/peers: get: summary: Get syncer peers description: Returns the syncer's peers. responses: "200": description: Successfully retrieved syncer peers content: application/json: schema: type: array items: $ref: "#/components/schemas/SyncerAddress" /bus/txpool/recommendedfee: get: summary: Get recommended fee description: Returns the recommended fee for a transaction. responses: "200": description: Successfully retrieved recommended fee content: application/json: schema: $ref: "#/components/schemas/Currency" "500": description: Internal server error content: text/plain: schema: type: string /bus/txpool/transactions: get: summary: Get all transactions description: Returns all transactions in the transaction pool. responses: "200": description: Successfully retrieved transactions content: application/json: schema: type: array items: $ref: "#/components/schemas/Transaction" "500": description: Internal server error content: text/plain: schema: type: string /bus/txpool/broadcast: post: summary: Broadcast transaction description: Broadcasts the specified transaction. requestBody: content: application/json: schema: $ref: "#/components/schemas/Transaction" responses: "200": description: Successfully broadcast transaction "500": description: Internal server error content: text/plain: schema: type: string /bus/wallet: get: summary: Get wallet information description: Returns information about the wallet. responses: "200": description: Successfully retrieved wallet content: application/json: schema: type: object properties: spendable: allOf: - $ref: "#/components/schemas/Currency" - description: The amount of spendable siacoins in the wallet confirmed: allOf: - $ref: "#/components/schemas/Currency" - description: The amount of siacoins that have been confirmed in a block unconfirmed: allOf: - $ref: "#/components/schemas/Currency" - description: The amount of siacoins that have not been confirmed in a block immature: allOf: - $ref: "#/components/schemas/Currency" - description: The amount of siacoins that have yet to mature address: allOf: - $ref: "#/components/schemas/Address" - description: The wallet's address scanHeight: type: integer format: uint64 description: The height up until which the wallet is synced "500": description: Internal server error content: text/plain: schema: type: string /bus/wallet/events: get: summary: Get wallet events description: Returns all events related to the wallet. parameters: - name: limit in: query description: The maximum number of events to return schema: type: integer minimum: -1 default: -1 - name: offset in: query description: The number of events to skip schema: type: integer minimum: 0 default: 0 responses: "200": description: Successfully retrieved wallet events content: application/json: schema: type: array items: $ref: "#/components/schemas/Event" "400": description: Malformed request content: text/plain: schema: type: string examples: invalidLimit: summary: Invalid limit example value: "limit must be greater than or equal to -1" invalidOffset: summary: Invalid offset example value: "offset must be greater than or equal to 0" "500": description: Internal server error content: text/plain: schema: type: string /bus/wallet/pending: get: summary: Get unconfirmed events description: Returns all unconfirmed events in the wallet. responses: "200": description: Successfully retrieved pending events content: application/json: schema: type: array items: $ref: "#/components/schemas/Event" "500": description: Internal server error content: text/plain: schema: type: string /bus/wallet/redistribute: post: summary: Redistribute wallet funds description: Redistributes the wallet's funds into desired number of outputs of requested value. requestBody: content: application/json: schema: type: object properties: outputs: type: integer format: uint64 description: The number of outputs to redistribute the wallet's funds into amount: allOf: - $ref: "#/components/schemas/Currency" - description: The value of each output responses: "200": description: Successfully redistributed wallet funds content: application/json: schema: type: array items: $ref: "#/components/schemas/TransactionID" "400": description: Malformed request content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string /bus/wallet/send: post: summary: Send siacoins description: Sends the specified amount of siacoins to the specified address. requestBody: content: application/json: schema: type: object properties: address: allOf: - $ref: "#/components/schemas/Address" - description: The address to send the siacoins to amount: allOf: - $ref: "#/components/schemas/Currency" - description: The amount of siacoins to send subtractMinerFee: type: boolean description: Whether to subtract the miner fee from the amount useUnconfirmed: type: boolean description: Whether to use unconfirmed outputs responses: "200": description: Successfully sent siacoins content: application/json: schema: allOf: - $ref: "#/components/schemas/TransactionID" - description: The ID of the transaction "400": description: Malformed request content: text/plain: schema: type: string "500": description: Internal server error content: text/plain: schema: type: string components: schemas: ############################# # # Core types # ############################# Account: type: object properties: id: allOf: - $ref: "#/components/schemas/PublicKey" - description: The account's ID cleanShutdown: type: boolean description: Whether the account has been cleanly shutdown. If not, the account will require a sync with the host. hostKey: allOf: - $ref: "#/components/schemas/PublicKey" - description: The host's public key balance: allOf: - $ref: "#/components/schemas/Currency" - description: The account's balance as expected by the worker drift: allOf: - $ref: "#/components/schemas/SignedCurrency" - description: The accumulated drift between the worker's expected balance and the host's actual balance. Used to track if a host is trying to cheat the renter over time. owner: type: string description: The owner of the account that manages it. This is the id of the worker that maintains the account. minLength: 1 requiresSync: type: boolean description: Whether the account requires a sync with the host. This is usually the case when the host reports insufficient balance for an account that the worker still believes to be funded. Address: allOf: - $ref: "#/components/schemas/Hash256" - description: The hash of a set of UnlockConditions Alert: type: object properties: id: allOf: - $ref: "#/components/schemas/Hash256" - description: The alert's ID severity: type: string enum: - info - warning - error - critical description: The severity of the alert message: type: string description: The alert's message date: type: object description: Arbitrary data providing additional context for the alert timestamp: type: string format: date-time description: The time the alert was created Attestation: type: object properties: publicKey: $ref: "#/components/schemas/PublicKey" key: type: string value: type: string format: byte signature: $ref: "#/components/schemas/Signature" Block: type: object properties: parentID: allOf: - $ref: "#/components/schemas/BlockID" - description: The ID of the parent block nonce: type: integer format: uint64 description: The nonce used to mine the block timestamp: type: string format: date-time description: The time the block was mined minerPayouts: type: array items: $ref: "#/components/schemas/SiacoinOutput" transactions: type: array items: $ref: "#/components/schemas/Transaction" v2: $ref: "#/components/schemas/V2BlockData" BlockID: allOf: - $ref: "#/components/schemas/Hash256" - description: A unique identifier for a block ChainIndex: type: object properties: height: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height of the block in the blockchain id: allOf: - $ref: "#/components/schemas/BlockID" - description: The ID of the block ContractMetadata: type: object properties: id: allOf: - $ref: "#/components/schemas/FileContractID" - description: The unique identifier for the file contract. hostKey: allOf: - $ref: "#/components/schemas/PublicKey" - description: The public key of the host. v2: type: boolean description: Indicates if the contract is a V2 contract. proofHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height at which the storage proof needs to be submitted renewedFrom: allOf: - $ref: "#/components/schemas/FileContractID" - description: The ID of the contract this one was renewed from revisionHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height of the latest revision revisionNumber: allOf: - $ref: "#/components/schemas/RevisionNumber" - description: The current revision number of the contract size: type: integer format: uint64 description: The size of the contract in bytes startHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height at which the contract created state: type: string description: The state of the contract enum: - pending - active - complete - failed usability: type: string description: The usability status of the contract enum: - good - bad windowStart: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height when the contract's proof window starts. windowEnd: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height when the contract's proof window ends. contractPrice: allOf: - $ref: "#/components/schemas/Currency" - description: The price of forming the contract. initialRenterFunds: allOf: - $ref: "#/components/schemas/Currency" - description: The initial funds provided by the renter. spending: allOf: - $ref: "#/components/schemas/ContractSpending" - description: Costs and spending details of the contract. archivalReason: type: string description: The reason for archiving the contract, if applicable. enum: - renewed - removed - hostpruned renewedTo: allOf: - $ref: "#/components/schemas/FileContractID" - description: The ID of the contract this one was renewed to, if applicable. ContractSpending: type: object properties: deletions: allOf: - $ref: "#/components/schemas/Currency" - description: Total amount spent on sector deletions fundAccount: allOf: - $ref: "#/components/schemas/Currency" - description: Total amount spent on funding ephemeral accounts sectorRoots: allOf: - $ref: "#/components/schemas/Currency" - description: Total amount spent on listing sector roots uploads: allOf: - $ref: "#/components/schemas/Currency" - description: Total amount spent on storing sectors CoveredFields: type: object properties: wholeTransaction: type: boolean description: Whether the whole transaction is covered by the signature siacoinInputs: type: array items: type: integer format: uint64 siacoinOutputs: type: array items: type: integer format: uint64 fileContracts: type: array items: type: integer format: uint64 fileContractRevisions: type: array items: type: integer format: uint64 storageProofs: type: array items: type: integer format: uint64 siafundInputs: type: array items: type: integer format: uint64 siafundOutputs: type: array items: type: integer format: uint64 minerFees: type: array items: type: integer format: uint64 arbitraryData: type: array items: type: integer format: uint64 signatures: type: array items: type: integer format: uint64 Currency: type: string pattern: "^\\d+$" maxLength: 39 # fits 2^128 - 1 description: An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H). FileContract: type: object description: A storage agreement between a renter and a host. properties: filesize: type: integer format: uint64 description: The size of the contract in bytes. fileMerkleRoot: allOf: - $ref: "#/components/schemas/Hash256" - description: The Merkle root of the contract's data. windowStart: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height when the contract's proof window starts. windowEnd: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height when the contract's proof window ends. payout: allOf: - $ref: "#/components/schemas/Currency" - description: The total payout for the contract. validProofOutputs: type: array description: List of outputs created if the contract is successfully fulfilled. items: $ref: "#/components/schemas/SiacoinOutput" missedProofOutputs: type: array description: List of outputs created if the contract is not fulfilled. items: $ref: "#/components/schemas/SiacoinOutput" unlockHash: $ref: "#/components/schemas/Address" revisionNumber: $ref: "#/components/schemas/RevisionNumber" FileContractID: type: string pattern: "^fcid:[0-9a-fA-F]{64}$" description: A unique identifier for a file contract FileContractRevision: type: object description: Represents a revision to an existing file contract. properties: parentID: allOf: - $ref: "#/components/schemas/FileContractID" - description: The ID of the parent file contract being revised. unlockConditions: allOf: - $ref: "#/components/schemas/UnlockConditions" - description: The conditions required to unlock the contract for revision. filesize: type: integer format: uint64 description: The size of the file in bytes after the revision. fileMerkleRoot: allOf: - $ref: "#/components/schemas/Hash256" - description: The updated Merkle root of the file's data. windowStart: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height when the revised proof window starts. windowEnd: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height when the revised proof window ends. validProofOutputs: type: array description: Updated outputs if the revised contract is successfully fulfilled. items: $ref: "#/components/schemas/SiacoinOutput" missedProofOutputs: type: array description: Updated outputs if the revised contract is not fulfilled. items: $ref: "#/components/schemas/SiacoinOutput" unlockHash: allOf: - $ref: "#/components/schemas/Address" - description: The updated hash of the conditions required to unlock the contract funds. revisionNumber: $ref: "#/components/schemas/RevisionNumber" Hash256: type: string pattern: ^[0-9a-fA-F]{64}$ description: A 256-bit blake2b hash PublicKey: type: string pattern: "^ed25519:[0-9a-fA-F]{64}$" description: A ed25519 public key SatisfiedPolicy: type: object properties: policy: type: object signature: type: array items: $ref: "#/components/schemas/Signature" preimages: type: array items: type: string format: byte SiacoinElement: type: object properties: id: allOf: - $ref: "#/components/schemas/SiacoinOutputID" - description: The ID of the element stateElement: allOf: - $ref: "#/components/schemas/StateElement" - description: The state of the element siafundOutput: allOf: - $ref: "#/components/schemas/SiacoinOutput" - description: The output of the element maturityHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height when the output matures SiacoinInput: type: object properties: parentID: allOf: - $ref: "#/components/schemas/SiacoinOutputID" - description: The ID of the output being spent unlockConditions: allOf: - $ref: "#/components/schemas/UnlockConditions" - description: The unlock conditions required to spend the output SiacoinOutput: type: object properties: value: allOf: - $ref: "#/components/schemas/Currency" - description: The amount of Siacoins in the output address: $ref: "#/components/schemas/Address" SiacoinOutputID: allOf: - $ref: "#/components/schemas/Hash256" - description: Unique identifier for a Siacoin output. SiafundElement: type: object properties: id: allOf: - $ref: "#/components/schemas/SiafundOutputID" - description: The ID of the element stateElement: allOf: - $ref: "#/components/schemas/StateElement" - description: The state of the element siafundOutput: allOf: - $ref: "#/components/schemas/SiafundOutput" - description: The output of the element claimStart: allOf: - $ref: "#/components/schemas/Currency" - description: value of SiafundTaxRevenue when element was created SiafundInput: type: object description: Represents an input used to spend an unspent Siafund output. properties: parentID: allOf: - $ref: "#/components/schemas/SiafundOutputID" - description: The ID of the parent Siafund output being spent. unlockConditions: allOf: - $ref: "#/components/schemas/UnlockConditions" - description: The conditions required to unlock the parent Siafund output. claimAddress: allOf: - $ref: "#/components/schemas/Address" - description: The address receiving the Siacoin claim generated by the Siafund output. SiafundOutput: type: object description: Represents an output created to distribute Siafund. properties: value: type: integer format: uint64 description: The amount of Siafund in the output. address: allOf: - $ref: "#/components/schemas/Address" - description: The address receiving the Siafund. SiafundOutputID: allOf: - $ref: "#/components/schemas/Hash256" - description: Unique identifier for a Siafund output. Signature: type: string format: byte pattern: "[0-9a-fA-F]{64}" description: A ed25519 signature SignedCurrency: type: string pattern: "^-?\\d+$" maxLength: 39 # fits 2^128 - 1 description: A signed amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H). StateElement: type: object properties: leafIndex: type: integer format: uint64 description: The index of the element in the Merkle tree merkleProof: type: array description: The Merkle proof demonstrating the inclusion of the leaf items: $ref: "#/components/schemas/Hash256" StorageProof: type: object description: Represents a proof of storage for a file contract. properties: parentID: allOf: - $ref: "#/components/schemas/FileContractID" - description: The ID of the file contract being proven. leaf: type: string format: byte description: The selected leaf from the Merkle tree of the file's data. proof: type: array description: The Merkle proof demonstrating the inclusion of the leaf. items: $ref: "#/components/schemas/Hash256" Transaction: type: object properties: siacoinInputs: type: array description: List of Siacoin inputs used in the transaction. items: $ref: "#/components/schemas/SiacoinInput" siacoinOutputs: type: array description: List of Siacoin outputs created by the transaction. items: $ref: "#/components/schemas/SiacoinOutput" fileContracts: type: array description: List of file contracts created by the transaction. items: $ref: "#/components/schemas/FileContract" fileContractRevisions: type: array description: List of revisions to existing file contracts included in the transaction. items: $ref: "#/components/schemas/FileContractRevision" storageProofs: type: array description: List of storage proofs asserting the storage of data for file contracts. items: $ref: "#/components/schemas/StorageProof" siafundInputs: type: array description: List of Siafund inputs spent in the transaction. items: $ref: "#/components/schemas/SiafundInput" siafundOutputs: type: array description: List of Siafund outputs created by the transaction. items: $ref: "#/components/schemas/SiafundOutput" minerFees: type: array description: List of miner fees included in the transaction. items: $ref: "#/components/schemas/Currency" arbitraryData: type: array description: Arbitrary binary data included in the transaction. items: type: string format: byte signatures: type: array description: List of cryptographic signatures verifying the transaction. items: $ref: "#/components/schemas/TransactionSignature" TransactionID: allOf: - $ref: "#/components/schemas/Hash256" - description: Unique identifier for a transaction. TransactionSignature: type: object properties: parentID: allOf: - $ref: "#/components/schemas/Hash256" - description: The ID of the transaction being signed publicKeyIndex: type: integer format: uint64 description: The index of the public key used to sign the transaction timelock: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height at which the outputs in the transaction can be spent coveredFields: allOf: - $ref: "#/components/schemas/CoveredFields" - description: Indicates which fields of the transaction are covered by the signature signature: allOf: - $ref: "#/components/schemas/Signature" - description: The signature of the transaction UnlockConditions: type: object properties: timelock: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height at which the outputs can be spent publicKeys: type: array items: $ref: "#/components/schemas/UnlockKey" signaturesRequired: type: integer format: uint64 description: The number of signatures required to spend the output UnlockKey: type: object properties: algorithm: type: string format: bytes description: | A fixed 16-byte array that specifies the algorithm used to generate the key example: "ed25519" key: description: | A 32-byte key represented as a hex-encoded string. Must be exactly 64 characters long, containing only hexadecimal digits type: string format: bytes pattern: "^[a-fA-F0-9]{64}$" V2BlockData: type: object properties: height: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height of the block commitment: $ref: "#/components/schemas/Hash256" transactions: type: array items: $ref: "#/components/schemas/V2Transaction" V2FileContract: type: object properties: capacity: type: integer format: uint64 filesize: type: integer format: uint64 fileMerkleRoot: $ref: "#/components/schemas/Hash256" proofHeight: type: integer format: uint64 expirationHeight: type: integer format: uint64 renterOutput: $ref: "#/components/schemas/SiacoinOutput" hostOutput: $ref: "#/components/schemas/SiacoinOutput" missedHostValue: $ref: "#/components/schemas/Currency" totalCollateral: $ref: "#/components/schemas/Currency" renterPublicKey: $ref: "#/components/schemas/PublicKey" hostPublicKey: $ref: "#/components/schemas/PublicKey" revisionNumber: $ref: "#/components/schemas/RevisionNumber" renterSignature: $ref: "#/components/schemas/Signature" hostSignature: $ref: "#/components/schemas/Signature" V2FileContractElement: type: object properties: id: allOf: - $ref: "#/components/schemas/FileContractID" - description: The ID of the element stateElement: allOf: - $ref: "#/components/schemas/StateElement" - description: The state of the element v2FileContract: $ref: "#/components/schemas/V2FileContract" V2FileContractResolution: type: object properties: parent: $ref: "#/components/schemas/V2FileContractElement" resolution: type: object V2FileContractRevision: type: object properties: parent: $ref: "#/components/schemas/V2FileContractElement" revision: $ref: "#/components/schemas/V2FileContract" V2SiacoinInput: type: object properties: parent: $ref: "#/components/schemas/SiacoinElement" satisfiedPolicy: $ref: "#/components/schemas/SatisfiedPolicy" V2SiafundInput: type: object properties: parent: $ref: "#/components/schemas/SiafundElement" claimAddress: $ref: "#/components/schemas/Address" satisfiedPolicy: $ref: "#/components/schemas/SatisfiedPolicy" V2Transaction: type: object properties: siacoinInputs: type: array items: $ref: "#/components/schemas/V2SiacoinInput" siacoinOutputs: type: array items: $ref: "#/components/schemas/SiacoinOutput" siafundInputs: type: array items: $ref: "#/components/schemas/V2SiafundInput" siafundOutputs: type: array items: $ref: "#/components/schemas/SiafundOutput" fileContracts: type: array items: $ref: "#/components/schemas/V2FileContract" fileContractRevisions: type: array items: $ref: "#/components/schemas/V2FileContractRevision" fileContractResolutions: type: array items: $ref: "#/components/schemas/V2FileContractResolution" attestations: type: array items: $ref: "#/components/schemas/Attestation" arbitraryData: type: array items: type: string format: byte newFoundationAddress: $ref: "#/components/schemas/Address" minerFee: $ref: "#/components/schemas/Currency" ############################# # # Helper types # ############################# AutopilotConfig: type: object properties: enabled: type: boolean description: Whether the autopilot is enabled contracts: $ref: "#/components/schemas/ContractsConfig" hosts: $ref: "#/components/schemas/HostsConfig" BlockHeight: type: integer format: uint64 description: The height of a block example: 92813 Bucket: type: object properties: name: $ref: "#/components/schemas/BucketName" policy: type: object properties: publicReadAccess: type: boolean description: Whether the bucket is publicly readable createdAt: type: string format: date-time description: The time the bucket was created BucketName: type: string pattern: (?!(^xn--|.+-s3alias$))^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$ description: The name of the bucket. BuildState: type: object properties: buildTime: type: string format: date-time description: The build time of the build commit: type: string description: The commit hash of the build version: type: string description: The version of the build os: type: string description: The operating system of the build ConfigRecommendation: type: object properties: gougingSettings: $ref: "#/components/schemas/GougingSettings" ConsensusState: type: object properties: blockHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The current block height lastBlockTime: type: string format: date-time description: The time of the last block synced: type: boolean description: Whether the node is synced with the network ContractLockID: type: object properties: lockID: type: integer format: uint64 description: The ID of the lock example: 12 ContractsConfig: type: object properties: amount: type: integer format: uint64 description: The minimum number of contracts to form default: 0 period: type: integer format: uint64 description: The length of a contract's period in blocks (1 block being 10 minutes on average) default: 0 renewWindow: type: integer format: uint64 description: The number of blocks before the end of a contract that a contract should be renewed default: 0 download: type: integer format: uint64 description: Expected download bandwidth used per period in bytes default: 0 upload: type: integer format: uint64 description: Expected upload bandwidth used per period in bytes default: 0 storage: type: integer format: uint64 description: Expected amount of data stored in bytes default: 0 prune: type: boolean description: Whether to automatically prune deleted data from contracts default: false ContractSize: type: object properties: prunable: type: integer format: uint64 description: The amount of data that can be pruned from a contract size: type: integer format: uint64 description: The total size of a contract DurationMS: type: integer format: int64 description: A duration in milliseconds example: 30000 EncryptionKey: type: string pattern: ^(key|skey):[0-9a-fA-F]{64}$ description: A key used to encrypt and decrypt data. The key is either a regular key (key) or a salted key (skey). The latter requires a seed to be used for encryption and decryption. ETag: type: string pattern: '^(W/)?".*?"$' description: An ETag representing a resource Event: type: object description: A transaction or other event that affects the wallet including miner payouts, siafund claims, and file contract payouts. properties: id: allOf: - $ref: "#/components/schemas/Hash256" - description: The event's ID index: allOf: - $ref: "#/components/schemas/ChainIndex" - description: Information about the block that triggered the creation of this event confirmations: type: integer format: uint64 description: The number of blocks on top of the block that triggered the creation of this event type: type: string enum: - miner - foundation - siafundClaim - v1Transaction - v1ContractResolution - v2Transaction - v2ContractResolution description: The type of the event data: type: object maturityHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The block height at which the payout matures. timestamp: type: string format: date-time description: The time the event was created relevant: type: array items: $ref: "#/components/schemas/Address" GougingSettings: type: object properties: maxRPCPrice: allOf: - $ref: "#/components/schemas/Currency" - description: The maximum base price a host can charge per RPC maxContractPrice: allOf: - $ref: "#/components/schemas/Currency" - description: The maximum price a host can charge for a contract formation maxDownloadPrice: allOf: - $ref: "#/components/schemas/Currency" - description: The maximum price a host can charge for downloading in hastings / byte maxUploadPrice: allOf: - $ref: "#/components/schemas/Currency" - description: The maximum price a host can charge for uploading in hastings / byte maxStoragePrice: allOf: - $ref: "#/components/schemas/Currency" - description: The maximum price a host can charge for storage in hastings / byte / block hostBlockHeightLeeway: type: integer format: uint32 description: The number of blocks a host's chain's height can diverge from our own before we stop using it minPriceTableValidity: type: integer format: uint64 description: The time a host's price table should be valid after acquiring it in milliseconds minAccountExpiry: type: integer format: uint64 description: The minimum amount of time an account on a host can be idle for before expiring minMaxEphemeralAccountBalance: allOf: - $ref: "#/components/schemas/Currency" - description: The minimum max balance a host should allow us to fund an account with HostsConfig: type: object properties: maxConsecutiveScanFailures: type: integer format: uint64 description: The maximum number of consecutive scan failures before a host is removed from the database default: 0 maxDowntimeHours: type: integer format: uint64 description: The maximum number of hours a host can be offline before it is removed from the database default: 0 minProtocolVersion: type: string description: The minimum supported protocol version of a host to be considered good MemoryStatus: type: object properties: available: type: integer format: uint64 description: The amount of remaining memory currently available in bytes total: type: integer format: uint64 description: The total amount of memory available in bytes minimum: 1 MultipartUploadID: type: string pattern: ^[0-9a-fA-F]{64}$ description: A unique identifier for a multipart upload Network: type: object properties: name: type: string description: The name of the network initialCoinbase: allOf: - $ref: "#/components/schemas/Currency" - description: The initial coinbase reward - default: "300000000000000000000000000000" minimumCoinbase: allOf: - $ref: "#/components/schemas/Currency" - description: The minimum coinbase reward - default: "30000000000000000000000000000" initialTarget: allOf: - $ref: "#/components/schemas/BlockID" - description: The initial target - default: "0000000020000000000000000000000000000000000000000000000000000000" blockInterval: type: integer format: uint64 description: The block interval default: 600000000000 maturityDelay: type: integer format: uint64 description: The maturity delay default: 144 hardforkDevAddr: type: object properties: height: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height of the hardfork - example: 10000 oldAddress: allOf: - $ref: "#/components/schemas/Address" - description: The old developer address - default: "7d0c44f7664e2d34e53efde0661a6f628ec9264785ae8e3cd7c973e8d190c3c97b5e3ecbc567" newAddress: allOf: - $ref: "#/components/schemas/Address" - description: The new developer address - default: "f371c70bce9eb8979cd5099f599ec4e4fcb14e0afcf31f9791e03e6496a4c0b358c98279730b" hardforkTax: type: object properties: height: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height of the hardfork - example: 21000 hardforkStorageProof: type: object properties: height: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height of the hardfork - example: 100000 hardforkOak: type: object properties: height: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height of the hardfork - example: 135000 fixHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height of the fix - example: 139000 genesisTimestamp: type: string format: date-time description: The genesis timestamp default: "2015-06-06T16:13:20+02:00" hardforkASIC: type: object properties: height: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height of the hardfork - example: 179000 oakTime: type: integer format: uint64 description: The oak time oakTarget: allOf: - $ref: "#/components/schemas/BlockID" - description: The oak target hardforkFoundation: type: object properties: height: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height of the hardfork - example: 298000 primaryAddress: allOf: - $ref: "#/components/schemas/Address" - description: The primary address - default: "053b2def3cbdd078c19d62ce2b4f0b1a3c5e0ffbeeff01280efb1f8969b2f5bb4fdc680f0807" failsafeAddress: allOf: - $ref: "#/components/schemas/Address" - description: The failsafe address - default: "27c22a6c6e6645802a3b8fa0e5374657438ef12716d2205d3e866272de1b644dbabd53d6d560" hardforkV2: type: object properties: allowHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height at which V2 consensus types are allowed - example: 1000000 requireHeight: allOf: - $ref: "#/components/schemas/BlockHeight" - description: The height at which V2 consensus types are required - example: 1025000 RedundancySettings: type: object properties: minShards: type: integer minimum: 1 format: int32 description: The number of data shards a piece of an object gets erasure-coded into totalShards: type: integer minimum: 2 format: int32 description: The number of total data shards a piece of an object gets erasure-coded into Revision: type: object properties: contractID: $ref: "#/components/schemas/FileContractID" missedHostValue: $ref: "#/components/schemas/Currency" renterFunds: $ref: "#/components/schemas/Currency" revisionNumber: $ref: "#/components/schemas/RevisionNumber" size: type: integer format: uint64 description: The size of the contract in bytes RevisionNumber: type: integer format: uint64 description: The revision number of the contract example: 246 Sector: type: object description: Description of an uploaded sector properties: contracts: description: The contracts that the sector is uploaded to type: object additionalProperties: description: The contracts' IDs type: array items: $ref: "#/components/schemas/FileContractID" root: allOf: - $ref: "#/components/schemas/Hash256" - description: The Merkle root of the sector Slab: type: object description: A slab of data to migrate properties: health: type: number format: float minimum: 0 maximum: 1 encryptionKey: allOf: - $ref: "#/components/schemas/EncryptionKey" - description: The encryption key used to encrypt the slab's shards minShards: type: integer format: uint8 minimum: 1 maximum: 255 description: The number of data shards the slab is split into SyncerAddress: type: string description: The address of the syncer example: "118.92.232.145:9981"