Jump to: navigation, search

Filtering

This is part of the API Basics section of the Web Services API.

Overview

You can filter objects using request parameters when doing a list request.

Example 1

Request

GET .../api/v2/queues?fields=id,name,channel&channel=voice
Response:
{
	"statusCode":0,
	"queues":[{
		"id":<queue_1_id>,
		"name":<queue_1_name>,
		"channel":"voice"
	},
	...
	{
		"id":<queue_N_id>,
		"name":<queue_N_name>,
		"channel":"voice"
	}]
}
Important
The filter parameter must be the same as the name of the corresponding object field.

Example 2

You may also combine several filtering parameters to make even more constraints.

Request

GET .../api/v2/system/routing-templates?fields=*&channel=voice&version=1.0.0
Response:
{
	"statusCode":0,
	"routingTemplates":[{
		"id":"00_RouteToSpecDestination",
		"name":"Route Call to Specified Destination",
		"description":"Routes calls to a skill or queue",
		"version":"1.0.0",
		"channel":"voice",
		"dependencies":["media", "destination"],
		"enabled":true,
		"schema": [...]
	},
	...
	{
		"id":"07_SegmentCallerRouteToSpecDestination",
		"name":"Play Greeting, Segment Caller, and Route To Specified Destination",
		"description":"Plays a user-configured greeting, ...",
		"version":"1.0.0",
		"channel":"voice",
		"dependencies":["media", "destination", "data_record_type"],
		"enabled":false,
		"schema": [...]
	}]
}
Important
Some list requests may require mandatory filter parameters.
This page was last edited on February 15, 2024, at 19:11.
Comments or questions about this documentation? Contact us for support!