JSON API » routes » routes/list
Gets array of fields of routes.
Input parameters
Requires authentication, but no specific role privileges.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
called | String | Only return routes called prefix started with this string. Empty string for all. | No | Empty string. |
count | Integer | 1 to return a count, 0 to return full data. | No | 0 |
media | String | Only return routes with this media type. Empty string for all. | No | Empty string. |
outgroup | Integer | Only return routes in this outbound group. 0 for all. | No | 0 |
pages | Integer | 1 to return a reduced set of data for generating the pages select box, 0 to return full data. | No | 0 |
tag | String | Only return routes with this tag. Empty string for all. | No | Empty string. |
Responses
Code | Description |
---|---|
200 | Success. |
401 | The 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
Version | Changes |
---|---|
3.13 | Function added. |