v1

latestOpenAPI 3.0.02026-07-17120114186.8 KB
bus

Renew contract

If a contract is nearing its end height, or if it is running out of funds, it can be renewed, or refreshed, respecitively. If a contract is not renewed in due time, it will be archived and the data will need to be migrated to a different host.

post/bus/contract/{id}/renew

Path parameters

idstring required

A unique identifier for a file contract

Request body

endHeightinteger

The height at which the contract will expire

expectedNewStorageinteger
minNewCollateralstring

An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).

renterFundsstring

An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).

Example request

{
  "endHeight": 92813
}

Response

Contract renewed successfully

idstring

The unique identifier for the file contract.

hostKeystring

The public key of the host.

v2boolean

Indicates if the contract is a V2 contract.

proofHeightinteger

The height at which the storage proof needs to be submitted

renewedFromstring

The ID of the contract this one was renewed from

revisionHeightinteger

The block height of the latest revision

revisionNumberinteger

The current revision number of the contract

sizeinteger

The size of the contract in bytes

startHeightinteger

The block height at which the contract created

state'pending' | 'active' | 'complete' | 'failed'

The state of the contract

usability'good' | 'bad'

The usability status of the contract

windowStartinteger

The block height when the contract's proof window starts.

windowEndinteger

The block height when the contract's proof window ends.

contractPricestring

The price of forming the contract.

initialRenterFundsstring

The initial funds provided by the renter.

archivalReason'renewed' | 'removed' | 'hostpruned'

The reason for archiving the contract, if applicable.

renewedTostring

The ID of the contract this one was renewed to, if applicable.

Example response

{
  "proofHeight": 92813,
  "revisionHeight": 92813,
  "revisionNumber": 246,
  "startHeight": 92813,
  "windowStart": 92813,
  "windowEnd": 92813
}