Get metadata record

Returns one metadata record: a key and all its values on one resource.

GET https://incidents.betterstack.com/api/v4/metadata/{metadata_id}

URL parameters

metadata_id
required string

Headers

Authorization
required string
200

Response body

{
  "data": {
    "id": "25",
    "type": "metadata",
    "attributes": {
      "key": "Owner",
      "values": [
        {
          "type": "Team",
          "item_id": "t123",
          "name": "Platform team"
        }
      ],
      "team_name": "Testing",
      "owner_id": "2",
      "owner_type": "Monitor"
    },
    "relationships": {
      "owner": {
        "data": {
          "id": "2",
          "type": "monitor"
        }
      }
    }
  }
}
404

Response body

{
  "errors": "Resource type Metadata with id = 25 was not found"
}

Response attributes

id
string
type
string
attributes.key
string
attributes.values
array of objects
attributes.values[].type
string
attributes.values[].value
string
attributes.values[].item_id
integer or string
attributes.values[].name
string or null
attributes.values[].email
string
attributes.team_name
string
attributes.owner_id
string
attributes.owner_type
string
relationships.owner
object

Example cURL

Example
curl --request GET \
  --url https://incidents.betterstack.com/api/v4/metadata/25 \
  --header "Authorization: Bearer $TOKEN"