Pub/SubPull messages
Pub/Sub

Pull messages

Pull messages from a subscription. Returns up to max_messages messages. Messages must be acknowledged after processing or they will be redelivered.

curl -X POST "https://api.mythic-analytics.com/api/v1/admin/pubsub/subscriptions/example_string/pull" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "max_messages": 25
}'
{
  "success": true,
  "data": [
    {
      "ack_id": "ack_3xL7nBcD",
      "message": {
        "id": "msg_7kH3nPqR",
        "data": {},
        "attributes": {},
        "published_at": "2024-12-25T10:00:00Z"
      },
      "delivery_attempt": 1
    }
  ],
  "count": 10
}
POST
/admin/pubsub/subscriptions/{id}/pull
POST
Security Scheme
Bearer Tokenstring
Required

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY
path
idstring
Required

Subscription identifier.

Content-Typestring
Required

The media type of the request body

Options: application/json
max_messagesinteger

Maximum messages to return. Default 10, max 100.

Max: 100
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Path Parameters

idstring
Required

Subscription identifier.

Body

application/json
max_messagesinteger

Maximum messages to return. Default 10, max 100.

Responses

successboolean
dataarray
countinteger