JSON API » machines » machines/get

Gets the fields of a machine.

Input parameters

Requires authentication and the system role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of machine to get.Yes, unless server is specified.0
serverStringHost name of machine to get.Yes, unless id is specified.Empty string.

Either the id or the server must be specified, but not both.

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The machine does not exist.

Data returned

Fields of machine.

Example: With id

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

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

Change history

VersionChanges
3.13Function added.