[COMMAND]

Fetching a List of Queues

The provisioning_request_list command can be used to fetch a list of queues, which may optionally be filtered and sorted by specific criteria. The data returned by this command is structured as a JSON array.

The table parameter can be used to request other types of data, either as well as or instead of queues.

Parameters

table
required
string

To fetch only queues, set this to "ut_operatorQueue".

To fetch data from more than one table, set this to a comma-separated list containing the name of each table needed.

only_active
optional
Boolean

If set to 1 (True), only active queues will be returned. This is the default value.

If set to 0 (False), all queues will be returned, including retired ones.

order_by
optional
number

Determines how the list should be sorted. Can be one of the following:

  • 0 (default): Ascending alphanumeric order, followed by the sequence field, followed by the id field.

  • 1: The id field. This will normally – but not always – reflect when the queues were created.

  • 2: The sequence field.

  • 3: The date of creation.

request_id
optional
string

If specified, this value will be returned as part of the response event. It can be used to help a calling application associate a request with its response.

external_id_type
optional
string

Each entry in the list may have been assigned an external_id, letting third parties identify it using their own methods. In this case, the entry will also have an external_id_type corresponding to that third party.

To view the external_id values in the list for a particular third party, specify their external_id_type here. Any queues with no external_id for that third party will return an empty string for that value instead.

Example Request

Copy
{"command":{"command_type":"provisioning_request_list", "table":"ut_operatorQueue", "only_active":0, "order_by":3}}

Responses

On Success:

A successful request will trigger a provisioning_list event, containing details of the request and an array of queues matching the request.

On Failure:

Failure to complete this command will cause a provisioning_error event, containing a description of what went wrong.