cURL
curl --request GET \
--url https://us.infisical.com/api/v1/alertsimport requests
url = "https://us.infisical.com/api/v1/alerts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://us.infisical.com/api/v1/alerts', 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://us.infisical.com/api/v1/alerts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://us.infisical.com/api/v1/alerts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://us.infisical.com/api/v1/alerts")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/alerts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"alerts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"resourceType": "<string>",
"resourceId": "<string>",
"eventType": "<string>",
"triggerType": "<string>",
"enabled": true,
"orgId": "<string>",
"projectId": "<string>",
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"channelType": "<string>",
"enabled": true,
"config": {},
"recipients": [
{
"principalType": "<string>",
"principalId": "<string>"
}
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"condition": null,
"resourceName": "<string>",
"filters": {},
"lastRun": {
"timestamp": "2023-11-07T05:31:56Z",
"status": "success"
}
}
]
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}List alerts
List the alerts on a resource type.
GET
/
api
/
v1
/
alerts
cURL
curl --request GET \
--url https://us.infisical.com/api/v1/alertsimport requests
url = "https://us.infisical.com/api/v1/alerts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://us.infisical.com/api/v1/alerts', 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://us.infisical.com/api/v1/alerts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://us.infisical.com/api/v1/alerts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://us.infisical.com/api/v1/alerts")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/alerts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"alerts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"resourceType": "<string>",
"resourceId": "<string>",
"eventType": "<string>",
"triggerType": "<string>",
"enabled": true,
"orgId": "<string>",
"projectId": "<string>",
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"channelType": "<string>",
"enabled": true,
"config": {},
"recipients": [
{
"principalType": "<string>",
"principalId": "<string>"
}
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"condition": null,
"resourceName": "<string>",
"filters": {},
"lastRun": {
"timestamp": "2023-11-07T05:31:56Z",
"status": "success"
}
}
]
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Query Parameters
The type of resource to list alerts for.
Required string length:
1 - 255The ID of the resource to list alerts for. If omitted, lists every alert on the resource type. For resource types that support alerts covering all of their resources, such as cert-manager, lists only those alerts.
The ID of the project to list alerts in.
Whether to list only enabled or only disabled alerts.
Available options:
true, false Response
Default Response
Show child attributes
Show child attributes
Was this page helpful?