Appearance
Inspect a message
POST /spools/{spool}/inspect
Reads the message the handle names, in whatever state it is, without moving it: the payload as the body, its attributes as headers, the same attributes a listing reports, present under the same conditions. An inspect grants no ownership and leaves the handle valid. The handle is fenced to the message as it was minted, so one that has since been delivered, settled, recovered or discarded answers 410 — the view is stale, list again. The state reported is the current one: a delayed message reads as visible once its delay elapsed. Responses carry Cache-Control no-store.
Sample
sh
curl -si -X POST "$SPOOLER_API/spools/<spool>/inspect" \
-H "Authorization: Bearer $SPOOLER_KEY" \
-H "Spooler-Handle: <handle>"Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
spool | path | IdentName, 1–63 chars, ^[A-Za-z0-9_:-]+$ | yes | The spool name. |
Spooler-Handle | header | Handle, 16–256 chars, ^[A-Za-z0-9_-]+$ | yes | The handle from a listing or a send, presented back. |
Responses
| Status | Description |
|---|---|
200 | The message. The body is the payload; Content-Length is its size. |
400 | The request is malformed; the kind names the problem. |
401 | The API key is missing or not recognized; the kind is unauthenticated. |
402 | The account is suspended; the kind is account_suspended. |
403 | The operation is refused; the kind names why: a plan limit (queue_limit, retention_limit), or account_blocked on any operation when the account is on an abuse hold. |
404 | The spool or queue does not exist; the kind says which. |
410 | The lease no longer settles anything: expired, already settled, or predates a primary change. |
429 | The per-account request rate cap is exceeded. The body names the kind (rate_limited); the wait is the Retry-After header and is not repeated in the body. Headers are as structured as the body, and this one is the header HTTP defines for a wait. |
503 | The spool is momentarily unavailable. |
200 headers
| Header | Description |
|---|---|
Spooler-Message-Id | The message's id. |
Spooler-Message-State | The state the message is in. |
Spooler-Message-Retries | Redeliveries so far. |
Spooler-Message-Created-At | When the message was sent (RFC 3339, UTC). |
Spooler-Message-Visible-At | When a delayed message becomes visible (RFC 3339, UTC); present only in the delayed state. |
Spooler-Lease-Expires-At | When the current lease expires (RFC 3339, UTC); present only in the pending state on a queue with a lease timeout. |
Spooler-Message-Expires-At | When retention discards the message (RFC 3339, UTC); absent when retention is off. |
429 headers
| Header | Description |
|---|---|
Retry-After | Seconds until the next request is admitted, whole and at least 1; always the delay-seconds form, never an HTTP-date. |