Get request status
GET {{baseUrl}}/requests/:request
Retrieve current information about a given long-running asynchronous request.
status
Each request contains one of the following request status: Pending, Running, Completed & Failed.
Pending/Running
Requests with a status of Pending/Running will always respond with a 202 status code and contain a Retry-After header containing a seconds amount after which the request can be polled again.
Completed
A Completed HTTP response signals that the request has finished executing either successfully or in a faulty state and populates the output object with the corresponding operation details. Faulty requests will return a non-successful HTTP response code and include the error message as a nested property of output. Successful Completed requests may include additional HTTP headers based on the triggering request.
Failed
A Failed request signifies an unhandled API runtime error and does not include additional error details.
Timeout limit
Running and Pending requests may be executed for up to 30 days.
Examples
Example response body of a Pending request
requestId: "0b238156-38b9-4cf7-9ff3-f0b8d6d4c50d",
"trigger": {
"url": "http://api.tangany.com/custody/protocols/eth/transactions",
"body": {
"from": {
"wallet": "my-wallet"
},
"to": {
"wallet": "my-wallet"
},
"amount": "0.0021"
},
"headers": {
"tangany-network": "mainnet",
"tangany-tx-confirmations": "1"
},
"computedConfig": {
"transactionType": 1,
"from": "0x9C2E011c0CE0d75c2B62B9C5A0Ba0a7456593800",
"to": "0x9C2E011c0CE0d75c2B62B9C5A0Ba0a7456593800",
"nonce": 1,
"gasLimit": "21000",
"value": "0.000001",
"data": "0x",
"chainId": 100,
"gasPrice": "5500000000"
}
},
content: {
"status": "Pending",
"stage": "GatheringPrerequisites",
"created": "2021-10-06T16:27:37Z",
"updated": "2021-10-06T16:27:52Z",
"output": null
}
Example response body of a faulty Completed request
requestId: "0b238156-38b9-4cf7-9ff3-f0b8d6d4c50d",
"trigger": {
"url": "http://api.tangany.com/custody/protocols/eth/transactions",
"body": {
"from": {
"wallet": "my-wallet"
},
"to": {
"wallet": "my-wallet"
},
"amount": "0.0021"
},
"headers": {
"tangany-network": "mainnet",
"tangany-tx-confirmations": "1"
},
"computedConfig": {
"transactionType": 1,
"from": "0x9C2E011c0CE0d75c2B62B9C5A0Ba0a7456593800",
"to": "0x9C2E011c0CE0d75c2B62B9C5A0Ba0a7456593800",
"nonce": 1,
"gasLimit": "21000",
"value": "0.000001",
"data": "0x",
"chainId": 100,
"gasPrice": "5500000000"
}
},
content: {
"status": "Completed",
"stage": "transmitting transaction",
"created": "2021-10-04T11:26:43Z",
"updated": "2021-10-04T11:26:45Z",
"output": {
"statusCode": 500,
"activityId": "74a6960d-114a-4303-b4cc-36dd050d9c9f",
"message": "Server error: The delegate to be set is not registered as delegate"
}
}
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
tangany-version | number | (Required) Default header that directs the request towards desired Tangany Custody Api version (e.g 2 directs to Tangany Custody APi v2). |
Supports only major versions. |
| Accept | string | | |
RESPONSES
status: OK
{"requestId":"b2f1bebc-32e2-407b-b2cd-d7b9d89904fe","trigger":{"url":"http://localhost:7071/api/eth/wallet/func-spec/send-async","headers":{"tangany-network":"sepolia","tangany-tx-confirmations":"secure","tangany-use-gas-tank":"true"},"body":{"list":[{"wallet":"my-wallet","amount":"0.00156"},{"wallet":"my-wallet","amount":"0.00156"}]},"computedConfig":{"from":"0x9C2E011c0CE0d75c2B62B9C5A0Ba0a7456593803","to":"0x546f69Fc836D781dB24e4F8A250Fc26557E12679","nonce":197,"transactionType":2,"gasLimit":"21000","value":"0.000457","data":"0x","maxFeePerGas":"33271984188","maxPriorityFeePerGas":"2500000000"}},"content":{"status":"Completed","stage":"DeletingWallets","created":"1991-03-17T14:25:41.224Z","updated":"1953-02-13T00:33:07.207Z","output":{"hash":7.205679926776284e+76,"blockNr":7675874,"data":15731623,"status":"confirmed"}}}