Full API and Integration Documentation

Page Profile

Page access groups allow you to create a grouping of components, metrics and people who can see your status page via a login, customizing the status page for their needs.

You will need StatusPage to enable access control for your status page before these API endpoints have any effect on your status page.

Retrieve a list of groups
ENDPOINT
  GET /pages/[page_id]/page_access_groups.json

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/page_access_groups.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074"


RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  [
    {
      "page_id": "r5363pgkgx2h",
      "name": "TestGroup",
      "created_at": "2015-11-02T19:02:15.402Z",
      "updated_at": "2015-11-06T19:32:52.816Z",
      "external_identifier": "abc",
      "id": "v5f9tstmnlbq",
      "component_ids": [
        "d5n6kct9sv3g",
        "gshv62srt25d",
        "n7ck661lcddn"
      ],
      "metric_ids": [
        "1bkjm5kvvwlb"
      ],
      "page_access_user_ids": [
        "4dk8tdm6cdyf"
      ]
    }, ...
  ]

Create a group that will define what and who can view elements of your status page
ENDPOINT
  POST /pages/[page_id]/page_access_groups.json

MUTABLE ATTRIBUTES
  page_access_group[name] - The name the group (required)
  page_access_group[external_identifier] - A unique string that can be used to associate this group with an external group (optional)
  page_access_group[page_access_user_ids][] - Array of Page Access User ids that the created group contain
  page_access_group[component_ids][] - Array of component ids that the created group will be able to view
  page_access_group[metric_ids][] - Array of metric ids that the created group will be able to view

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/page_access_groups.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X POST \
    -d "page_access_group[name]=TestGroup&page_access_group[external_identifier]=abc&page_access_group[component_ids][]=d5n6kct9sv3g&page_access_group[component_ids][]=gshv62srt25d&page_access_group[metric_ids][]=1bkjm5kvvwlb&page_access_group[page_access_user_ids][]=4dk8tdm6cdyf"


RESPONSE CODES
  201 - Page access group successfully created.

SAMPLE RESPONSE
  {
    "page_id": "r5363pgkgx2h",
    "name": "TestGroup",
    "created_at": "2015-11-02T19:02:15.402Z",
    "updated_at": "2015-11-06T19:32:52.816Z",
    "external_identifier": "abc",
    "id": "v5f9tstmnlbq",
    "component_ids": [
      "d5n6kct9sv3g",
      "gshv62srt25d"
    ],
    "metric_ids": [
      "1bkjm5kvvwlb"
    ],
    "page_access_user_ids": [
      "4dk8tdm6cdyf"
    ]
  }

Change information for a group
ENDPOINT
  PATCH /pages/[page_id]/page_access_groups/[page_access_group_id].json

MUTABLE ATTRIBUTES
  page_access_group[name] - The name the group (required)
  page_access_group[external_identifier] - A unique string that can be used to associate this group with an external group (optional)
  page_access_group[page_access_user_ids][] - Array of Page Access User ids that the created group contain
  page_access_group[component_ids][] - Array of component ids that the created group will be able to view
  page_access_group[metric_ids][] - Array of metric ids that the created group will be able to view

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/page_access_group/v5f9tstmnlbq.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X PATCH \
    -d "page_access_group[name]=TestGroup&page_access_group[external_identifier]=abc&page_access_group[component_ids][]=d5n6kct9sv3g&page_access_group[component_ids][]=gshv62srt25d&page_access_group[metric_ids][]=1bkjm5kvvwlb&page_access_group[page_access_user_ids][]=4dk8tdm6cdyf"


RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  {
    "page_id": "r5363pgkgx2h",
    "name": "TestGroup",
    "created_at": "2015-11-02T19:02:15.402Z",
    "updated_at": "2015-11-06T19:32:52.816Z",
    "external_identifier": "abc",
    "id": "v5f9tstmnlbq",
    "component_ids": [
      "d5n6kct9sv3g",
      "gshv62srt25d"
    ],
    "metric_ids": [
      "1bkjm5kvvwlb"
    ],
    "page_access_user_ids": [
      "4dk8tdm6cdyf"
    ]
  }

Delete a group
ENDPOINT
  DELETE /pages/[page_id]/page_access_groups/[page_access_group_id].json
    
MUTABLE ATTRIBUTES
  page_access_group[orphan_mode] - specifies what to do with any associated PageAccessUsers that are members of the group. Possible values are: 'destroy' (deletes the users), 'preserve' (unpacks access levels onto each user) and 'empty' (keeps the users but deletes all permissions) (optional, defaults to EMPTY)

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/page_access_groups/v5f9tstmnlbq.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X DELETE \
    -d "page_access_group[orphan_mode]=destroy"

RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  {
    "page_id": "r5363pgkgx2h",
    "name": "TestGroup",
    "created_at": "2015-11-02T19:02:15.402Z",
    "updated_at": "2015-11-06T19:32:52.816Z",
    "external_identifier": "abc",
    "id": "v5f9tstmnlbq",
    "component_ids": [
      "d5n6kct9sv3g",
      "gshv62srt25d"
    ],
    "metric_ids": [
      "1bkjm5kvvwlb"
    ],
    "page_access_user_ids": [
      "4dk8tdm6cdyf"
    ]
  }

