Multiple Messages

This endpoint is designed to accept multiple messages, split them into individual messages, and pass them through Listener. Outside of splitting the messages, no transformation occurs. Call this endpoint to send multiple messages at once, rather than sending individual messages.

If the request payload is a JSON array, the payload is parsed and Listener treats each entity of the array as an individual message. If the payload is not a JSON array, then a non-zero length Delimiter must be sent to indicate which characters to use to split the payload into multiple messages. When sending a JSON object, each key is not treated as an individual message. You must send either a JSON array or delimited messages.

Definition

POST https://listener-ingest-services.teradata.com/v1/messages HTTP/1.1
Authorization: token SOURCE_SECRET_KEY
Content-Type: application/json
Delimiter: |
Sync: 1
HeaderRequiredSample ValuePurpose
AuthorizationRequiredfhwb-afwfa-wefafSource secret key determines to which source the data is sent.
DelimiterOptional,Instructs Ingest to split the request body into multiple messages by a delimiter character. Can be any character except these: \/"''. Ignored if Content-Type is JSON.
Content-TypeOptionalapplication/jsonContent type of the request body. If application/json, Ingest parses the array into multiple messages.
SyncOptional1Request a UUID from Ingest to make sure Kafka accepted the message. Value must be 1 or it is treated as async.

Example Request

curl \
  -H "Content-Type: application/json" \
  -H "Authorization: token 0f6fd50e-9515-4730-92c0-2360b5af56d3" \
  -H "Sync: 1" \
  -H "Delimiter: ," \
  -X POST -d 'one,two,three' \
  -i \
  https://listener-ingest-services.teradata.com/v1/messages

Example Response

HTTP/1.1 201 Created
Content-Type: application/json
X-Total: 3
[
  {"uuid":"15183920e250242ac11000000"},
  {"uuid":"15183920e250242ac11000001"},
  {"uuid":"15183920e250242ac11000002"}
]

Response Codes

CodeDescription
201Message successfully received.
400Invalid or no Delimiter given (for non-JSON array payload).
401Authorization header not found.
500Message body could not be read or Kafka could not be reached.
502Bad Gateway.
503Service unavailable.
504Gateway timeout.
Note
See the system administrator for frequent responses of 502, 503, or 504. You may need to scale up ingest services or check to see if ingest services are up and running.

results matching ""

    No results matching ""