资源
列出审计事件
查询不可篡改的审计追踪记录。
GET
/
api
/
v1
/
audit
列出审计事件
curl --request GET \
--url https://api.example.com/api/v1/auditimport requests
url = "https://api.example.com/api/v1/audit"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/audit', 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.example.com/api/v1/audit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/audit"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/audit")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/audit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"action": "<string>",
"entityType": "<string>",
"entityId": "<string>",
"userId": "<string>",
"timestamp": "<string>",
"inputSummary": {},
"outputSummary": {}
}查询不可篡改的审计追踪记录。每一次 API 操作(补全、技能安装、密钥操作等)都会连同完整上下文一起被记录。
身份验证
需要携带 Bearer 令牌。参见 身份验证。请求示例
curl https://www.hitheo.ai/api/v1/audit \
-H "Authorization: Bearer $THEO_API_KEY"
响应
返回一个审计事件对象数组。每个事件包含:string
事件 ID。
string
执行的操作(例如
"completion.created"、"skill.installed"、"key.created")。string
受影响的实体类型(例如
"completion"、"skill"、"api_key")。string
受影响实体的 ID。
string
执行该操作的用户。
string
ISO 8601 格式的时间戳。
object
请求输入的摘要。
object
响应输出的摘要。
审计事件存储于防篡改的只追加日志中,无法被修改或删除。
端点
GET /api/v1/audit
需要通过 Bearer 令牌进行身份验证。参见 身份验证。此页面对您有帮助吗?
列出审计事件
curl --request GET \
--url https://api.example.com/api/v1/auditimport requests
url = "https://api.example.com/api/v1/audit"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/audit', 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.example.com/api/v1/audit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/audit"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/audit")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/audit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"action": "<string>",
"entityType": "<string>",
"entityId": "<string>",
"userId": "<string>",
"timestamp": "<string>",
"inputSummary": {},
"outputSummary": {}
}