HTTP API

Message Queue Receiving

GET/api/v1/mq/queues/{queue_name}/messages
GET
/api/v1/mq/queues/{queue_name}/messages

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

queue_name*string

Query Parameters

max_messages?integer

Maximum number of messages to receive (1-10, default: 1)

Formatint32
Range0 <= value
wait_time_seconds?integer

Long-poll duration in seconds (0-20, default: 0)

Formatint32
Range0 <= value
visibility_timeout_seconds?integer

Override the queue's default visibility timeout (0-43200)

Formatint32
Range0 <= value

Response Body

application/json

curl -X GET "https://example.com/api/v1/mq/queues/string/messages"
{  "messages": [    {      "attributes": {        "property1": "string",        "property2": "string"      },      "body": null,      "message_id": "string",      "receipt_handle": "string",      "system_attributes": {        "approximate_first_receive_timestamp": "2019-08-24T14:15:22Z",        "approximate_receive_count": 0,        "message_group_id": "string",        "sender_id": "string",        "sent_timestamp": "2019-08-24T14:15:22Z",        "sequence_number": "string"      }    }  ]}
DELETE/api/v1/mq/queues/{queue_name}/messages/batch
DELETE
/api/v1/mq/queues/{queue_name}/messages/batch

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

queue_name*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to delete multiple messages in a batch

Response Body

application/json

curl -X DELETE "https://example.com/api/v1/mq/queues/string/messages/batch" \  -H "Content-Type: application/json" \  -d '{    "entries": [      {        "receipt_handle": "string"      }    ]  }'
{  "failed": [    {      "error": "string",      "message": "string",      "receipt_handle": "string"    }  ],  "successful": [    "string"  ]}
DELETE/api/v1/mq/queues/{queue_name}/messages/{receipt_handle}
DELETE
/api/v1/mq/queues/{queue_name}/messages/{receipt_handle}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

queue_name*string
receipt_handle*string

Response Body

application/json

curl -X DELETE "https://example.com/api/v1/mq/queues/string/messages/string"
{  "message": "string"}
POST/api/v1/mq/queues/{queue_name}/messages/{receipt_handle}/visibility
POST
/api/v1/mq/queues/{queue_name}/messages/{receipt_handle}/visibility

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

queue_name*string
receipt_handle*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to change a message's visibility timeout

Response Body

application/json

curl -X POST "https://example.com/api/v1/mq/queues/string/messages/string/visibility" \  -H "Content-Type: application/json" \  -d '{    "visibility_timeout_seconds": 0  }'
{  "new_visibility_timeout": "2019-08-24T14:15:22Z"}

On this page