Agent aktualisieren
curl --request PATCH \
--url https://api.truthlocks.com/v1/agents/{agentId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"description": "<string>",
"display_name": "<string>",
"metadata": "<unknown>",
"status": "<string>"
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
display_name: '<string>',
metadata: '<unknown>',
status: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/agents/{agentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}"
payload = {
"description": "<string>",
"display_name": "<string>",
"metadata": "<unknown>",
"status": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents/{agentId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"display_name\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_type": "orchestrator",
"display_name": "<string>",
"description": "<string>",
"status": "active",
"scopes": [
"<string>"
],
"metadata": {},
"trust_score": 0.5,
"public_key": "<string>",
"session_count": 123,
"keys": [
{
"kid": "<string>",
"algorithm": "<string>",
"public_key": "<string>",
"status": "active"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Maschinenagenten
Agent aktualisieren
Den Anzeigenamen, die Beschreibung, die Metadaten oder den Status eines Agenten aktualisieren
PATCH
/
v1
/
agents
/
{agentId}
Agent aktualisieren
curl --request PATCH \
--url https://api.truthlocks.com/v1/agents/{agentId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"description": "<string>",
"display_name": "<string>",
"metadata": "<unknown>",
"status": "<string>"
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
display_name: '<string>',
metadata: '<unknown>',
status: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/agents/{agentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}"
payload = {
"description": "<string>",
"display_name": "<string>",
"metadata": "<unknown>",
"status": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents/{agentId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"display_name\": \"<string>\",\n \"metadata\": \"<unknown>\",\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_type": "orchestrator",
"display_name": "<string>",
"description": "<string>",
"status": "active",
"scopes": [
"<string>"
],
"metadata": {},
"trust_score": 0.5,
"public_key": "<string>",
"session_count": 123,
"keys": [
{
"kid": "<string>",
"algorithm": "<string>",
"public_key": "<string>",
"status": "active"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Agent aktualisieren
PATCH /v1/agents/{agentID}
Aktualisiert veränderliche Felder einer bestehenden Maschinenagentenidentität. Nur die im Anfragetext angegebenen Felder werden geändert; alle anderen Felder bleiben unverändert. Mindestens ein Feld muss angegeben werden.
Um die Scopes eines Agenten zu ändern, verwenden Sie das Delegationssystem oder registrieren Sie den Agenten neu.
Agenten. Bereiche können nicht direkt über diesen Endpunkt geändert werden, um die
den Audit-Trail von Scope-Änderungen.
Authentifizierung
ErfordertX-API-Key Header oder Bearer JWT Token. Der Arbeitsbereich wird aus den authentifizierten Anmeldeinformationen abgeleitet; senden Sie X-Tenant-ID nicht.
Anfragetext
Alle Felder sind optional, aber mindestens eines muss angegeben werden.Antwort
Gibt das vollständig aktualisierte Agentenidentitätsobjekt zurück.Beispiel
curl -X PATCH https://api.truthlocks.com/v1/agents/maip:t1234567:01HYX3KPZQ7RJGBN0WFMV8SDEH \
-H "X-API-Key: tl_live_..." \
-H "Content-Type: application/json" \
-d '{
"display_name": "Customer Support Bot v2",
"description": "Upgraded to handle Tier-1 and Tier-2 support with escalation",
"metadata": {
"team": "support",
"model": "claude-opus-4",
"environment": "production",
"version": "2.0"
}
}'
Autorisierungen
Body
application/json
Antwort
Agent aktualisiert

