Skip to main content

Teams

List teams

List your organization’s teams.

In the URL below, you will need to substitute :id with the id value you retreived with the account endpoint:

GET /organizations/:id/teams

Parameters

Name Type Default Description
limit number 10 The number of items to be returned by page
page number 1 The page number
q string   The search regex in name and description fields
sort string   The sort order
curl \
  --request GET \
  --url 'https://api.hl2.com/panorama/v1/organizations/5a21805903e0870010c8f618/teams'

Response

The response array looks like the following (the order of the fields may vary):

[
  {
    "slug": "team",
    "name": "Team",
    "description": "Team description",
    "organizationId": "5a21805903e0870010c8f618",
    "id": "5a0ab0fca93bf300103f72d4"
  },
]

Create a team

Create a team for your organization.

In the URL below, you will need to substitute :id with the id value you retreived with the account endpoint:

POST /organizations/:id/teams

Input

Name Type Description
name string The team name (required)
description string The team description
curl \
  --request POST \
  --url 'https://api.hl2.com/panorama/v1/organizations/5a21805903e0870010c8f618/teams' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "team",
    "description": "team description"
  }'

Response

The response object looks like the following (the order of the fields may vary):

{
  "updatedAt": "2017-12-08T17:32:26.962Z",
  "createdAt": "2017-12-08T17:32:26.962Z",
  "slug": "team",
  "name": "team",
  "description": "team description",
  "organizationId": "5a21805903e0870010c8f618",
  "id": "5a2accaaf6922300103cc665"
}

Get a team

Get the details of one of your organization’s teams.

In the URL below, you will need to substitute :organizationId with the id value you retreived with the account endpoint, and :teamId with one of the IDs obtained using the “List teams” endpoint above:

GET /teams/:organizationId/:teamId

curl \
  --request GET \
  --url 'https://api.hl2.com/panorama/v1/teams/5a21805903e0870010c8f618/5a2accaaf6922300103cc665'

Response

The response object looks like the following (the order of the fields may vary):

{
  "updatedAt": "2017-12-08T17:32:26.962Z",
  "createdAt": "2017-12-08T17:32:26.962Z",
  "slug": "team",
  "name": "team",
  "description": "team description",
  "organizationId": "5a21805903e0870010c8f618",
  "id": "5a2accaaf6922300103cc665"
}

Update a team

In the URL below, you will need to substitute :organizationId with the id value you retreived with the account endpoint, and :teamId with one of the IDs obtained using the “List teams” endpoint above:

PUT /teams/:organizationId/:teamId

Input

Name Type Description
name string The team name (required)
description string The team description
curl \
  --request PUT \
  --url 'https://api.hl2.com/panorama/v1/teams/5a21805903e0870010c8f618/5a2accaaf6922300103cc665' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "team",
    "description": "description"
  }'

Response

The response object looks like the following (the order of the fields may vary):

{
  "updatedAt": "2017-12-08T18:03:47.186Z",
  "createdAt": "2017-12-08T17:32:26.962Z",
  "slug": "team",
  "name": "team",
  "description": "description",
  "organizationId": "5a21805903e0870010c8f618",
  "id": "5a2accaaf6922300103cc665"
}

Delete a team

In the URL below, you will need to substitute :organizationId with the id value you retreived with the account endpoint, and :teamId with one of the IDs obtained using the “List teams” endpoint above:

DELETE /teams/:organizationId/:teamId

curl \
  --request DELETE \
  --url 'https://api.hl2.com/panorama/v1/teams/5a21805903e0870010c8f618/5a2accaaf6922300103cc665'

Members

List team members

List members of the specified team.

In the URL below, you will need to substitute :organizationId with the id value you retreived with the account endpoint, and :teamId with one of the IDs obtained using the “List teams” endpoint above:

GET /teams/:organizationId/:teamId/members

