Skip to content
  • There are no suggestions because the search field is empty.

Topics API

The Topics API allows you to create and manage alert topics, including their associated group subscriptions.

The Topics API allows you to create and manage alert topics, including their associated group subscriptions.

Base URLhttps://api.alertops.com/api/v2
Authenticationapi-key request header
Endpoints8

Endpoints

MethodPathDescription
GET/api/v2/topicsList topics
POST/api/v2/topicsCreate a topic
GET/api/v2/topics/{id}Get a topic
PUT/api/v2/topics/{id}Update a Topic
DELETE/api/v2/topics/{id}Delete a Topic
GET/api/v2/topics/{id}/groupsList a topic's groups
POST/api/v2/topics/{id}/groupsAdd groups to a topic
DELETE/api/v2/topics/{id}/groups/{group_id}Delete group from a topic

List topics

GET /api/v2/topics

Responses

200 OK

[
  {
    "topic_id": 1790,
    "topic_name": "Test Topic",
    "priority": "Low",
    "template": "template test"
  }
]

401 Unauthorized · missing or invalid api-key

Example request

curl -X GET "https://api.alertops.com/api/v2/topics" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json"

Create a topic

POST /api/v2/topics

Request body

JSON object (required).

FieldTypeRequired
topic_namestringOptional
prioritystringOptional
templatestringOptional

Example body

{
  "topic_name": "string",
  "priority": "string",
  "template": "string"
}

Responses

200 OK

401 Unauthorized · missing or invalid api-key

Example request

curl -X POST "https://api.alertops.com/api/v2/topics" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"topic_name":"string","priority":"string","template":"string"}'

Get a topic

GET /api/v2/topics/{id}

Path parameters

NameTypeRequiredDescription
idstringRequiredTopic ID or Topic Name

Responses

200 OK

{
  "topic_id": 1790,
  "topic_name": "Test Topic",
  "priority": "Low",
  "template": "template test"
}

401 Unauthorized · missing or invalid api-key

Example request

curl -X GET "https://api.alertops.com/api/v2/topics/{id}" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json"

Update a Topic

PUT /api/v2/topics/{id}

Path parameters

NameTypeRequiredDescription
idstringRequiredTopic ID or Topic Name

Request body

JSON object (required).

FieldTypeRequired
topic_namestringOptional
prioritystringOptional
templatestringOptional

Example body

{
  "topic_name": "string",
  "priority": "string",
  "template": "string"
}

Responses

204 No Content · The request was processed successfully. No response body is returned.

401 Unauthorized · missing or invalid api-key

Example request

curl -X PUT "https://api.alertops.com/api/v2/topics/{id}" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"topic_name":"string","priority":"string","template":"string"}'

Delete a Topic

DELETE /api/v2/topics/{id}

Path parameters

NameTypeRequiredDescription
idstringRequiredTopicID

Responses

204 No Content · The request was processed successfully. No response body is returned.

401 Unauthorized · missing or invalid api-key

Example request

curl -X DELETE "https://api.alertops.com/api/v2/topics/{id}" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json"

List a topic's groups

GET /api/v2/topics/{id}/groups

Path parameters

NameTypeRequiredDescription
idstringRequiredTopicID

Responses

200 OK

[
  {
    "group_id": 3451,
    "group_name": "test"
  }
]

401 Unauthorized · missing or invalid api-key

Example request

curl -X GET "https://api.alertops.com/api/v2/topics/{id}/groups" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json"

Add groups to a topic

POST /api/v2/topics/{id}/groups

Path parameters

NameTypeRequiredDescription
idstringRequiredTopicID

Request body

JSON object (required).

FieldTypeRequired
groupsarray of stringsOptional

Example body

{
  "groups": [
    "string"
  ]
}

Responses

200 OK

401 Unauthorized · missing or invalid api-key

Example request

curl -X POST "https://api.alertops.com/api/v2/topics/{id}/groups" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"groups":["string"]}'

Delete group from a topic

DELETE /api/v2/topics/{id}/groups/{group_id}

Path parameters

NameTypeRequiredDescription
idstringRequiredTopicID
group_idstringRequiredThe group ID.

Responses

204 No Content · The request was processed successfully. No response body is returned.

401 Unauthorized · missing or invalid api-key

Example request

curl -X DELETE "https://api.alertops.com/api/v2/topics/{id}/groups/{group_id}" \
  -H "api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json"