Return an alert by id
curl --request GET \
--url http://10.2.4.166:8080/composer/api/alerts/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://10.2.4.166:8080/composer/api/alerts/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://10.2.4.166:8080/composer/api/alerts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/alerts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://10.2.4.166:8080/composer/api/alerts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://10.2.4.166:8080/composer/api/alerts/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/alerts/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": 99999,
"name": "Alert name",
"description": "Alert description",
"enabled": true,
"referencedSource": {
"id": "00000",
"name": "Company Sales"
},
"dashboards": [
{
"id": "00000",
"name": "Total Sales Dashboard"
}
],
"creatingUserName": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z",
"schedule": {
"frequency": "ONCE",
"minutesOfHour": 15,
"dayOfMonth": 1,
"dayOfWeek": "MONDAY",
"daysOfWeek": [
"MONDAY"
],
"monthsOfYear": "[JANUARY] or [MAY, DECEMBER]",
"timeOfDay": "17:30:00",
"startTimeOfDay": "16:00:00",
"endTimeOfDay": "18:00:00",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"timezone": "America/New_York"
},
"condition": {
"sourceId": "<string>",
"dataQuery": {
"queryType": "RAW",
"cid": "<string>",
"excludeResults": true,
"queryDerivedFields": [
{
"type": "FIELD",
"expression": "<string>",
"resultType": "ATTRIBUTE"
}
],
"filters": [
{
"path": {
"name": "<string>"
},
"operation": "EQUALS",
"value": "<unknown>"
}
],
"fields": [
{
"type": "FIELD",
"expression": "<string>",
"resultType": "ATTRIBUTE"
}
],
"distinct": true,
"sorts": [
{
"field": {
"field": {
"name": "<string>"
},
"type": "FIELD"
},
"direction": "ASC"
}
],
"offset": 123,
"limit": 123,
"excludeNulls": true,
"postProcessingRawExpressions": [
{
"name": "<string>",
"expression": {
"path": {
"name": "<string>"
},
"operation": "EQUALS",
"value": "<unknown>"
}
}
],
"referencedQueryCid": "<string>",
"referenceType": "RAW_DATA_AGGREGATION"
},
"activateAlertWhenData": "EXISTS",
"timeFilter": {
"timeField": "<string>",
"from": "<string>",
"to": "<string>"
}
},
"notification": {
"notificationType": "EMAIL"
}
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"error": "<string>",
"message": "<string>",
"path": "<string>"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}Return an alert by id
Return an alert by id
curl --request GET \
--url http://10.2.4.166:8080/composer/api/alerts/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://10.2.4.166:8080/composer/api/alerts/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://10.2.4.166:8080/composer/api/alerts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/alerts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://10.2.4.166:8080/composer/api/alerts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://10.2.4.166:8080/composer/api/alerts/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/alerts/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": 99999,
"name": "Alert name",
"description": "Alert description",
"enabled": true,
"referencedSource": {
"id": "00000",
"name": "Company Sales"
},
"dashboards": [
{
"id": "00000",
"name": "Total Sales Dashboard"
}
],
"creatingUserName": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z",
"schedule": {
"frequency": "ONCE",
"minutesOfHour": 15,
"dayOfMonth": 1,
"dayOfWeek": "MONDAY",
"daysOfWeek": [
"MONDAY"
],
"monthsOfYear": "[JANUARY] or [MAY, DECEMBER]",
"timeOfDay": "17:30:00",
"startTimeOfDay": "16:00:00",
"endTimeOfDay": "18:00:00",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"timezone": "America/New_York"
},
"condition": {
"sourceId": "<string>",
"dataQuery": {
"queryType": "RAW",
"cid": "<string>",
"excludeResults": true,
"queryDerivedFields": [
{
"type": "FIELD",
"expression": "<string>",
"resultType": "ATTRIBUTE"
}
],
"filters": [
{
"path": {
"name": "<string>"
},
"operation": "EQUALS",
"value": "<unknown>"
}
],
"fields": [
{
"type": "FIELD",
"expression": "<string>",
"resultType": "ATTRIBUTE"
}
],
"distinct": true,
"sorts": [
{
"field": {
"field": {
"name": "<string>"
},
"type": "FIELD"
},
"direction": "ASC"
}
],
"offset": 123,
"limit": 123,
"excludeNulls": true,
"postProcessingRawExpressions": [
{
"name": "<string>",
"expression": {
"path": {
"name": "<string>"
},
"operation": "EQUALS",
"value": "<unknown>"
}
}
],
"referencedQueryCid": "<string>",
"referenceType": "RAW_DATA_AGGREGATION"
},
"activateAlertWhenData": "EXISTS",
"timeFilter": {
"timeField": "<string>",
"from": "<string>",
"to": "<string>"
}
},
"notification": {
"notificationType": "EMAIL"
}
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"error": "<string>",
"message": "<string>",
"path": "<string>"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}Authorizations
HTTP Basic authentication using global administrator credentials (username and password).
Path Parameters
Alert identifier
Response
The alert was returned successfully
Defines the Alert object
Alert id
Example:
99999
Alert name
Example:
"Alert name"
Alert description
Example:
"Alert description"
Whether the alert is enabled
Source used for the alert condition
Show child attributes
Show child attributes
Dashboards assigned to the alert
Show child attributes
Show child attributes
User who originally created the alert
When the alert was originally created
When the alert was last modified
Schedule of the alert's condition checks
Show child attributes
Show child attributes
Alert's condition
Show child attributes
Show child attributes
Alert's notification configuration
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?