Inspect dApp state REST API
This method sends an inspect-state request to the dApp backend passing the payload string in the URL. The payload string should be URL-encoded; the inspect server will decode the string to UTF-8. If the dApp frontend needs to pass a binary string to the backend then it is advised to use the base64 encoding.
The response contains a status string and the reports generated by the dApp backend. The status string can be either 'accept', 'reject', or 'exception'. In case of exception, the field exception_payload will contain the exception payload; Otherwise, this field will be null.
When running on machine mode, the whole Cartesi Machine is rolled back after processing the inspect-state request. On host mode, it is advised against changing the dApp backend state when processing an inspect-state request. Notice that this method is synchronous, so it is not advised to perform resource-intensive operations.
Path Parameters
- payload string required
- 200
- default
Inspect state response.
- application/json
- Schema
- Example (from schema)
Schema
- status string
Possible values: [
Accepted
,Rejected
,Exception
,MachineHalted
,CycleLimitExceeded
,TimeLimitExceeded
] - exception_payload string
reports object[]
payload stringmetadata object
Contain the blockchain Metadata for the given inspect request
active_epoch_index integercurrent_input_index integer
{
"status": "Accepted",
"exception_payload": "string",
"reports": [
{
"payload": "string"
}
],
"metadata": {
"active_epoch_index": 0,
"current_input_index": 0
}
}
Error response.
- text/plain
- Schema
Schema
- string
Detailed error message.