Input
Name Type Default Description
limit number 10 The number of items to be returned by page
page number 1 The page number
sort string   The sort order
curl \
  --request GET \
  --url 'https://api.hl2.com/panorama/v1/teams/5a21805903e0870010c8f618/5a0aa9eea93bf300103f72d3/members'
Response

The response array looks like the following (the order of the fields may vary):

[
  {
    "gravatarURL": "https://s.gravatar.com/avatar/c7bad70bd93cf47f51c4af31621a2ff6",
    "type": "user",
    "username": "team-member",
    "id": "5a0aa9a82bc2e900104b1ef1"
  }
]

Add a team member

Add a member to the team. If the member was already in the team, behaves as though it has just been added (no error, 204 response code).

In the URL below, you will need to substitute :organizationId with the id value you retreived with the account endpoint, :teamId with one of the IDs obtained using the “List teams” endpoint above, and :memberId with one of the IDs obtained using the “List members” endpoint above:

PUT /teams/:organizationId/:teamId/members/:memberId

curl \
  --request PUT \
  --url 'https://api.hl2.com/panorama/v1/teams/5a21805903e0870010c8f618/5a0aa9eea93bf300103f72d3/members/5a0568cdcaecf49fa28f1d93'

Remove a team member

Remove a member from one of your organization’s teams. The member is still part of your organization, but no longer has access to the resources shared by the team.

In the URL below, you will need to substitute :organizationId with the id value you retreived with the account endpoint, :teamId with one of the IDs obtained using the “List teams” endpoint above, and :memberId with one of the IDs obtained using the “List members” endpoint above:

DELETE /teams/:organizationId/:teamId/members/:memberId

curl \
  --request DELETE \
  --url 'https://api.hl2.com/panorama/v1/teams/5a21805903e0870010c8f618/5a0aa9eea93bf300103f72d3/members/5a0568cdcaecf49fa28f1d93'

Applications

List team applications

List the applications of one of your organization’s teams.

In the URL below, you will need to substitute :organizationId with the id value you retreived with the account endpoint, and :teamId with one of the IDs obtained using the “List teams” endpoint above:

GET /teams/:organizationId/:teamId/applications

Input
Name Type Default Description
limit number 10 The number of items to be returned by page
page number 1 The page number
sort string   The sort order
curl \
  --request GET \
  --url 'https://api.hl2.com/panorama/v1/teams/5a21805903e0870010c8f618/5a0aa9eea93bf300103f72d3/applications'

The response array looks like the following (the order of the fields may vary):

[
  {
    "slug": "application-in-my-team",
    "name": "Application in my team",
    "description": "Application description",
    "organizationId": "5a21805903e0870010c8f618",
    "permission": "write",
    "id": "59aea982279b6000105a70e6"
  }
]

Add or update a team application

Add an application to one of your organization’s teams, or change the team application’s permission.

In the URL below, you will need to substitute :organizationId with the id value you retreived with the account endpoint, :teamId with one of the IDs obtained using the “List teams” endpoint above, and applicationId with one of the IDs returned by the applications endpoint:

PUT /teams/:organizationId/:teamId/applications/:applicationId

Parameters
Name Type Description
permission string The application permission for this team. Can be one of read, write (required)
curl \
  --request PUT \
  --url 'https://api.hl2.com/panorama/v1/teams/5a21805903e0870010c8f618/5a0aa9eea93bf300103f72d3/applications/598883ead5706100108f68fe' \
  --header 'Content-Type: application/json' \
  --data '{
    "permission": "read"
  }'

Remove a team application

Remove an application from one of your organization’s teams.

In the URL below, you will need to substitute :organizationId with the id value you retreived with the account endpoint, :teamId with one of the IDs obtained using the “List teams” endpoint above, and applicationId with one of the IDs returned by the applications endpoint:

DELETE /teams/:organizationId/:teamId/applications/:applicationId

curl \
  --request DELETE \
  --url 'https://api.hl2.com/panorama/v1/teams/5a21805903e0870010c8f618/5a0aa9eea93bf300103f72d3/applications/598883ead5706100108f68fe'