Returns queues — “receiver and sending address” pairs — with counters: the same as the monitor’s “Top queues” page, only as a structure.
The call is GET /queues?format=json (or xml). The queue parameter narrows the selection with a “domain/address” pair, and either half can be a star: queue=*/vmta1 means the queues of one sending address. The manual has no separate endpoint for a sending address — its details are described exactly this way.
This is the top, not a list. How many lines arrive is decided by http-default-max-items — ten by default — and the order by http-default-sort-order, by number of recipients by default.
Access is decided by http-access based on the address the request came from — the monitor level is enough for reading. The key from http-api-key in the X-API-Key header grants full access from any address.
And it is a snapshot: a queue that was in backoff mode between two requests will not make it into the response.
The screen takes the number of queues with messages from the totalQueuesWithRcp total rather than counting lines; if exactly a thousand lines arrived, the screen says the list is cut. The Hub asks separately about paused queues and queues in backoff mode with commands through /command — with –maxitems=10000.
What to ask this endpoint:
| Question | This one or not |
|---|---|
| which queues are the largest right now | yes |
| the queues of one sending address | yes — queue=*/address, but also as a top |
| all node queues without exception | no — show queues with –maxitems |
| the history of one queue | no — /queueDetail |
| what happened yesterday | no — that is accounting |
# the top queues and the queues of one sending address curl -s 'http://127.0.0.1:8080/queues?format=json'curl -s 'http://127.0.0.1:8080/queues?format=json&queue=*/vmta1'
2 relations
QueuesThe screen that shows the same thing to a human. § 5.4
curl -s 'http://127.0.0.1:8080/queues?format=json' | head -60 pmta show queues --maxitems=1000 --no-rcpt-events
3 articles
◇What the node tells about itself and through which channelsSeven observation surfaces: the web monitor, the console in four formats, the log, accounting, accounting search, metrics and export to external analytics.◇Two inbound report processors and what to do with themBounces by message and complaints are parsed by two identically structured blocks; each has its own address list and its own pair of decisions about the message’s fate.◇Five ways for a queue to hand off a messageA queue does not have to use SMTP: it can write to a file, run a program, call over HTTP or discard.