JSON API » people » people/get

Gets the fields of a person.

Input parameters

Requires authentication and the user role privilege, unless check=1.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes, unless check=1.None.
auth_passwordStringAuthentication password.Yes, unless check=1.None.
checkInteger1 to just check if the person exists, 0 to return full data.No0
emailStringEmail address of person to get.NoEmpty string.
idIntegerID of person to get.No0
usernameStringUser name of person to get.No

One of email, id, or username must be specified. If the system is not configured to require unique email addresses, use of the email parameter is not recommended.

Responses

CodeDescription
200Success.
400One of email, id, or username must be specified.
401The authentication details provided are invalid.
402Your role does not allow this.
404The person does not exist, or you do not have permission to view them.
409Multiple persons exist with the same email.

Data returned

Fields of person.

Example: With ID

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

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123, "username":"user@example.com", ... } }

Change history

VersionChanges
3.14Search criteria order changed: first the id is searched for, then the username and lastly the email. If more than one users are found an error 409 is returned.
3.13Function added.