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

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
languageStringLanguage code.NoDefault language.

Responses

CodeDescription
200Success.
204Request successful, but emergency location codes not configured.
401The authentication details provided are invalid.
402Your 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

VersionChanges
3.13Function added.