List recent blocked or warned events
The most recent events that did not pass, newest first.
curl -X GET "https://www.agentkeeper.dev/api/v1/claude-code/recent?hostname=John%20Doe&limit=10" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://www.agentkeeper.dev/api/v1/claude-code/recent?hostname=John%20Doe&limit=10"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://www.agentkeeper.dev/api/v1/claude-code/recent?hostname=John%20Doe&limit=10", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://www.agentkeeper.dev/api/v1/claude-code/recent?hostname=John%20Doe&limit=10", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://www.agentkeeper.dev/api/v1/claude-code/recent?hostname=John%20Doe&limit=10')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"events": [
{
"created_at": "2026-08-18T10:41:09.000Z",
"verdict": "blocked",
"pattern_name": "destructive-filesystem",
"tool_name": "Bash",
"hostname": "dev-laptop-01",
"summary": "rm -rf on a path outside the workspace"
}
],
"total": 1,
"has_more": false,
"total_is_exact": false
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
GET
/api/v1/claude-code/recent
GET
Base URLstring
Target server for requests. Edit to use your own host.
Bearer Token
Bearer Tokenstring
RequiredAn AgentKeeper API key, sent as Authorization: Bearer ak_live_….
An AgentKeeper API key, sent as
Authorization: Bearer ak_live_….query
hostnamestring
Restrict to one workstation.
query
limitinteger
Results to return. Values below 1 or non-numeric fall back to 10; values above 50 are capped at 50.
Min: 1 • Max: 50
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token. An AgentKeeper API key, sent as Authorization: Bearer ak_live_….
Query Parameters
hostnamestring
Restrict to one workstation.
limitinteger
Results to return. Values below 1 or non-numeric fall back to 10; values above 50 are capped at 50.
Responses
eventsarray
totalinteger
Events in this response
has_moreboolean
total_is_exactboolean
Always false. Use has_more to page.
Was this page helpful?