Check Upload Status

API Endpoint

http://127.0.0.1:5001/api/v1/storage/upload/status?

Input Parameters

ArgumentRequired?TypeDescriptionRequired?
session-idYstringID for the storage upload session.Y

Usage

async getStatus(event) {
    let input  = {
      SessionId: this.state.added_session_id,
    }
    const statusResponse = this.btfs.statusSign(input, {})
    try {
      for await (const response of statusResponse) {
        this.setState({ added_session_status:  response.Status })
        this.setState({ added_status_response:  response.Message })
      }
    } catch (err) {
      console.error(err)
    }
  }
curl -X POST http://127.0.0.1:5001/api/v1/storage/upload/status?arg=647cae8b-7da1-4e00-b183-e34a1517d15e

Response

{
  "Status": "<string>",
  “Retry-Sign-Status”: "<string>",
  "FileHash": "<string>",
  "Shards": {
    "<shard-id-string>": {
      “ContractID”: "<string>",
      "Price": "<int64>",
      "Host": "<string>",
      "Status": "<string>"
    },
    ...
  }
}