Skip to content

Groups

On this page, you will find descriptions of the API methods intended for working with group of devices from the Permanent Access section.

Group List

You can get a list of all account groups using the groups/list method.

Device Grouping

Learn more about managing device groups in the guide Device Grouping.

Request:
GET /v1/groups/list
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY
curl -G "https://api.getscreen.me/v1/groups/list" \
  -H "X-Api-Key: YOUR_API_KEY" \
Response:
Example Response
Response Data
{
    "data":[ {
        "id":1001,
        "name":"Los Angeles"
    },{
        "id":1002,
        "name":"Chicago"
    },{
        "id":1003,
        "name":"New York"
    }, ... ]
}
Name Type Description
id number Internal group identifier
name string Group name

Insert Device to Group

You can add a device to a group using the groups/agent/insert method.

Request:
POST /v1/groups/agent/insert
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY

{
  "id": <number>,
  "agent_id": <number>
}
curl -X POST "https://api.getscreen.me/v1/groups/agent/insert" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "id": <number>,
    "agent_id": <number>
  }'
Parameter Type Value
id number Internal system group ID
agent_id number Internal system device ID
Response:
Example Response
Response Data
{
    "status": 0
}
Name Type Description
status number Result status. Possible values:
  • 0 - The device was successfully added to the group
  • 2 - Internal server error
  • 6 - Group or device not found
  • 8 - Insufficient permissions

Remove Device from Group

You can remove a device from a group using the groups/agent/remove method.

Request:
POST /v1/groups/agent/remove
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY

{
  "agent_id": <number>
}
curl -X POST "https://api.getscreen.me/v1/groups/agent/remove" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "agent_id": <number>
  }'
Parameter Type Value
agent_id number Internal system device ID
Response:
Example Response
Response Data
{
    "status": 0
}
Name Type Description
status number Result status. Possible values:
  • 0 - Device was successfully removed from the group
  • 2 - Internal server error
  • 6 - Device not found
  • 8 - Insufficient permissions

Create Group

You can create a new group using the groups/create method.

Request:
POST /v1/groups/create
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY

{
  "name": <string>,
  "order": <number>
}
curl -X POST "https://api.getscreen.me/v1/groups/create" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "name": <string>,
    "order": <number>
  }'
Parameter Type Value
name string Name of the group to be created
order number Position of the created group in the list
Response:
Example Response
Response Data
{
    "status": 0,
    "id": 1001
}
Name Type Description
status number Result status. Possible values:
  • 0 - Group was successfully created
  • 2 - Internal server error
  • 8 - Insufficient permissions
id number Internal system identifier of the created group.

Edit Group

You can modify group properties using the groups/edit method.

Request:
POST /v1/groups/edit
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY

{
  "id": <number>,
  "name": <string>,
  "order": <number>
}
curl -X POST "https://api.getscreen.me/v1/groups/edit" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "id": <number>,
    "name": <string>,
    "order": <number>
  }'
Parameter Type Value
id number Internal group identifier
name string New group name
order number New position of the group in the list
Response:
Example Response
Response Data
{
    "status": 0
}
Name Type Description
status number Result status. Possible values:
  • 0 - Group was successfully updated
  • 2 - Internal server error
  • 6 - Group not found
  • 8 - Insufficient permissions

Remove Group

You can remove a group using the groups/remove method.

Request:
POST /v1/groups/remove
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY

{
  "id": <number>
}
curl -X POST "https://api.getscreen.me/v1/groups/remove" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "id": <number>
  }'
Parameter Type Value
id number Internal group identifier
Response:
Example Response
Response Data
{
    "status": 0
}
Name Type Description
status number Result status. Possible values:
  • 0 - Group was successfully removed
  • 2 - Internal server error
  • 6 - Group not found
  • 8 - Insufficient permissions