List Alerts
curl --request POST \
--url https://api.mixpeek.com/v1/alerts/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"search": "<string>",
"filters": {
"AND": [
{
"field": "name",
"operator": "eq",
"value": "John"
},
{
"field": "age",
"operator": "gte",
"value": 30
}
],
"OR": [
{
"field": "status",
"operator": "eq",
"value": "active"
},
{
"field": "role",
"operator": "eq",
"value": "admin"
}
],
"NOT": [
{
"field": "department",
"operator": "eq",
"value": "HR"
},
{
"field": "location",
"operator": "eq",
"value": "remote"
}
],
"case_sensitive": true
},
"sort": {
"field": "created_at",
"direction": "desc"
},
"case_sensitive": false
}
'import requests
url = "https://api.mixpeek.com/v1/alerts/list"
payload = {
"search": "<string>",
"filters": {
"AND": [
{
"field": "name",
"operator": "eq",
"value": "John"
},
{
"field": "age",
"operator": "gte",
"value": 30
}
],
"OR": [
{
"field": "status",
"operator": "eq",
"value": "active"
},
{
"field": "role",
"operator": "eq",
"value": "admin"
}
],
"NOT": [
{
"field": "department",
"operator": "eq",
"value": "HR"
},
{
"field": "location",
"operator": "eq",
"value": "remote"
}
],
"case_sensitive": True
},
"sort": {
"field": "created_at",
"direction": "desc"
},
"case_sensitive": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
search: '<string>',
filters: {
AND: [
{field: 'name', operator: 'eq', value: 'John'},
{field: 'age', operator: 'gte', value: 30}
],
OR: [
{field: 'status', operator: 'eq', value: 'active'},
{field: 'role', operator: 'eq', value: 'admin'}
],
NOT: [
{field: 'department', operator: 'eq', value: 'HR'},
{field: 'location', operator: 'eq', value: 'remote'}
],
case_sensitive: true
},
sort: {field: 'created_at', direction: 'desc'},
case_sensitive: false
})
};
fetch('https://api.mixpeek.com/v1/alerts/list', 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.mixpeek.com/v1/alerts/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'search' => '<string>',
'filters' => [
'AND' => [
[
'field' => 'name',
'operator' => 'eq',
'value' => 'John'
],
[
'field' => 'age',
'operator' => 'gte',
'value' => 30
]
],
'OR' => [
[
'field' => 'status',
'operator' => 'eq',
'value' => 'active'
],
[
'field' => 'role',
'operator' => 'eq',
'value' => 'admin'
]
],
'NOT' => [
[
'field' => 'department',
'operator' => 'eq',
'value' => 'HR'
],
[
'field' => 'location',
'operator' => 'eq',
'value' => 'remote'
]
],
'case_sensitive' => true
],
'sort' => [
'field' => 'created_at',
'direction' => 'desc'
],
'case_sensitive' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/alerts/list"
payload := strings.NewReader("{\n \"search\": \"<string>\",\n \"filters\": {\n \"AND\": [\n {\n \"field\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"John\"\n },\n {\n \"field\": \"age\",\n \"operator\": \"gte\",\n \"value\": 30\n }\n ],\n \"OR\": [\n {\n \"field\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"active\"\n },\n {\n \"field\": \"role\",\n \"operator\": \"eq\",\n \"value\": \"admin\"\n }\n ],\n \"NOT\": [\n {\n \"field\": \"department\",\n \"operator\": \"eq\",\n \"value\": \"HR\"\n },\n {\n \"field\": \"location\",\n \"operator\": \"eq\",\n \"value\": \"remote\"\n }\n ],\n \"case_sensitive\": true\n },\n \"sort\": {\n \"field\": \"created_at\",\n \"direction\": \"desc\"\n },\n \"case_sensitive\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mixpeek.com/v1/alerts/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"search\": \"<string>\",\n \"filters\": {\n \"AND\": [\n {\n \"field\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"John\"\n },\n {\n \"field\": \"age\",\n \"operator\": \"gte\",\n \"value\": 30\n }\n ],\n \"OR\": [\n {\n \"field\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"active\"\n },\n {\n \"field\": \"role\",\n \"operator\": \"eq\",\n \"value\": \"admin\"\n }\n ],\n \"NOT\": [\n {\n \"field\": \"department\",\n \"operator\": \"eq\",\n \"value\": \"HR\"\n },\n {\n \"field\": \"location\",\n \"operator\": \"eq\",\n \"value\": \"remote\"\n }\n ],\n \"case_sensitive\": true\n },\n \"sort\": {\n \"field\": \"created_at\",\n \"direction\": \"desc\"\n },\n \"case_sensitive\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/alerts/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"search\": \"<string>\",\n \"filters\": {\n \"AND\": [\n {\n \"field\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"John\"\n },\n {\n \"field\": \"age\",\n \"operator\": \"gte\",\n \"value\": 30\n }\n ],\n \"OR\": [\n {\n \"field\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"active\"\n },\n {\n \"field\": \"role\",\n \"operator\": \"eq\",\n \"value\": \"admin\"\n }\n ],\n \"NOT\": [\n {\n \"field\": \"department\",\n \"operator\": \"eq\",\n \"value\": \"HR\"\n },\n {\n \"field\": \"location\",\n \"operator\": \"eq\",\n \"value\": \"remote\"\n }\n ],\n \"case_sensitive\": true\n },\n \"sort\": {\n \"field\": \"created_at\",\n \"direction\": \"desc\"\n },\n \"case_sensitive\": false\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"name": "<string>",
"notification_config": {
"channels": [
{
"channel_type": "<string>",
"channel_id": "wh_safety_team",
"config": {
"url": "https://example.com/webhook"
}
}
],
"include_matches": true,
"include_scores": true,
"template_id": "<string>"
},
"alert_id": "<string>",
"namespace_id": "ns_production",
"description": "Alerts when new videos match known safety incidents",
"source": "retriever",
"retriever_id": "ret_safety_search",
"trigger_on": "results",
"system_condition": {
"params": {}
},
"namespace_selector": {
"mode": "all",
"namespace_ids": [
"<string>"
]
},
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"pagination": {
"total": 123,
"page": 123,
"page_size": 123,
"total_pages": 123,
"next_page": "<string>",
"previous_page": "<string>",
"next_cursor": "<string>"
},
"total_count": 123,
"stats": {
"total_alerts": 0,
"enabled_alerts": 0,
"disabled_alerts": 0,
"alerts_by_channel_type": {}
}
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}Alerts
List Alerts
List all alerts in the namespace with optional filtering and pagination.
Filtering:
- Use
searchfor wildcard text search across alert_id, name, description - Use
filtersfor structured queries
Sorting:
- Default: created_at descending (newest first)
POST
/
v1
/
alerts
/
list
List Alerts
curl --request POST \
--url https://api.mixpeek.com/v1/alerts/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"search": "<string>",
"filters": {
"AND": [
{
"field": "name",
"operator": "eq",
"value": "John"
},
{
"field": "age",
"operator": "gte",
"value": 30
}
],
"OR": [
{
"field": "status",
"operator": "eq",
"value": "active"
},
{
"field": "role",
"operator": "eq",
"value": "admin"
}
],
"NOT": [
{
"field": "department",
"operator": "eq",
"value": "HR"
},
{
"field": "location",
"operator": "eq",
"value": "remote"
}
],
"case_sensitive": true
},
"sort": {
"field": "created_at",
"direction": "desc"
},
"case_sensitive": false
}
'import requests
url = "https://api.mixpeek.com/v1/alerts/list"
payload = {
"search": "<string>",
"filters": {
"AND": [
{
"field": "name",
"operator": "eq",
"value": "John"
},
{
"field": "age",
"operator": "gte",
"value": 30
}
],
"OR": [
{
"field": "status",
"operator": "eq",
"value": "active"
},
{
"field": "role",
"operator": "eq",
"value": "admin"
}
],
"NOT": [
{
"field": "department",
"operator": "eq",
"value": "HR"
},
{
"field": "location",
"operator": "eq",
"value": "remote"
}
],
"case_sensitive": True
},
"sort": {
"field": "created_at",
"direction": "desc"
},
"case_sensitive": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
search: '<string>',
filters: {
AND: [
{field: 'name', operator: 'eq', value: 'John'},
{field: 'age', operator: 'gte', value: 30}
],
OR: [
{field: 'status', operator: 'eq', value: 'active'},
{field: 'role', operator: 'eq', value: 'admin'}
],
NOT: [
{field: 'department', operator: 'eq', value: 'HR'},
{field: 'location', operator: 'eq', value: 'remote'}
],
case_sensitive: true
},
sort: {field: 'created_at', direction: 'desc'},
case_sensitive: false
})
};
fetch('https://api.mixpeek.com/v1/alerts/list', 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.mixpeek.com/v1/alerts/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'search' => '<string>',
'filters' => [
'AND' => [
[
'field' => 'name',
'operator' => 'eq',
'value' => 'John'
],
[
'field' => 'age',
'operator' => 'gte',
'value' => 30
]
],
'OR' => [
[
'field' => 'status',
'operator' => 'eq',
'value' => 'active'
],
[
'field' => 'role',
'operator' => 'eq',
'value' => 'admin'
]
],
'NOT' => [
[
'field' => 'department',
'operator' => 'eq',
'value' => 'HR'
],
[
'field' => 'location',
'operator' => 'eq',
'value' => 'remote'
]
],
'case_sensitive' => true
],
'sort' => [
'field' => 'created_at',
'direction' => 'desc'
],
'case_sensitive' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/alerts/list"
payload := strings.NewReader("{\n \"search\": \"<string>\",\n \"filters\": {\n \"AND\": [\n {\n \"field\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"John\"\n },\n {\n \"field\": \"age\",\n \"operator\": \"gte\",\n \"value\": 30\n }\n ],\n \"OR\": [\n {\n \"field\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"active\"\n },\n {\n \"field\": \"role\",\n \"operator\": \"eq\",\n \"value\": \"admin\"\n }\n ],\n \"NOT\": [\n {\n \"field\": \"department\",\n \"operator\": \"eq\",\n \"value\": \"HR\"\n },\n {\n \"field\": \"location\",\n \"operator\": \"eq\",\n \"value\": \"remote\"\n }\n ],\n \"case_sensitive\": true\n },\n \"sort\": {\n \"field\": \"created_at\",\n \"direction\": \"desc\"\n },\n \"case_sensitive\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mixpeek.com/v1/alerts/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"search\": \"<string>\",\n \"filters\": {\n \"AND\": [\n {\n \"field\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"John\"\n },\n {\n \"field\": \"age\",\n \"operator\": \"gte\",\n \"value\": 30\n }\n ],\n \"OR\": [\n {\n \"field\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"active\"\n },\n {\n \"field\": \"role\",\n \"operator\": \"eq\",\n \"value\": \"admin\"\n }\n ],\n \"NOT\": [\n {\n \"field\": \"department\",\n \"operator\": \"eq\",\n \"value\": \"HR\"\n },\n {\n \"field\": \"location\",\n \"operator\": \"eq\",\n \"value\": \"remote\"\n }\n ],\n \"case_sensitive\": true\n },\n \"sort\": {\n \"field\": \"created_at\",\n \"direction\": \"desc\"\n },\n \"case_sensitive\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/alerts/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"search\": \"<string>\",\n \"filters\": {\n \"AND\": [\n {\n \"field\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"John\"\n },\n {\n \"field\": \"age\",\n \"operator\": \"gte\",\n \"value\": 30\n }\n ],\n \"OR\": [\n {\n \"field\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"active\"\n },\n {\n \"field\": \"role\",\n \"operator\": \"eq\",\n \"value\": \"admin\"\n }\n ],\n \"NOT\": [\n {\n \"field\": \"department\",\n \"operator\": \"eq\",\n \"value\": \"HR\"\n },\n {\n \"field\": \"location\",\n \"operator\": \"eq\",\n \"value\": \"remote\"\n }\n ],\n \"case_sensitive\": true\n },\n \"sort\": {\n \"field\": \"created_at\",\n \"direction\": \"desc\"\n },\n \"case_sensitive\": false\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"name": "<string>",
"notification_config": {
"channels": [
{
"channel_type": "<string>",
"channel_id": "wh_safety_team",
"config": {
"url": "https://example.com/webhook"
}
}
],
"include_matches": true,
"include_scores": true,
"template_id": "<string>"
},
"alert_id": "<string>",
"namespace_id": "ns_production",
"description": "Alerts when new videos match known safety incidents",
"source": "retriever",
"retriever_id": "ret_safety_search",
"trigger_on": "results",
"system_condition": {
"params": {}
},
"namespace_selector": {
"mode": "all",
"namespace_ids": [
"<string>"
]
},
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"pagination": {
"total": 123,
"page": 123,
"page_size": 123,
"total_pages": 123,
"next_page": "<string>",
"previous_page": "<string>",
"next_cursor": "<string>"
},
"total_count": 123,
"stats": {
"total_alerts": 0,
"enabled_alerts": 0,
"disabled_alerts": 0,
"alerts_by_channel_type": {}
}
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Required range:
1 <= x <= 1000Required range:
1 <= x <= 1000Required range:
0 <= x <= 10000Required range:
x >= 1Body
application/json
Request model to list alerts.
Search term for wildcard search across alert_id, name, description
Filters to apply to the alert list
Show child attributes
Show child attributes
Sort configuration for the alert list
Show child attributes
Show child attributes
If True, filters and search will be case-sensitive
Response
Successful Response
Response model for listing alerts.
List of alerts
Show child attributes
Show child attributes
Pagination information
Show child attributes
Show child attributes
Total number of alerts matching query
Aggregate statistics across all alerts in the result
Show child attributes
Show child attributes
Was this page helpful?
⌘I

