Page MenuHomeDevCentral
Paste P255

Delivery API endpoints
ActivePublic

Authored by dereckson on May 24 2017, 23:56.
/delivery
/delivery/register_consumer
{
"api-key": "<guid allowed to use this API>"
"routing-key": "nasqueron.*"
}
{
"key": "<key to use for this queue>"
}
/delivery/get_all
{
"key": "<key returned by register_consumer>"
"no-ack": false,
}
{
"queue": "<key to use for this queue>"
"routing-key": "nasqueron.*"
"count": 4,
'messages": [
{},
{},
{},
{}
]
}
/delivery/get
{
"key": "<key returned by register_consumer>",
"format": "base64",
"no-ack": false,
}
// returns directly the message
/delivery/ack
{
"key": "<key returned by register_consumer>",
"id": 100
}
OR
{
"key": "<key returned by register_consumer>",
ids: [
101,
102,
103,
104
]
}
/delivery/unregister_consumer
{
"key": "<key returned by register_consumer>",
"force": true
}
// `force` allows to specify if we want to drop the queue when there is still at least one message inside
Message
{
"id": 100,
"format": "as-is",
"content": "..."
}
{
"id": 100,
"format": "base64",
"content": "..."
}
Should we store the content as base64?
nginx
location /delivery {
proxy_pass http://localhost:38080/;
include proxy_params;
}
Should we provide a CSS file too?
location = /delivery/app.css {
try_files /app.css @404;
}

Event Timeline

dereckson edited the content of this paste. (Show Details)Jul 6 2017, 12:28

no-ack (default: False) will allow to consume messages without any need to ack their reception afterwards.