Skip to main content

Organization

Get your organization details

To get extra details about your organization which are not returned by the account endpoint, use the organizations endpoint.

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

GET /organizations/:id

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

Response

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

{
  "updatedAt": "2017-12-01T16:16:25.984Z",
  "createdAt": "2017-12-01T16:16:25.984Z",
  "memberCount": 13,
  "id": "5a21805903e0870010c8f618",
  "role": "owner",
  "email": "org@org.com",
  "name": "Organization name",
  "type": "organization",
  "username": "organization",
  "gravatarURL": "https://s.gravatar.com/avatar/b94308dd4591117626fd18796073be44",
  "disabled": false
}

Update your organization details

To update your organization, use the same endpoint as above, but with the PUT method, and a JSON payload containing the fields described below.

You will need to pass the id you retreived with the account endpoint as the last part of the URL:

PUT /organizations/:id

Request body

Name Type Description
email string The organization email (required)
name string The organization display name
username string The organization username (required)
curl \
  --request PUT \
  --url 'https://api.hl2.com/panorama/v1/organizations/5a21805903e0870010c8f618' \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "foo@org.com",
    "username": "foo"
  }'

Response

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

{
  "email": "foo@org.com",
  "type": "organization",
  "username": "foo",
  "createdAt": "2017-11-14T12:00:54.087Z",
  "gravatarURL": "https://s.gravatar.com/avatar/98d8fdffc7d0ef6e96b5e9f23ba3ecde",
  "updatedAt": "2017-12-01T17:52:31.336Z",
  "disabled": false,
  "id": "5a21805903e0870010c8f618",
  "role": "owner"
}

Members

List members

List all users who are members of your organization.

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

GET /organizations/:id/members

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 username and name fields
role string   Filter members by their role. Can be either owner or member
sort string   The sort order
curl \
  --request GET \
  --url 'https://api.hl2.com/panorama/v1/organizations/5a21805903e0870010c8f618/members'

Response

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

[
    {
        "username": "jnewman",
        "type": "user",
        "gravatarURL": "https://s.gravatar.com/avatar/d3f2cb1ba8a8cb98b1b072df18cdc3cb",
        "name": "Josh Newman",
        "id": "5a0568cbcaecf49fa28f1cc4",
        "role": "owner"
    },
    {
        "gravatarURL": "https://s.gravatar.com/avatar/dff35f920f803696f2c7ba06cb224c9c",
        "type": "user",
        "username": "snewman",
        "id": "5a0aa9492bc2e900104b1ef0",
        "role": "member"
    }
]

Add or update a member

Add a member to your organization, or update an existing member.

In the URL below, you will need to substitute :id with the id value you retreived with the account endpoint, and :memberId with one of the id values you retrieved either with the “List members” endpoint above (to update a member), or with the “List all user accounts” endpoint (to add a member):

PUT /organizations/:id/members/:memberId

Input

Name Type Description
role string The member’s role. Can be either owner or member. Defaults to member when adding a new member
curl \
  --request PUT \
  --url 'https://api.hl2.com/panorama/v1/organizations/5a21805903e0870010c8f618/members/58cf9e4eecc19d5547bec411' \
  --header 'Content-Type: application/json' \
  --data '{
    "role": "member"
  }'

Remove a member

Remove a member from your organization. This will also remove the member from all the organization’s teams and they will no longer have access to any of the organization’s resources.

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

DELETE /organizations/:id/members/:memberId

curl \
  --request DELETE \
  --url 'https://api.hl2.com/panorama/v1/organizations/5a21805903e0870010c8f618/members/58cf9e4eecc19d5547bec411'