Skip to content

Departments

On this page, you will find descriptions of the API methods intended for working with departments for technicians from the Team section.

Department Management

Department List

You can retrieve a list of all team departments using the team/department/list method.

Request:
GET /v1/team/department/list
  ?search=<string>
  &offset=<number>
  &limit=<number>
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY
curl -G "https://api.getscreen.me/v1/team/department/list" \
  --data-urlencode "search=<string>" \
  --data-urlencode "offset=<number>" \
  --data-urlencode "limit=<number>" \
  -H "X-Api-Key: YOUR_API_KEY"
Parameter Type Description
search string Case-insensitive filter by department name.
offset number Offset for the first item in the list. Default value: 0
limit number Number of items in the list. Default value: 20; maximum value: 100
Response:
Example Response
Response Data
{
    "data": [ {
        "id": 1001,
        "name": "Mobile Support",
        "ldap": true,
        "worker": false,
        "create_time": 1788503133,
        "modify_time": 1788503133,
        "size": 2
    } ]
}
Name Type Description
data array List of departments.
data[].id number Internal department ID.
data[].name string Department name.
data[].ldap boolean Indicates whether the department was imported from an Identity Provider via DAP.
data[].worker boolean Indicates whether the department is intended for workplaces.
data[].create_time number Department creation time as a Unix timestamp.
data[].modify_time number Time of the department's last update as a Unix timestamp.
data[].size number Number of members in the department.

Department Info

To retrieve detailed information about a department, use the team/department/info method.

Request:
GET /v1/team/department/info
  ?id=<number>
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY
curl -G "https://api.getscreen.me/v1/team/department/info" \
  --data-urlencode "id=<number>" \
  -H "X-Api-Key: YOUR_API_KEY" \
Parameter Type Value
id number Internal department ID
Response:
Example Response
Response Data
{
    "data": {
        "id": 1001,
        "name": "Mobile Support",
        "ldap": false,
        "worker": false,
        "members": [ {
            "id": 1002,
            "email": "[email protected]"
        }, {
            "id": 1003,
            "email": "[email protected]"
        } ]
    },
    "status": 0
}
Name Type Description
data object Department data.
data.id number Internal department ID.
data.name string Department name.
data.ldap boolean Indicates whether the department was imported from an Identity Provider via LDAP.
data.worker boolean Indicates whether the department is intended for workplaces.
data.create_time number Department creation time as a Unix timestamp.
data.modify_time number Time of the department's last update as a Unix timestamp.
data.members array List of department members.
data.members[].id number Internal member ID.
data.members[].email string Member email address.
status number Result status. Possible values:
  • 0 - Department data found
  • 1 - Invalid request
  • 2 - Internal server error
  • 6 - Department not found
  • 8 - Access to the department is denied

Create Department

You can create a department within your team using the team/department/create method.

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

{
  "name": <string>,
  "worker": <boolean>
}
curl -X POST "https://api.getscreen.me/v1/team/department/create" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "name": <string>,
    "worker": <boolean>
  }'
Parameter Type Description
name string Department name.
worker boolean Indicates whether the department is intended for workplaces.
Response:
Example Response
Response Data
{
    "id": 1001,
    "status": 0
}
Name Type Description
id number Internal ID of the created department.
status number Result status. Possible values:
  • 0 — Department created successfully.
  • 1 — Invalid request data.
  • 6 — Insufficient permissions.

Update Department

You can update department details using the team/department/update method.

Request:
POST /v1/team/department/update
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY
{
  "id": <number>,
  "name": <string>
}
curl -X POST "https://api.getscreen.me/v1/team/department/update" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "id": <number>,
    "name": <string>
  }'
Parameter Type Description
id number Internal department ID.
name string Department name.
Response:
Example Response
Response Data
{
    "status": 0
}
Name Type Description
status number Result status. Possible values:
  • 0 — Data updated successfully.
  • 1 — Invalid request data.
  • 6 — Insufficient permissions.

Remove Department

You can delete a department using the team/department/remove method.

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

{
  "id": <number>
}
curl -X POST "https://api.getscreen.me/v1/team/department/remove" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "id": <number>
  }'
Parameter Type Description
id number Internal department ID.
Response:
Example Response
Response Data
{
    "status": 0
}
Name Type Description
status number Result status. Possible values:
  • 0 — Department deleted successfully.
  • 1 — Invalid request data.
  • 8 — Insufficient permissions.

Department Members

Add Member to Department

To add a technician account or pending invitation to a department, use the team/department/member/add method.

Request:
POST /v1/team/department/member/add
Host: https://api.getscreen.me
X-Api-Key: YOUR_API_KEY

{
  "id": <number>,
  "email": <string>
}
curl -X POST "https://api.getscreen.me/v1/team/department/member/add" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "id": <number>,
    "email": <string>
  }'
Parameter Type Description
id number Internal department ID.
email string Email address of the technician or pending invitation.
Response:
Example Response
Response Data
{
    "status": 0
}
Name Type Description
status number Result status. Possible values:
  • 0 — Member added successfully.
  • 1 — Invalid request data.
  • 2 — Internal server error.
  • 6 — Department or member not found.
  • 6 — Insufficient permissions.

Remove Member from Department

To remove a technician account or pending invitation from a department, use the team/department/member/remove method.

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

{
  "id": <number>,
  "email": <string>
}
curl -X POST "https://api.getscreen.me/v1/team/department/member/remove" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "id": <number>,
    "email": <string>
  }'
Parameter Type Description
id number Internal department ID.
email string Email address of the technician or pending invitation.
Response:
Example Response
Response Data
{
    "status": 0
}
Name Type Description
status number Result status. Possible values:
  • 0 — Member removed successfully.
  • 1 — Invalid request data.
  • 2 — Internal server error.
  • 6 — Department or member not found.
  • 6 — Insufficient permissions.