List alert rules
curl --request GET \
--url https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}",
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: Bearer <token>"
],
]);
$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 := "https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": 123,
"recipient": {
"culture": "<unknown>",
"timeZone": "<unknown>",
"phoneNumber": "<string>",
"description": "<string>"
},
"channel": {
"call": {},
"sms": {
"isInteractive": true
},
"telegram": {
"chatId": 123,
"isInteractive": true
},
"email": {
"emailAddress": "<string>",
"isInteractive": true
}
},
"isDisabled": true,
"daysOfWeek": [],
"timeOfDay": {
"from": "<string>",
"to": "<string>"
},
"dates": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"insideGeofences": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"outsideGeofences": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]{
"code": 123,
"message": "<string>"
}alertRules
List alert rules
Lists all alert rules for a specific asset and event type.
GET
https://api.notifense.com
/
v1
/
accounts
/
{accountId}
/
assets
/
{assetId}
/
alertRules
/
{eventType}
List alert rules
curl --request GET \
--url https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}",
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: Bearer <token>"
],
]);
$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 := "https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifense.com/v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": 123,
"recipient": {
"culture": "<unknown>",
"timeZone": "<unknown>",
"phoneNumber": "<string>",
"description": "<string>"
},
"channel": {
"call": {},
"sms": {
"isInteractive": true
},
"telegram": {
"chatId": 123,
"isInteractive": true
},
"email": {
"emailAddress": "<string>",
"isInteractive": true
}
},
"isDisabled": true,
"daysOfWeek": [],
"timeOfDay": {
"from": "<string>",
"to": "<string>"
},
"dates": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"insideGeofences": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"outsideGeofences": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]{
"code": 123,
"message": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Available options:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 Response
OK
Available options:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
0, 1, 2, 3, 4, 5, 6 Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I