JSON API » routes » routes/list

Gets array of fields of routes.

Input parameters

Requires authentication, but no specific role privileges.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
calledStringOnly return routes called prefix started with this string. Empty string for all.NoEmpty string.
not_calledStringOnly return routes called prefix not started with this string. Empty string for all.NoEmpty string.
containsStringOnly return routes called prefix contains this string. Empty string for all.NoEmpty string.
not_containsStringOnly return routes called prefix not contains this string. Empty string for all.NoEmpty string.
countInteger1 to return a count, 0 to return full data.No0
mediaStringOnly return routes with this media type. Empty string for all.NoEmpty string.
outgroupIntegerOnly return routes in this outbound group. 0 for all.No0
pagesInteger1 to return a reduced set of data for generating the pages select box, 0 to return full data.No0
tagStringOnly return routes with this tag. Empty string for all.NoEmpty string.

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.

Data returned

An array of fields, corresponding to the rows of the routes table in the database.

Example: With required parameters

http://enswitch.example.com/api/json/routes/list/?auth_username=user;auth_password=password

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":1, "called_prefix":"012", ... }, { "id":2, "called_prefix":"013", ... } ] }

Change history

VersionChanges
4.3Added new filter parameters: not_called, contains, not_contains.
3.13Function added.