Read request logs for one installation-bound protection
curl --request GET \
--url https://api.airctrl.dev/v1/oauth/protections/{protectionId}/logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.airctrl.dev/v1/oauth/protections/{protectionId}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.airctrl.dev/v1/oauth/protections/{protectionId}/logs', 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.airctrl.dev/v1/oauth/protections/{protectionId}/logs",
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.airctrl.dev/v1/oauth/protections/{protectionId}/logs"
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.airctrl.dev/v1/oauth/protections/{protectionId}/logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.airctrl.dev/v1/oauth/protections/{protectionId}/logs")
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{
"ok": true,
"data": {
"rows": [
{
"log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gateway_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gateway_name": "<string>",
"token_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trace_id": "<string>",
"span_id": "<string>",
"provider_slug": "<string>",
"model": "<string>",
"operation_name": "<string>",
"status_code": 123,
"streamed": true,
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"cost": "<string>",
"cost_estimated": true,
"request_bytes": 1,
"response_bytes": 1,
"latency_ms": 123,
"error_code": "<string>",
"finish_reason": "<string>",
"upstream_request_id": "<string>",
"claude_session_id": "<string>",
"token_name": "<string>",
"principal_type": "user",
"principal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_account_name": "<string>",
"owner_email": "<string>",
"guardrail_mode": "off",
"guardrail_matched": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z"
}
],
"total": 1,
"pagination": {
"limit": 100,
"has_more": true,
"next_cursor": "<string>"
},
"facets": {
"providers": [
{
"slug": "<string>",
"count": 1
}
],
"statusClasses": [
{
"class": "<string>",
"count": 1
}
]
},
"can_read_spend": true,
"can_read_bodies": true
}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"error_description": "<string>",
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"error_description": "<string>",
"requestId": "<string>"
}OAuth
Read request logs for one installation-bound protection
Returns request metadata only for the gateway created by this protection. Bodies are never exposed through OAuth. Cost is present only when the same token also has protections:read-spend.
GET
/
oauth
/
protections
/
{protectionId}
/
logs
Read request logs for one installation-bound protection
curl --request GET \
--url https://api.airctrl.dev/v1/oauth/protections/{protectionId}/logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.airctrl.dev/v1/oauth/protections/{protectionId}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.airctrl.dev/v1/oauth/protections/{protectionId}/logs', 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.airctrl.dev/v1/oauth/protections/{protectionId}/logs",
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.airctrl.dev/v1/oauth/protections/{protectionId}/logs"
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.airctrl.dev/v1/oauth/protections/{protectionId}/logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.airctrl.dev/v1/oauth/protections/{protectionId}/logs")
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{
"ok": true,
"data": {
"rows": [
{
"log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gateway_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gateway_name": "<string>",
"token_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trace_id": "<string>",
"span_id": "<string>",
"provider_slug": "<string>",
"model": "<string>",
"operation_name": "<string>",
"status_code": 123,
"streamed": true,
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"cost": "<string>",
"cost_estimated": true,
"request_bytes": 1,
"response_bytes": 1,
"latency_ms": 123,
"error_code": "<string>",
"finish_reason": "<string>",
"upstream_request_id": "<string>",
"claude_session_id": "<string>",
"token_name": "<string>",
"principal_type": "user",
"principal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_account_name": "<string>",
"owner_email": "<string>",
"guardrail_mode": "off",
"guardrail_matched": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z"
}
],
"total": 1,
"pagination": {
"limit": 100,
"has_more": true,
"next_cursor": "<string>"
},
"facets": {
"providers": [
{
"slug": "<string>",
"count": 1
}
],
"statusClasses": [
{
"class": "<string>",
"count": 1
}
]
},
"can_read_spend": true,
"can_read_bodies": true
}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"error_description": "<string>",
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"error_description": "<string>",
"requestId": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Scopes
protections:read-logs
Read request metadata only for protections created by this OAuth connection.
Path Parameters
AIRCTRL protection ID returned for one external resource.
Query Parameters
Maximum string length:
64Maximum string length:
200Required range:
100 <= x <= 599Required range:
1 <= x <= 200Zero-based offset pagination. Must be zero when cursor is provided.
Required range:
x >= 0Opaque cursor from the previous response. Reuse the exact active filters.
Maximum string length:
2048