List catalog relations

List the relations in your on-call catalog, such as your services or teams.

GET https://incidents.betterstack.com/api/v3/catalog/relations
page integer

Page to return, starting at 1.

per_page integer default: 50

Results per page. Maximum 250.

team_id string

Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.

Authorization string required

Bearer $TOKEN

Results are paginated

Use pagination.next and pagination.prev to move through pages or jump to a specific one using page and per_page. See Pagination.

200 OK
{
  "data": [
    {
      "id": "123456789",
      "type": "catalog_relation",
      "attributes": {
        "name": "Team",
        "description": "Catalog of organization teams",
        "match_mode": "any",
        "records_count": 12,
        "attributes": [
          {
            "id": "56",
            "name": "Service",
            "primary": true,
            "position": 0
          },
          {
            "id": "57",
            "name": "Owner",
            "primary": false,
            "position": 1000
          }
        ]
      }
    }
  ],
  "pagination": {
    "first": "https://incidents.betterstack.com/api/v3/catalog/relations?page=1",
    "last": "https://incidents.betterstack.com/api/v3/catalog/relations?page=1",
    "prev": null,
    "next": null,
    "total_count": 1
  }
}

Returns the list of catalog relations.

id string

The ID of the catalog relation.

type string

Always catalog_relation.

name string

Catalog relation name.

description string or null

What this catalog relation describes.

match_mode string

How an incident is matched to a record when the relation has several primary attributes.
Valid values:
any: Matches a record when any primary attribute matches.
all: Matches a record when every primary attribute matches.

records_count integer

Number of catalog records in this catalog relation.

attributes array of objects

The relation's attributes, in the order the web app shows them as columns. List primary attributes first, since primary attributes always come before the others. Required on create, and at least one must be primary. An update that sends attributes replaces all of them, and any attribute you leave out is removed, along with its values in every record. Leave attributes out of an update to keep the attributes as they are.

attributes[].name string

Attribute name. Names must be unique within the relation.

attributes[].primary boolean

Whether records are matched by this attribute. Defaults to false.

attributes[].id string

ID of an existing attribute to keep. Leave it out to keep the attribute with the same name, or to add a new one.

attributes[].position integer

Display order, set by the order of the list. Primary attributes count from 0 and added attributes from 1000.

pagination.first string

The URL of the first page of results.

pagination.last string

The URL of the last page of results.

pagination.prev string or null

The URL of the previous page, or null on the first page.

pagination.next string or null

The URL of the next page, or null on the last page.

pagination.total_count integer

How many results the whole list holds, across every page.

Example cURL

List catalog relations
curl --request GET \
  --url https://incidents.betterstack.com/api/v3/catalog/relations \
  --header "Authorization: Bearer $TOKEN"