JSON API » configs » configs/emergency/codes/list
Gets array of fields of configured emergency location codes for the requested language. Requires the "Enable emergency location code" configuration setting to be enabled, and the codes to be configured under /etc/enswitch/emergency_location_codes.
Input parameters
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
language | String | Language code. | No | Default language. |
Responses
Code | Description |
---|---|
200 | Success. |
204 | Request successful, but emergency location codes not configured. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
Data returned
An array of fields, corresponding to the configured location codes.
Example: With required parameters, and emergency location codes configured
http://enswitch.example.com/api/json/configs/emergency/codes/list/?auth_username=user;auth_password=password{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "Location A":"100" }, { "Location B":"101" } ] }
Example: With required parameters, but emergency location codes not configured
http://enswitch.example.com/api/json/configs/emergency/codes/list/?auth_username=user;auth_password=password{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
3.13 | Function added. |