JSON API » classes » classes/get

Gets the fields of a number class.

Input parameters

Authentication is optional.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.NoNone.
auth_passwordStringAuthentication password.NoNone.
idIntegerID of number class to get.Yes

If no authentication is provided, only number classes that may be chosen in signup may be accessed.

Responses

CodeDescription
200Success.
404The number class does not exist, or you didn't provide authentication and it cannot be chosen in signup.

Data returned

Fields of number class.

Example: With authentication

http://enswitch.example.com/api/json/classes/get/?auth_username=user;auth_password=password;id=123

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123, "name":"example", ... } }

Example: Without authentication

http://enswitch.example.com/api/json/classes/get/?id=123

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123, "name":"example", ... } }

Change history

VersionChanges
3.13Function added.