# List metadata

List metadata for given incident, monitor, or other resources. This endpoint [supports pagination](https://betterstack.com/docs/uptime/api/pagination/).

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v3/metadata"
method = "GET"

[[query_param]]
name = "team_name"
description = "Filter metadata belonging to a specified team when using [global API token](https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-a-global-api-token)."
required = false
type = "string"

[[query_param]]
name = "owner_id"
description = "Resource to return metadata for. Metadata for all resources will be returned if omitted."
required = false
type = "string"

[[query_param]]
name = "owner_type"
description = "Type of resource to return metadata for. Accepted values: `Monitor`, `Heartbeat`, `Incident`, `WebhookIntegration`, `EmailIntegration`, `IncomingWebhook`, or `CallRouting`."
required = false
type = "string"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''Returns list of existing metadata'''
body = '''{
  "data": [
    {
      "id": "25",
      "type": "metadata",
      "attributes": {
        "key": "Key 1",
        "values": [{ "type": "String", "value": "Value 1" }, { "type": "String", "value": "Value 2" }]
        "team_name": "Testing",
        "owner_id": "2",
        "owner_type": "Monitor"
      }
    },
    {
      "id": "23",
      "type": "metadata",
      "attributes": {
        "key": "Key 2",
        "values": [{ "type": "Schedule", "item_id": 123, "name": "Secondary calendar" }],
        "team_name": "Testing",
        "owner_id": "30579",
        "owner_type": "WebhookIntegration"
      }
    }
  ],
  "pagination": {
    "first": "https://uptime.betterstack.com/api/v3/metadata?page=1",
    "last": "https://uptime.betterstack.com/api/v3/metadata?page=4",
    "prev": null,
    "next": "https://uptime.betterstack.com/api/v3/metadata?page=2"
  }
}'''
[/responses]

#### Example cURL 

```shell
[label Example]
curl --request GET \
  --url "https://uptime.betterstack.com/api/v3/metadata?owner_id=2&owner_type=Monitor" \
  --header 'authorization: Bearer $TOKEN'
```

[info]
#### Looking for the details of a specific parameter?
Explore [the list of all metadata API parameters](https://betterstack.com/docs/uptime/api/metadata-api-response-params/).
[/info]
