curl --request GET \
--url https://{controlPlaneURL}/api/svc/v1/audit-logs/resources \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/svc/v1/audit-logs/resources"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{controlPlaneURL}/api/svc/v1/audit-logs/resources', 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://{controlPlaneURL}/api/svc/v1/audit-logs/resources",
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://{controlPlaneURL}/api/svc/v1/audit-logs/resources"
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://{controlPlaneURL}/api/svc/v1/audit-logs/resources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/svc/v1/audit-logs/resources")
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{
"data": [
{
"id": "<string>",
"action": "APPLY_ACCOUNT",
"requestPath": "<string>",
"resourceId": "<string>",
"resourceType": "role",
"resourceName": "<string>",
"resourceFqn": "<string>",
"parentResourceId": "<string>",
"parentResourceType": "role",
"tenantName": "<string>",
"clusterId": "<string>",
"workspaceId": "<string>",
"subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"metaData": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"eventSourceMetadata": {},
"message": "<string>"
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}Get Resource Audit Logs
List audit log entries for one resource the caller can manage, newest first. Use this when the caller is not a tenant admin, or when tenant-wide audit logs are not enabled: access follows the resource. Pass resourceType and the id from that resource’s get or list tool. For an application or deployment, pass that id; manage permission on its workspace is enough. A cluster returns every entry in that cluster. A workspace returns the workspace and activity inside it. Other types return the resource and its children. Set start and end, and keep limit small, because each entry includes the manifest before and after the change.
curl --request GET \
--url https://{controlPlaneURL}/api/svc/v1/audit-logs/resources \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/svc/v1/audit-logs/resources"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{controlPlaneURL}/api/svc/v1/audit-logs/resources', 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://{controlPlaneURL}/api/svc/v1/audit-logs/resources",
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://{controlPlaneURL}/api/svc/v1/audit-logs/resources"
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://{controlPlaneURL}/api/svc/v1/audit-logs/resources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/svc/v1/audit-logs/resources")
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{
"data": [
{
"id": "<string>",
"action": "APPLY_ACCOUNT",
"requestPath": "<string>",
"resourceId": "<string>",
"resourceType": "role",
"resourceName": "<string>",
"resourceFqn": "<string>",
"parentResourceId": "<string>",
"parentResourceType": "role",
"tenantName": "<string>",
"clusterId": "<string>",
"workspaceId": "<string>",
"subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"metaData": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"eventSourceMetadata": {},
"message": "<string>"
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Number of items per page
1 <= x <= 100010
Number of items to skip
x >= 00
Resource Id. Required unless resourceType is gateway-config, gateway-budget or gateway-rate-limit.
Type of the resource whose audit log to read.
role, account, cluster, workspace, environment, secret-group, deployment, application, secret, docker-registry, tenant, vcs-integration, mlf-project, repository, provider-integration, team, service-account, llm-gateway, policy, role-binding, settings, provider-account, user, alert-config, alert-rule, gateway-config, gateway-controls, gateway-budget, gateway-rate-limit, gateway-policy, gateway-approval-request, tracing-project, tracing-application, agent, agent-channel, gateway-installation, virtual-account, mcp-server, external-identity-provider, agent-identity, oidc-client Resource Name. Required when resourceType is gateway-config.
Optional comma-separated action names. Omit to include every action on the resource.
Search query for message, action, resource name, and resource FQN
Start Time (ISO 8601)
End Time (ISO 8601)
Was this page helpful?