Teams

Teams group users inside a company, for example helpdesk resolver groups. Tickets can be assigned to a team and members can be added or removed.

The Team Model

A team of users inside a company, such as a helpdesk resolver group. Members are the users linked to it.

Scheme

  • Name
    id
    Type
    integer
    Description
    Unique identifier
  • Name
    companyId
    Type
    integer required
    Description
    The company the team belongs to. Cannot be changed
  • Name
    name
    Type
    string required
    Description
    Team name
  • Name
    uniqueId
    Type
    string
    Description
    External reference
  • Name
    disabled
    Type
    boolean
    Description
    Whether the team is switched off
  • Name
    attributes
    Type
    object
    Description
    Custom team attributes

The Team Member Model

A member of a team: only what is needed to show who it is.

Scheme

  • Name
    id
    Type
    integer
    Description
    User identifier
  • Name
    name
    Type
    string
    Description
    User name
  • Name
    email
    Type
    string
    Description
    User email

GET/teams

Fetch a list of Teams

Teams (for example helpdesk resolver groups) of the companies the user can see, sorted by name. Access follows the company.

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Query Parameters

  • Name
    companyId
    Type
    integer
    Description
    Only records of this company
  • Name
    keyword
    Type
    string
    Description
    Search keyword filter (name and uniqueId)
  • Name
    limit
    Type
    integer
    Description
    Limit the number of returned results
  • Name
    offset
    Type
    integer
    Description
    Offset for pagination

Response schema

  • Name
    application/json
    Type
    schema
    Description

Responses

  • Name
    200
    Type
    success
    Description
    Team
  • Name
    400
    Type
    error
    Description
    Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
  • Name
    401
    Type
    error
    Description
    Unauthorized

Request

GET
/teams
curl --location 'https://gw.onemap8.com/api/teams?companyId=<integer>&keyword=<string>&limit=<integer>&offset=<integer>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

[
{
  "id": 0,
  "companyId": 0,
  "name": "<string>",
  "uniqueId": "<string>",
  "disabled": true,
  "attributes": {}
}
]

POST/teams

Create a Team

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Request body schema

  • Name
    application/json
    Type
    schema
    Description

Body schema

  • Name
    id
    Type
    integer
    Description
    Unique identifier
  • Name
    companyId
    Type
    integer required
    Description
    The company the team belongs to. Cannot be changed
  • Name
    name
    Type
    string required
    Description
    Team name
  • Name
    uniqueId
    Type
    string
    Description
    External reference
  • Name
    disabled
    Type
    boolean
    Description
    Whether the team is switched off
  • Name
    attributes
    Type
    object
    Description
    Custom team attributes

Response schema

  • Name
    application/json
    Type
    schema
    Description

Responses

  • Name
    200
    Type
    success
    Description
    Team
  • Name
    400
    Type
    error
    Description
    Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
  • Name
    401
    Type
    error
    Description
    Unauthorized

Request

POST
/teams
curl --location --request POST 'https://gw.onemap8.com/api/teams' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": 0,
"companyId": 0,
"name": "<string>",
"uniqueId": "<string>",
"disabled": true,
"attributes": {}
}'

Response

{
"id": 0,
"companyId": 0,
"name": "<string>",
"uniqueId": "<string>",
"disabled": true,
"attributes": {}
}

GET/teams/{id}

Fetch a Team

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description

Response schema

  • Name
    application/json
    Type
    schema
    Description

Responses

  • Name
    200
    Type
    success
    Description
    Team
  • Name
    400
    Type
    error
    Description
    Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
  • Name
    401
    Type
    error
    Description
    Unauthorized
  • Name
    404
    Type
    error
    Description
    Not found

Request

GET
/teams/{id}
curl --location 'https://gw.onemap8.com/api/teams/<integer>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

{
"id": 0,
"companyId": 0,
"name": "<string>",
"uniqueId": "<string>",
"disabled": true,
"attributes": {}
}

PUT/teams/{id}

Update a Team

The id in the body must be the id in the path. A team cannot be moved to another company.

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description

Request body schema

  • Name
    application/json
    Type
    schema
    Description

Body schema

  • Name
    id
    Type
    integer
    Description
    Unique identifier
  • Name
    companyId
    Type
    integer required
    Description
    The company the team belongs to. Cannot be changed
  • Name
    name
    Type
    string required
    Description
    Team name
  • Name
    uniqueId
    Type
    string
    Description
    External reference
  • Name
    disabled
    Type
    boolean
    Description
    Whether the team is switched off
  • Name
    attributes
    Type
    object
    Description
    Custom team attributes

Response schema

  • Name
    application/json
    Type
    schema
    Description

Responses

  • Name
    200
    Type
    success
    Description
    Team
  • Name
    400
    Type
    error
    Description
    Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
  • Name
    401
    Type
    error
    Description
    Unauthorized

Request

PUT
/teams/{id}
curl --location --request PUT 'https://gw.onemap8.com/api/teams/<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": 0,
"companyId": 0,
"name": "<string>",
"uniqueId": "<string>",
"disabled": true,
"attributes": {}
}'

Response

{
"id": 0,
"companyId": 0,
"name": "<string>",
"uniqueId": "<string>",
"disabled": true,
"attributes": {}
}

DELETE/teams/{id}

Delete a Team

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description

Responses

  • Name
    204
    Type
    success
    Description
    No content
  • Name
    400
    Type
    error
    Description
    Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
  • Name
    401
    Type
    error
    Description
    Unauthorized
  • Name
    404
    Type
    error
    Description
    Not found

Request

DELETE
/teams/{id}
curl --location --request DELETE 'https://gw.onemap8.com/api/teams/<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

No content

GET/teams/{id}/members

Fetch the members of a Team

Only id, name and email of each member are returned.

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description

Response schema

  • Name
    application/json
    Type
    schema
    Description

Responses

  • Name
    200
    Type
    success
    Description
    TeamMember
  • Name
    400
    Type
    error
    Description
    Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
  • Name
    401
    Type
    error
    Description
    Unauthorized
  • Name
    404
    Type
    error
    Description
    Not found

Request

GET
/teams/{id}/members
curl --location 'https://gw.onemap8.com/api/teams/<integer>/members' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

[
{
  "id": 0,
  "name": "<string>",
  "email": "<string>"
}
]

PUT/teams/{id}/members/{userId}

Add a member to a Team

Adding a user who is already a member is harmless. The caller must be able to manage that user. The same link can be made with the permissions endpoint.

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description
  • Name
    userId
    Type
    integer required
    Description

Responses

  • Name
    204
    Type
    success
    Description
    No content
  • Name
    400
    Type
    error
    Description
    Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
  • Name
    401
    Type
    error
    Description
    Unauthorized
  • Name
    404
    Type
    error
    Description
    Not found

Request

PUT
/teams/{id}/members/{userId}
curl --location --request PUT 'https://gw.onemap8.com/api/teams/<integer>/members/<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

No content

DELETE/teams/{id}/members/{userId}

Remove a member from a Team

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description
  • Name
    userId
    Type
    integer required
    Description

Responses

  • Name
    204
    Type
    success
    Description
    No content
  • Name
    400
    Type
    error
    Description
    Bad request. Invalid input, or the user has no access to the company (the server answers 400 with a text message)
  • Name
    401
    Type
    error
    Description
    Unauthorized
  • Name
    404
    Type
    error
    Description
    Not found

Request

DELETE
/teams/{id}/members/{userId}
curl --location --request DELETE 'https://gw.onemap8.com/api/teams/<integer>/members/<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

No content