List Activities
curl --request GET \
--url https://api.zerodrift.ai/api/activities \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zerodrift.ai/api/activities"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.zerodrift.ai/api/activities', 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.zerodrift.ai/api/activities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.zerodrift.ai/api/activities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.zerodrift.ai/api/activities")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zerodrift.ai/api/activities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"activity_id": "<string>",
"occurred_at": "<string>",
"event_name": "<string>",
"status": "<string>",
"source": "<string>",
"provider": "<string>",
"model": "<string>",
"agent": {},
"rules": [
{}
],
"rule_count": 123,
"truncated_rule_count": 123
}
],
"next_cursor": "<string>",
"meta": {
"total_pages": 123,
"current_page": 123
}
}Activities
List Activities
List Activity Center events for your account
GET
/
api
/
activities
List Activities
curl --request GET \
--url https://api.zerodrift.ai/api/activities \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zerodrift.ai/api/activities"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.zerodrift.ai/api/activities', 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.zerodrift.ai/api/activities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.zerodrift.ai/api/activities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.zerodrift.ai/api/activities")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zerodrift.ai/api/activities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"activity_id": "<string>",
"occurred_at": "<string>",
"event_name": "<string>",
"status": "<string>",
"source": "<string>",
"provider": "<string>",
"model": "<string>",
"agent": {},
"rules": [
{}
],
"rule_count": 123,
"truncated_rule_count": 123
}
],
"next_cursor": "<string>",
"meta": {
"total_pages": 123,
"current_page": 123
}
}Return a newest-first, eventually-consistent activity feed for your account.
Date ranges are capped at 30 days.
Query Parameters
string
Start of the window (ISO 8601 date-time)
string
End of the window (ISO 8601 date-time)
array
Filter by status. Repeatable. Values:
auto_fixed, blocked, warned, passedarray
Filter by agent ID. Repeatable.
array
Filter by source. Repeatable.
array
Filter by rule ID. Repeatable.
string
Free-text search
string
Opaque pagination cursor from a previous response
integer
Page size (1–100)
Response
array
Activity summaries
Show item properties
Show item properties
string
Activity identifier
string
ISO 8601 timestamp
string
Event label
string
auto_fixed, blocked, warned, or passedstring
Originating source
string
LLM provider when applicable
string
Model name when applicable
object
Agent
{ id, name }array
Rule summaries with
id, name, severity, type, and policyinteger
Total rules associated with the activity
integer
Number of rules omitted from the summary payload
string
Cursor for the next page, or
null when finishedobject
Errors
| Status | Meaning |
|---|---|
400 | Invalid date range (maximum 30 days) |
401 | Invalid API key |
Example
curl "https://api.zerodrift.ai/api/activities?limit=25&status=blocked&status=warned" \
-H "x-api-key: YOUR_API_KEY"
⌘I

