curl --request POST \
--url https://api-canary.watchdog.no/v1/alerts/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alert_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"filter": {
"mine": true,
"team_ids": [
"<string>"
],
"claim_ids": [
"<string>"
],
"has_claim": true,
"claim_statuses": [],
"invoice_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"agreement_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"agreement_statuses": [],
"supplier_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"recipient_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tag_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"topic_ids": [
"<string>"
],
"has_topic": true,
"verdicts": [],
"credited": true,
"credit_sources": [],
"confidence_levels": [],
"currency_codes": [
"<string>"
],
"correction_types": [],
"impact_min": "<string>",
"impact_max": "<string>",
"issued_from": "<string>",
"issued_through": "<string>",
"created_from": "<string>",
"created_through": "<string>",
"search": "<string>"
},
"excluded_alert_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alert_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
filter: {
mine: true,
team_ids: ['<string>'],
claim_ids: ['<string>'],
has_claim: true,
claim_statuses: [],
invoice_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
agreement_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
agreement_statuses: [],
supplier_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
recipient_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tag_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
topic_ids: ['<string>'],
has_topic: true,
verdicts: [],
credited: true,
credit_sources: [],
confidence_levels: [],
currency_codes: ['<string>'],
correction_types: [],
impact_min: '<string>',
impact_max: '<string>',
issued_from: '<string>',
issued_through: '<string>',
created_from: '<string>',
created_through: '<string>',
search: '<string>'
},
excluded_alert_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api-canary.watchdog.no/v1/alerts/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-canary.watchdog.no/v1/alerts/delete"
payload = {
"alert_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"filter": {
"mine": True,
"team_ids": ["<string>"],
"claim_ids": ["<string>"],
"has_claim": True,
"claim_statuses": [],
"invoice_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"agreement_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"agreement_statuses": [],
"supplier_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"recipient_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tag_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"topic_ids": ["<string>"],
"has_topic": True,
"verdicts": [],
"credited": True,
"credit_sources": [],
"confidence_levels": [],
"currency_codes": ["<string>"],
"correction_types": [],
"impact_min": "<string>",
"impact_max": "<string>",
"issued_from": "<string>",
"issued_through": "<string>",
"created_from": "<string>",
"created_through": "<string>",
"search": "<string>"
},
"excluded_alert_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"changed_count": 123,
"skipped_count": 123
}{
"error": {
"code": "validation_error",
"message": "The request is invalid. details lists up to 20 field errors. Request bodies are limited to 2 MiB.",
"request_id": "req_example"
}
}{
"error": {
"code": "invalid_token",
"message": "The bearer token is missing or invalid.",
"request_id": "req_example"
}
}{
"error": {
"code": "forbidden",
"message": "Access denied. The error code says why: forbidden, token_disabled, organization_required, insufficient_role or mfa_required.",
"request_id": "req_example"
}
}{
"error": {
"code": "not_found",
"message": "An alert in alert_ids or a selected team was not found.",
"request_id": "req_example"
}
}{
"error": {
"code": "conflict",
"message": "An alert in alert_ids cannot be changed (for example, it is in a completed claim), the filter selects too many alerts, or a selected team has invalid saved filters. Nothing changed.",
"request_id": "req_example"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Wait for the Retry-After delay before retrying.",
"request_id": "req_example"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected server failure. Include the request ID when contacting support.",
"request_id": "req_example"
}
}{
"error": {
"code": "service_unavailable",
"message": "Temporarily unavailable. Retry after the Retry-After delay, when provided.",
"request_id": "req_example"
}
}Delete selected alerts
Deletes the selected alerts, whether a check or a person created them. To reject wrong findings, prefer dismissing them. A filter skips alerts in a claim that is not cancelled; with alert_ids such an alert returns 409. Select alerts with alert_ids or filter, at most 5000 per request. Retrying is safe. A filter must name topics, claims, agreements or invoices.
curl --request POST \
--url https://api-canary.watchdog.no/v1/alerts/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alert_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"filter": {
"mine": true,
"team_ids": [
"<string>"
],
"claim_ids": [
"<string>"
],
"has_claim": true,
"claim_statuses": [],
"invoice_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"agreement_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"agreement_statuses": [],
"supplier_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"recipient_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tag_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"topic_ids": [
"<string>"
],
"has_topic": true,
"verdicts": [],
"credited": true,
"credit_sources": [],
"confidence_levels": [],
"currency_codes": [
"<string>"
],
"correction_types": [],
"impact_min": "<string>",
"impact_max": "<string>",
"issued_from": "<string>",
"issued_through": "<string>",
"created_from": "<string>",
"created_through": "<string>",
"search": "<string>"
},
"excluded_alert_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alert_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
filter: {
mine: true,
team_ids: ['<string>'],
claim_ids: ['<string>'],
has_claim: true,
claim_statuses: [],
invoice_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
agreement_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
agreement_statuses: [],
supplier_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
recipient_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tag_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
topic_ids: ['<string>'],
has_topic: true,
verdicts: [],
credited: true,
credit_sources: [],
confidence_levels: [],
currency_codes: ['<string>'],
correction_types: [],
impact_min: '<string>',
impact_max: '<string>',
issued_from: '<string>',
issued_through: '<string>',
created_from: '<string>',
created_through: '<string>',
search: '<string>'
},
excluded_alert_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api-canary.watchdog.no/v1/alerts/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-canary.watchdog.no/v1/alerts/delete"
payload = {
"alert_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"filter": {
"mine": True,
"team_ids": ["<string>"],
"claim_ids": ["<string>"],
"has_claim": True,
"claim_statuses": [],
"invoice_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"agreement_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"agreement_statuses": [],
"supplier_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"recipient_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tag_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"topic_ids": ["<string>"],
"has_topic": True,
"verdicts": [],
"credited": True,
"credit_sources": [],
"confidence_levels": [],
"currency_codes": ["<string>"],
"correction_types": [],
"impact_min": "<string>",
"impact_max": "<string>",
"issued_from": "<string>",
"issued_through": "<string>",
"created_from": "<string>",
"created_through": "<string>",
"search": "<string>"
},
"excluded_alert_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"changed_count": 123,
"skipped_count": 123
}{
"error": {
"code": "validation_error",
"message": "The request is invalid. details lists up to 20 field errors. Request bodies are limited to 2 MiB.",
"request_id": "req_example"
}
}{
"error": {
"code": "invalid_token",
"message": "The bearer token is missing or invalid.",
"request_id": "req_example"
}
}{
"error": {
"code": "forbidden",
"message": "Access denied. The error code says why: forbidden, token_disabled, organization_required, insufficient_role or mfa_required.",
"request_id": "req_example"
}
}{
"error": {
"code": "not_found",
"message": "An alert in alert_ids or a selected team was not found.",
"request_id": "req_example"
}
}{
"error": {
"code": "conflict",
"message": "An alert in alert_ids cannot be changed (for example, it is in a completed claim), the filter selects too many alerts, or a selected team has invalid saved filters. Nothing changed.",
"request_id": "req_example"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Wait for the Retry-After delay before retrying.",
"request_id": "req_example"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected server failure. Include the request ID when contacting support.",
"request_id": "req_example"
}
}{
"error": {
"code": "service_unavailable",
"message": "Temporarily unavailable. Retry after the Retry-After delay, when provided.",
"request_id": "req_example"
}
}Authorizations
Personal API key sent as a bearer token, together with X-Organization-Id. The key must have at least the access level the endpoint requires (read, write or admin).
Headers
The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.
Body
Alerts to change. If any is unknown (404) or cannot be changed (409), nothing changes.
1 - 5000 elementsChange every alert matching these GET /v1/alerts filters, given as JSON lists and booleans. Matching alerts that cannot be changed are skipped and counted in skipped_count.
Show child attributes
Show child attributes
Alerts to leave out of a filter selection. Only valid with filter.
1 - 5000 elements