Request Results
Enumerates the various types, constants, and datastructures found in the Request Results
event channel.
Request Results Channel
When your application makes a request to the API, then the API will respond notifying you whether your request was received. Most requests submitted to the API are long-running. This means that the consequences will not be immediately known. A successful response from the API is not an indication that your action completed successfuly, it merely indicates that we received your request to perform the action.
In order to learn whether your action completed successfully, your application must subscribe to the request result data stream for your organization. This stream will contain JSON formatted messages describing how blockery is handling your request. It will also describe the ultimate results of the request (success/failure).
Data Structure
Messages in the Request Results channel conform to the following example structure:
{
"title": "Transaction State Changed",
"description": "Transaction State Changed from 'pending', to 'in_ledger'",
"data": {
"follow_up_txtId": "Y4XgbuQGo6tlpxZM43QA",
"user_specified_id": "0001",
"tx_state": "in_ledger",
"result": {
"tx_id": "753f2ef8c7a01279ac65c97a747d5b3c71a554fd9810bbd23bc6d0ee49674aa4"
}
}
}
Field | Type | Description |
---|---|---|
title | string | A standard message describing what happened |
description | string | A dynamic human-readable description of the details of what happened |
data | object | An object containing the structured data for this event |
data.follow_up_txId | string | A unique identifier for the request |
data.user_specified_id | string | A unique identifier for the request, specified by the user when making it |
data.tx_state | tx_state | The current state of the request |
data.result | object | Data which summarizes what happened as a consequence of the initial request |
data.result.tx_id | string | The on-chain identifier for the transaction |
Types and Enumerations
tx_state
new
- A new request has been logged. It is in queue for processing.pending
- A request has been processed. However, the processing event is long-running. We are monitoring progress and will notify you when processing has completed.in_ledger
- Your request has finished processing successfully.expired
- Your request timed out while processing.failed
- Your request has failed. See the message for an explanation as to why.