REST API Reference
The ScaleOut Digital Twins™ service provides a hosted version of the REST API at https://realtimetwinapi.scaleoutsoftware.com. This section describes the endpoints implemented by this REST service.
Note
All API methods require an API key for authentication. To use this REST API, please first see API Keys.
HTTP Methods
- POST /Messages/{model}/{twinId}
Sends a JSON-formatted event or message in the request body to the specified real-time digital twin instance for processing.
- Parameters
model (string) – Name of the real-time digital twin model to which to send the event.
twinId (string) – Unique ID of the real-time digital twin instance to which to send the event.
- Query Parameters
apiKey (string) – Optional API key used for authorization.
- Status Codes
200 OK – The message was successfully delivered to and processed by the real-time digital twin instance.
202 Accepted – The message was accepted for processing by the real-time digital twin instance, but processing has not yet completed.
400 Bad Request – The message could not be sent to the real-time digital twin instance.
401 Unauthorized – The API key was invalid.
413 Request Entity Too Large – The message payload was larger than 64KB.
- GET /Messages/{model}/{twinId}
Retrieves one or more JSON-formatted events or messages for the specified real-time digital twin instance.
- Parameters
model (string) – Name of the real-time digital twin model for which to retrieve the event.
twinId (string) – ID of the Digital Twin instance of the specified Digital Twin model for which to retrieve the messages.
- Query Parameters
apiKey (string) – Optional API key used for authorization.
- Status Codes
200 OK – The messages were successfully retrieved.
204 No Content – There were no messages to retrieve.
401 Unauthorized – The API key was invalid.
- POST /Messages/{model}/{twinId}/ack
Acknowledges reception of messages for the specified real-time digital twin instance, so that they can be removed from the server. Subsequent calls to retrieve messages will not return messages already retrieved prior to the acknowledgment call.
- Parameters
model (string) – Name of the real-time digital twin model for which to retrieve the event.
twinId (string) – ID of the Digital Twin instance of the specified Digital Twin model for which to retrieve the messages.
- Query Parameters
apiKey (string) – Optional API key used for authorization.
- Status Codes
200 OK – The messages were successfully acknowledged.
401 Unauthorized – The API key was invalid.
500 Internal Server Error – We were unable to acknowledge reception of messages.