Skip to content

Managing Outbound Service Queues

This API provides the ability to manage the outbound service queues.

For info on starting outbound services see Starting Outbound Services.

All Queues

This retrieves info on all your active outbound service queues.

Authorisation

This API uses basic authentication, using your cloud account username and API Access Key.

Username : cloudID/username (e.g. 1-2-0/bob@example.com)
Password : API Access Key

Request

URL : https://ws-[cloudID].aculabcloud.net/service/v1/outbound_queues
Methods : GET

A list of JSON objects each containing the following parameters:

Parameter Value Description
service_name string The name of the service.
length integer The length of the service's queue.

Example

Request
https://ws-[cloudID].aculabcloud.net/service/v1/outbound_queues
Response
    [  
       {
          "service_name": "service-name-1",
          "length": 78
       },
       {
          "service_name": "service-name-2",
          "length": 112
       }
    ]

Single Queue

Gets queue information for a single outbound service or purges its queue of all outstanding service start requests.

Method URL Description
GET https://ws-[cloudID].aculabcloud.net/service/v1/outbound/<ServiceName>/queue Get current queue information
DELETE https://ws-[cloudID].aculabcloud.net/service/v1/outbound/<ServiceName>/queue Purge all queued service starts

Authorisation

This API can be accessed using either the service's name and password, or the standard API access key.

Using the service's name and password:

Username : cloudID/username/outbound_service_name (e.g. 1-2-0/user@example.com/MyOutboundService)
Password : Outbound Service Password

Using the standard API access key:

Username : cloudID/username (e.g. 1-2-0/user@example.com)
Password : API Access Key

Get Queue Info

Gets the current length of the queue associated with the service.

Request

URL : https://ws-[cloudID].aculabcloud.net/service/v1/outbound/<ServiceName>/queue
Methods : GET

Response

A JSON object containing the following parameters:

Parameter Type Description
service_name string The name of the service.
length integer The length of the service's queue.

Example

Request
https://ws-[cloudID].aculabcloud.net/service/v1/outbound/example-service/queue
Response
  {
    "service_name": "example-service",
    "length": 112
  }

Purge Queue

Purges the current queue associated with the service. This is equivalent to calling service_cancel for each entry in the queue.

Request

URL : https://ws-[cloudID].aculabcloud.net/service/v1/outbound/<ServiceName>/queue
Methods : DELETE

Response

A JSON object containing the following parameters:

Parameter Value Description
service_name string The name of the service.
cancelled integer The number of queued service_starts that have been cancelled.
service_refs array of strings The services references of each service that has been cancelled. A service reference is returned by service_start.

Example

Request
https://ws-[cloudID].aculabcloud.net/service/v1/outbound/example-service/queue
Response
  {
    "service_name": "example-service",
    "cancelled": 12,
    "service_refs": [
        "34100b7a_1.1666875127.13791",
        "34100b7a_1.1666875127.13792",
        "34100b7a_1.1666875127.13793",
        "34100b7a_1.1666875127.13794",
        "34100b7a_1.1666875127.13795",
        "34100b7a_1.1666875127.13796",
        "34100b7a_1.1666875127.13797",
        "34100b7a_1.1666875127.13798",
        "34100b7a_1.1666875127.13799",
        "34100b7a_1.1666875127.13800",
        "34100b7a_1.1666875127.13801",
        "34100b7a_1.1666875127.13802"
    ]
  }