Delete a queue

Delete a previously registered queue.

DELETE https://omegaletter.chat/api/v1/events

Usage examples

curl -X "DELETE" https://omegaletter.chat/api/v1/events \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY
    -d 'queue_id=1515096410:1'
#!/usr/bin/env python3

import zulip

# Download ~/zuliprc-dev from your dev server
client = zulip.Client(config_file="~/zuliprc-dev")

# Delete a queue (queue_id is the ID of the queue
# to be removed)
result = client.deregister(queue_id)
print(result)

More examples and documentation can be found here.

const zulip = require('zulip-js');

// Download zuliprc-dev from your dev server
const config = {
    zuliprc: 'zuliprc-dev',
};

zulip(config).then((client) => {
    // Register a queue
    const queueParams = {
        event_types: ['message']
    };
    client.queues.register(queueParams).then((res) => {
        // Delete a queue
        const deregisterParams = {
            queue_id: res.queue_id,
        };
        client.queues.deregister(deregisterParams).then(console.log);
    });
});

Arguments

Argument Example Required Description
queue_id 1375801870:2942 Required

The ID of a queue that you registered via POST /api/v1/register(see Register a queue and Get events from queue).

Response

Example response

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success"
}

A typical JSON response for when the queue_id is non-existent or the associated queue has already been deleted:

{
    "code": "BAD_EVENT_QUEUE_ID",
    "msg": "Bad event queue id: 1518820930:1",
    "queue_id": "1518820930:1",
    "result": "error"
}