State Machine Service
Instance State

Apply event on an instance.

1min
PUT
https://{tenantSubDomain}.fxtrt.io/core/api/v1/state-machine/{entityCode}/instance/{instanceId}/event

This API will apply an event to an instance. If the event is transitionable, then the instance will transition to the particular state. Otherwise it will remain in the existing state.

ParameterDescriptionTypeValidation
name*Represents name of the event for state transition.stringminLength: 3 maxLength: 32
timestamp*Represents the timestamp of the event occured.integer($int64)
data*Represents event data values, if any, for this event.
source*Represents the source which triggered the event. It can be an app, a user or some location from where the event was triggered.
ㅤ↳appId*Unique app ID.stringminLength: 1 maxLength: 64
ㅤ↳userIdUnique user ID.stringminLength: 1 maxLength: 64
ㅤ↳locIdUnique loc ID.stringminLength: 1 maxLength: 64
callbackRepresents callback url, which can be called to get any info about state transition of an instance or its terminal ttl expiry or to notify status of API request.stringpattern: A valid URL.
*This is required.

HTTP Status Code Summary

CodeDescription
200 - OKEverything worked as expected.
| **400 - Bad Request** | The request was unacceptable, often due to missing a required parameter. |
| **401 - Unauthorized** | No valid API key provided. |
| **404 - Not Found** | The requested resource doesn't exist. |
| **503 - Server Errors** | Something went wrong on our end. (These are rare.) |
Path Parameters
entityCode
*
instanceId
*
Header Parameters
X-COREOS-REQUEST-ID
*
X-COREOS-TID
*
X-COREOS-ACCESS
*
X-COREOS-USERINFO
Body Parameters
body
*
Description
Event for instance of an entity type for state transition.
All Of
Event +
eventCode
*
reasonCode
timestamp
*
All Of
EpochTimestamp +
data
*
source
*
callback
Responses
200
OK
All Of
ErrorResponse +
error
*
request
*
data
All Of
Instance +
400
Bad request - The server is unable to process the request due to something that is perceived to be a client error.
error
*
request
*
401
Unauthorized - The client's identity is unknown to the server. Verify that you are accessing the correct tenant and that your client ID and client secret are valid on that Tenant.
error
*
request
*
404
Not found - The server can not find the requested resource.
error
*
request
*
503
Server error - The server is not ready to handle the request. This could be due to maintenance downtime or system resource constraints.
error
*
request
*
Curl
JS
Ruby
Python
Responses
200
400
401
404
503