Remove catalog records
Delete records from a catalog relation by their primary attribute values, or send all: true to delete every record. The relation and its attributes stay.
The ID of the catalog relation the catalog record belongs to.
Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.
Bearer $TOKEN
application/json
Records to delete, up to 100. Give each record by its primary attribute values only. A record is deleted when its primary values match exactly. Send either records or all.
The record's primary attribute values. When you leave out a primary attribute, only a record with no value for it matches.
A primary attribute, by its ID or name.
The catalog attribute's ID.
The catalog attribute's name.
The record's values for this attribute, in the same form as when you create a record.
The value's type, which is String or the type of the referenced item.
The text of a String value.
ID of the referenced item. For a user it's u123 or their e-mail. For a team it's t123, and for any other item it's the item's own ID. Responses return users and teams in this form. Get a user's ID via List team members, and a team's ID via List teams.
Referenced item's name.
Referenced user's e-mail.
Set to true to delete every record in the relation. Send either records or all. Always true.
Returns how many records were deleted, and what happened to each record you sent.
{
"meta": {
"removed_count": 1,
"rows": [
{
"result": "removed",
"record_ids": [
"67"
]
}
]
}
}
The API token is missing or invalid.
{
"errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-an-incidents-api-token"
}
The token is read-only, your role doesn't include Manage on Monitors, heartbeats, integrations, or the token can't be used for this API.
{
"errors": "This API token is read-only and cannot be used for write operations."
}
The catalog relation doesn't exist, or the token can't access it. Get the relation ID via List catalog relations.
Both records and all were sent, or neither was. The request also fails when records has more than 100 entries, when a record names an unknown attribute, an unknown value or an attribute that isn't primary, or when the relation has no primary attribute.
{
"errors": "Sorry, these attributes have unsupported values",
"allowed_values": {
"records": [
"must be an array of records to remove, or pass `all: true` instead"
]
}
}
Number of records this request deleted.
One result per record sent, in the same order. Not returned with all: true.
The outcome.
Valid values:removed: The record was deleted.no_match: No record matches the values.several_match: The values match more than one record, and none was deleted.
IDs of the records the values match.
Example cURL