Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

GET users/meta

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns meta data information used by Users configuration.

Resource URL

http://{host}/api/2.0/users/meta/.format

Example Request

GET 

  1. http://44.235.52.211/api/2.0/users/meta/.json

{
    "Groups": {
        "1": "Administrators",
        "2": "Technicians",
        "3": "Viewers"
    }
}

 


 

GET users

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns a list of all Users configuration in the system.

Resource URL

http://{host}/api/2.0/users/.format

Example Request

GET 

  1. http://44.235.52.211/api/2.0/users/.json

[
    {
        "User": {
            "id": 1,
            "username": "Admin",
            "modified": "1612359795589",
            "created": "1611142282208",
            "last_login": "1612359795589",
            "group_id": 1
        }
    },
    {
        "User": {
            "id": 2,
            "username": "Tech",
            "modified": "1611142282208",
            "created": "1611142282208",
            "last_login": null,
            "group_id": 2
        }
    },
    {
        "User": {
            "id": 3,
            "username": "View",
            "modified": "1611142282208",
            "created": "1611142282208",
            "last_login": null,
            "group_id": 3
        }
    }
]

 


  

GET users/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns a single specific User configuration.

Resource URL

http://{host}/api/2.0/users/{id}/.format

Example Request

GET 

  1. http://44.235.52.211/api/2.0/users/1/.json

{
    "User": {
        "id": 1,
        "username": "Admin",
        "modified": "1612359795589",
        "created": "1611142282208",
        "last_login": "1612359795589",
        "group_id": 1
    }
}


POST users

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

POST

Adds a new User.

Resource URL

http://{host}/api/2.0/users/.format

Example Request

POST 

  1. http://44.235.52.211/api/2.0/users/.json

Body

{
    "User": {
        "username": "NEW_USER",
        "password": "password",
        "group_id": 3
    }
}

Response

{
    "User": {
        "id": 4,
        "username": "NEW_USER",
        "modified": "1619962757463",
        "created": "1619962757463",
        "last_login": null,
        "group_id": 3
    }
}

 


 

PUT users/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

PUT

Updates a single specific User information.

Resource URL

http://{host}/api/2.0/users/{id}/.format

Parameters

Parameter

Data Type

Description

1
(required)

integer

The ID of the desired User information to be updated.

Example Request

PUT 

  1. http://44.235.52.211/api/2.0/users/4/.json

Body

{
    "User": {
        "username": "EDIT_USER",
        "password": "newpassWord",
        "group_id": 2
    }
}

Response

{
    "User": {
        "id": 4,
        "username": "EDIT_USER",
        "modified": "1619962822452",
        "created": "1619962757463",
        "last_login": null,
        "group_id": 2
    }
}

 


 

DELETE users/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

DELETE

Deletes a single specific User.

Resource URL

http://{host}/api/2.0/users/{id}/.format

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired User to be deleted.

Example Request

DELETE 

  1. http://44.235.52.211/api/2.0/users/4/.json

{
    "success": true
}
  • No labels