Table of Contents
/StateMachines/GetCurrentState
Gets the current state of a state machine, associated with a token.
JSON
- Request
{ "tokenId":Required(Str(PTokenId)) }- Response (if successful)
{ "CurrentState":Required(PCurrentState) }
XML
- Request
<GetCurrentState xmlns="https://waher.se/Schema/BrokerAgent.xsd" tokenId=(Required(Str(PTokenId))) />- Response (if successful)
<StateResult xmlns="https://waher.se/Schema/BrokerAgent.xsd"> <CurrentState> <[Required(PCurrentState)]> </CurrentState> </StateResult>
Input Parameters
| Parameter | Description |
|---|---|
PTokenId |
ID of token associated with state machine. |
Response Parameters
| Parameter | Description |
|---|---|
PCurrentState |
Current state of state machine, if found, and authorized. |
Javascript Library
Use the following asynchronous method in the Javascript Library, to call this resource.
var Response = await AgentAPI.StateMachines.GetCurrentState(TokenId);