Guardrail-Verstöße auflisten
curl --request GET \
--url https://api.devin.ai/v3beta1/enterprise/guardrail-violations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3beta1/enterprise/guardrail-violations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3beta1/enterprise/guardrail-violations', 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.devin.ai/v3beta1/enterprise/guardrail-violations",
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.devin.ai/v3beta1/enterprise/guardrail-violations"
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.devin.ai/v3beta1/enterprise/guardrail-violations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/enterprise/guardrail-violations")
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{
"items": [
{
"action_taken": "<string>",
"confidence_score": 123,
"created_at": 123,
"event_id": "<string>",
"guardrail_id": "<string>",
"guardrail_name": "<string>",
"org_id": "<string>",
"reasoning": "<string>",
"session_id": "<string>",
"user_message": "<string>",
"violation_id": 123
}
],
"end_cursor": "<string>",
"has_next_page": false,
"total": 123
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Guardrail-Verstöße (Enterprise) [Beta]
Guardrail-Verstöße auflisten
Unternehmensweite Guardrail-Verstöße auflisten.
GET
/
v3beta1
/
enterprise
/
guardrail-violations
Guardrail-Verstöße auflisten
curl --request GET \
--url https://api.devin.ai/v3beta1/enterprise/guardrail-violations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3beta1/enterprise/guardrail-violations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3beta1/enterprise/guardrail-violations', 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.devin.ai/v3beta1/enterprise/guardrail-violations",
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.devin.ai/v3beta1/enterprise/guardrail-violations"
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.devin.ai/v3beta1/enterprise/guardrail-violations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/enterprise/guardrail-violations")
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{
"items": [
{
"action_taken": "<string>",
"confidence_score": 123,
"created_at": 123,
"event_id": "<string>",
"guardrail_id": "<string>",
"guardrail_name": "<string>",
"org_id": "<string>",
"reasoning": "<string>",
"session_id": "<string>",
"user_message": "<string>",
"violation_id": 123
}
],
"end_cursor": "<string>",
"has_next_page": false,
"total": 123
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Einen Überblick darüber, wie Guardrail funktionieren und wie Sie sie konfigurieren, finden Sie im Feature-Leitfaden zu AI Guardrails.
Erfordert einen Dienstbenutzer mit der Berechtigung
Dieser Endpunkt unterstützt optionale Zeitfilter über die Query-Parameter
Berechtigungen
ManageEnterpriseSettings auf Enterprise-Ebene.
Zeitfilter
time_after und time_before.
- Sowohl
time_afterals auchtime_beforesind Unix-Zeitstempel in Sekunden und werden als UTC interpretiert. - Wenn Sie
time_beforeangeben, müssen Sie auchtime_afterangeben. - Der Zeitraum zwischen
time_afterundtime_beforedarf höchstens 100 Tage umfassen. - Wenn keine Zeitfilter gesetzt sind, gibt die API Guardrail-Verstöße für den gesamten verfügbaren Verlauf zurück (vorbehaltlich der Paginierung).
Autorisierungen
Servicebenutzer-Anmeldedaten (Präfix: cog_)
Abfrageparameter
Verfügbare Optionen:
asc, desc Erforderlicher Bereich:
1 <= x <= 200Antwort
Erfolgreiche Antwort
Show child attributes
Show child attributes
Cursor zum Abrufen der nächsten Seite oder None, wenn dies die letzte Seite ist.
Gibt an, ob nach dieser Seite weitere Einträge verfügbar sind.
Optionale Gesamtanzahl (kann aus Leistungsgründen weggelassen werden).

