Get Audit Summary
curl --request GET \
--url https://agentgate.mynewapi.com/api/v1/audit/runs/{runId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentgate.mynewapi.com/api/v1/audit/runs/{runId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentgate.mynewapi.com/api/v1/audit/runs/{runId}', 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://agentgate.mynewapi.com/api/v1/audit/runs/{runId}",
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://agentgate.mynewapi.com/api/v1/audit/runs/{runId}"
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://agentgate.mynewapi.com/api/v1/audit/runs/{runId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgate.mynewapi.com/api/v1/audit/runs/{runId}")
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{
"success": true,
"data": {
"runId": "<string>",
"workOrderId": "<string>",
"startedAt": "<string>",
"completedAt": "<string>",
"initialConfig": {},
"finalConfig": {},
"snapshotCount": 123,
"changeCount": 123,
"configHashChanged": true
}
}Audit
Get Audit Summary
Get audit record summary for a run
GET
/
api
/
v1
/
audit
/
runs
/
{runId}
Get Audit Summary
curl --request GET \
--url https://agentgate.mynewapi.com/api/v1/audit/runs/{runId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentgate.mynewapi.com/api/v1/audit/runs/{runId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentgate.mynewapi.com/api/v1/audit/runs/{runId}', 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://agentgate.mynewapi.com/api/v1/audit/runs/{runId}",
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://agentgate.mynewapi.com/api/v1/audit/runs/{runId}"
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://agentgate.mynewapi.com/api/v1/audit/runs/{runId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgate.mynewapi.com/api/v1/audit/runs/{runId}")
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{
"success": true,
"data": {
"runId": "<string>",
"workOrderId": "<string>",
"startedAt": "<string>",
"completedAt": "<string>",
"initialConfig": {},
"finalConfig": {},
"snapshotCount": 123,
"changeCount": 123,
"configHashChanged": true
}
}Get Audit Summary
Returns a summary of the configuration audit trail for a specific run, including initial and final configurations.Request
The run ID to get audit summary for
curl https://agentgate.mynewapi.com/api/v1/audit/runs/run_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
Response
Indicates if the request was successful
Audit record summary
Show properties
Show properties
Run ID
Associated work order ID
ISO 8601 timestamp when run started
ISO 8601 timestamp when run completed (null if still running)
Initial configuration snapshot
Final configuration snapshot (null if still running)
Total number of configuration snapshots
Total number of configuration changes
Whether configuration hash changed from start to end
Example Response
{
"success": true,
"data": {
"runId": "run_abc123",
"workOrderId": "wo_xyz789",
"startedAt": "2024-01-15T10:30:00.000Z",
"completedAt": "2024-01-15T11:15:00.000Z",
"initialConfig": {
"id": "snap_001",
"workOrderId": "wo_xyz789",
"runId": "run_abc123",
"iteration": 0,
"snapshotAt": "2024-01-15T10:30:00.000Z",
"configHash": "sha256:abc123...",
"config": {
"loopStrategy": {
"mode": "hybrid",
"maxIterations": 10
},
"verification": {
"skipLevels": []
},
"gitOps": {
"mode": "github-pr"
},
"executionLimits": {
"maxWallClockSeconds": 3600
}
}
},
"finalConfig": {
"id": "snap_005",
"iteration": 4,
"snapshotAt": "2024-01-15T11:15:00.000Z",
"configHash": "sha256:def456...",
"config": {
"loopStrategy": {
"mode": "hybrid",
"maxIterations": 15
},
"verification": {
"skipLevels": ["L2"]
},
"gitOps": {
"mode": "github-pr"
},
"executionLimits": {
"maxWallClockSeconds": 3600
}
}
},
"snapshotCount": 5,
"changeCount": 2,
"configHashChanged": true
},
"requestId": "req_abc123"
}
Error Responses
Audit Record Not Found
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Audit record not found for run: run_abc123"
}
}
⌘I