Assign components to a page access group (overwrites existing components)
ENDPOINT
  POST /pages/[page_id]/page_access_groups/[page_access_group_id]/components.json

MUTABLE ATTRIBUTES
  component_ids[] - Array of component ids that the group will ba able to view

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/page_access_groups/v5f9tstmnlbq/components.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X POST \
    -d "component_ids[]=d5n6kct9sv3g&component_ids[]=gshv62srt25d"


RESPONSE CODES
  200 - Successful call
  {
    "page_id": "r5363pgkgx2h",
    "name": "TestGroup",
    "created_at": "2015-11-02T19:02:15.402Z",
    "updated_at": "2015-11-06T19:32:52.816Z",
    "external_identifier": "abc",
    "id": "v5f9tstmnlbq",
    "component_ids": [
      "d5n6kct9sv3g",
      "gshv62srt25d"
    ],
    "metric_ids": [
      "1bkjm5kvvwlb"
    ],
    "page_access_user_ids": [
      "4dk8tdm6cdyf"
    ]
  }

Assign components to a page access group (adds new components to a group)
ENDPOINT
  PATCH /pages/[page_id]/page_access_groups/[page_access_group_id]/components.json

MUTABLE ATTRIBUTES
  component_ids[] - Array of component ids that the group will ba able to view

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/page_access_groups/v5f9tstmnlbq/components.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X PATCH \
    -d "component_ids[]=d5n6kct9sv3g&component_ids[]=gshv62srt25d"


RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  {
    "page_id": "r5363pgkgx2h",
    "name": "TestGroup",
    "created_at": "2015-11-02T19:02:15.402Z",
    "updated_at": "2015-11-06T19:32:52.816Z",
    "external_identifier": "abc",
    "id": "v5f9tstmnlbq",
    "component_ids": [
      "d5n6kct9sv3g",
      "gshv62srt25d"
    ],
    "metric_ids": [
      "1bkjm5kvvwlb"
    ],
    "page_access_user_ids": [
      "4dk8tdm6cdyf"
    ]
  }

Remove all components from a page access group
ENDPOINT
  DELETE /pages/[page_id]/page_access_groups/[page_access_group_id]/components.json

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/page_access_groups/v5f9tstmnlbq/components.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X DELETE

RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  {
    "page_id": "r5363pgkgx2h",
    "name": "TestGroup",
    "created_at": "2015-11-02T19:02:15.402Z",
    "updated_at": "2015-11-06T19:32:52.816Z",
    "external_identifier": "abc",
    "id": "v5f9tstmnlbq",
    "component_ids": [
      "d5n6kct9sv3g",
      "gshv62srt25d"
    ],
    "metric_ids": [
      "1bkjm5kvvwlb"
    ],
    "page_access_user_ids": [
      "4dk8tdm6cdyf"
    ]
  }

Remove a component from a page access group

ENDPOINT
  DELETE /pages/[page_id]/page_access_groups/[page_access_group_id]/components/[component_id].json

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/page_access_groups/v5f9tstmnlbq/components/gshv62srt25d.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X DELETE

RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  {
    "page_id": "r5363pgkgx2h",
    "name": "TestGroup",
    "created_at": "2015-11-02T19:02:15.402Z",
    "updated_at": "2015-11-06T19:32:52.816Z",
    "external_identifier": "abc",
    "id": "v5f9tstmnlbq",
    "component_ids": [
      "d5n6kct9sv3g",
    ],
    "metric_ids": [
      "1bkjm5kvvwlb"
    ],
    "page_access_user_ids": [
      "4dk8tdm6cdyf"
    ]
  }

Assign page access groups to a component
ENDPOINT
  POST /pages/[page_id]/components/[component_id]/page_access_groups.json

MUTABLE ATTRIBUTES
  page_access_group_ids[] - Array of page access group ids for groups that can access the referenced component

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/components/v5f9tstmnlbq/page_access_groups.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X POST \
    -d "page_access_group_ids[]=fmzfm7ch1qps&page_access_group_ids[]=trrz86118fqlx"


RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  {
    "created_at": "2013-03-05T20:50:42Z",
    "id": "ftgks51sfs2d",
    "name": "API",
    "position": 1,
    "status": "major_outage",
    "updated_at": "2013-03-05T22:44:21Z"
  }

Remove a component from all page access groups
ENDPOINT
  DELETE /pages/[page_id]/components/[component_id]/page_access_groups.json

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/components/ftgks51sfs2d/page_access_groups.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X DELETE

RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  {
    "created_at": "2013-03-05T20:50:42Z",
    "id": "ftgks51sfs2d",
    "name": "API",
    "position": 1,
    "status": "major_outage",
    "updated_at": "2013-03-05T22:44:21Z"
  }