AWS IoT Events
API Reference

BatchPutMessage

Sends a set of messages to the AWS IoT Events system. Each message payload is transformed into the input you specify ("inputName") and ingested into any detectors that monitor that input. If multiple messages are sent, the order in which the messages are processed isn't guaranteed. To guarantee ordering, you must send messages one at a time and wait for a successful response.

Request Syntax

POST /inputs/messages HTTP/1.1 Content-type: application/json { "messages": [ { "inputName": "string", "messageId": "string", "payload": blob } ] }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

messages

The list of messages to send. Each message has the following format: '{ "messageId": "string", "inputName": "string", "payload": "string"}'

Type: Array of Message objects

Array Members: Minimum number of 1 item.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "BatchPutMessageErrorEntries": [ { "errorCode": "string", "errorMessage": "string", "messageId": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

BatchPutMessageErrorEntries

A list of any errors encountered when sending the messages.

Type: Array of BatchPutMessageErrorEntry objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalFailureException

An internal failure occurred.

HTTP Status Code: 500

InvalidRequestException

The request was invalid.

HTTP Status Code: 400

ServiceUnavailableException

The service is currently unavailable.

HTTP Status Code: 503

ThrottlingException

The request could not be completed due to throttling.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: