curl --request PATCH \
--url https://api.watchdog.no/v1/alert-topics/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_locked": true,
"title": "<string>",
"description": "<string>",
"key_questions": [
"<string>"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_locked: true,
title: '<string>',
description: '<string>',
key_questions: ['<string>']
})
};
fetch('https://api.watchdog.no/v1/alert-topics/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/alert-topics/{id}"
payload = {
"is_locked": True,
"title": "<string>",
"description": "<string>",
"key_questions": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agreement": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"title": "<string>",
"description": "<string>",
"is_locked": true,
"counts": {
"pending": {
"credited": 1,
"uncredited": 1
},
"accepted": {
"credited": 1,
"uncredited": 1
},
"dismissed": {
"credited": 1,
"uncredited": 1
}
},
"organization_currency": {
"currency_code": "<string>",
"impact_amount": "<string>",
"by_verdict": {
"pending": {
"credited": {
"alert_count": 123,
"impact_amount": "<string>"
},
"uncredited": {
"alert_count": 123,
"impact_amount": "<string>"
}
},
"accepted": {
"credited": {
"alert_count": 123,
"impact_amount": "<string>"
},
"uncredited": {
"alert_count": 123,
"impact_amount": "<string>"
}
},
"dismissed": {
"credited": {
"alert_count": 123,
"impact_amount": "<string>"
},
"uncredited": {
"alert_count": 123,
"impact_amount": "<string>"
}
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"key_questions": [
"<string>"
],
"evidence": {
"citations": [
{
"source_ref": 123,
"citation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"available": true,
"source_type": "document",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_name": "<string>",
"section_title": "<string>",
"quote": "<string>",
"verification": "verified",
"original_quote": "<string>",
"context_before": "<string>",
"context_after": "<string>"
}
],
"truncated": true
}
}{
"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": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}{
"error": {
"code": "conflict",
"message": "The topic is locked. Unlock it first.",
"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"
}
}Edit an alert topic
Edits the title, description and key questions. An empty string clears a field. A locked topic returns 409; unlock it first.
curl --request PATCH \
--url https://api.watchdog.no/v1/alert-topics/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_locked": true,
"title": "<string>",
"description": "<string>",
"key_questions": [
"<string>"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_locked: true,
title: '<string>',
description: '<string>',
key_questions: ['<string>']
})
};
fetch('https://api.watchdog.no/v1/alert-topics/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/alert-topics/{id}"
payload = {
"is_locked": True,
"title": "<string>",
"description": "<string>",
"key_questions": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agreement": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"title": "<string>",
"description": "<string>",
"is_locked": true,
"counts": {
"pending": {
"credited": 1,
"uncredited": 1
},
"accepted": {
"credited": 1,
"uncredited": 1
},
"dismissed": {
"credited": 1,
"uncredited": 1
}
},
"organization_currency": {
"currency_code": "<string>",
"impact_amount": "<string>",
"by_verdict": {
"pending": {
"credited": {
"alert_count": 123,
"impact_amount": "<string>"
},
"uncredited": {
"alert_count": 123,
"impact_amount": "<string>"
}
},
"accepted": {
"credited": {
"alert_count": 123,
"impact_amount": "<string>"
},
"uncredited": {
"alert_count": 123,
"impact_amount": "<string>"
}
},
"dismissed": {
"credited": {
"alert_count": 123,
"impact_amount": "<string>"
},
"uncredited": {
"alert_count": 123,
"impact_amount": "<string>"
}
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"key_questions": [
"<string>"
],
"evidence": {
"citations": [
{
"source_ref": 123,
"citation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"available": true,
"source_type": "document",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_name": "<string>",
"section_title": "<string>",
"quote": "<string>",
"verification": "verified",
"original_quote": "<string>",
"context_before": "<string>",
"context_after": "<string>"
}
],
"truncated": true
}
}{
"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": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}{
"error": {
"code": "conflict",
"message": "The topic is locked. Unlock it first.",
"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.
Path Parameters
Body
Unlock before editing. Locking protects the topic from edits, automatic categorization, merges, splits and automatic removal; it can still be deleted and alerts can still move in and out.
200Markdown. Inline citations such as [1] or [1,2] must use the source numbers stored for this topic.
100000Replaces the questions. Send an empty list to clear them.
1001 - 20000Response
The topic with its alert counts and citations.
Show child attributes
Show child attributes
Alerts by verdict, each split into credited and uncredited alerts.
Show child attributes
Show child attributes
Impact in the organization currency: the sum of the alerts’ converted impacts.
Show child attributes
Show child attributes
Show child attributes
Show child attributes