Aggiorna una destinazione di telemetria
POST/v1/organizations/telemetry_destinations/{destination_id}
Requires
anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headersModifica le impostazioni di una destinazione di telemetria, il suo stato o i workspace che copre.
Invia almeno un campo. I campi omessi mantengono i valori memorizzati, tranne gli header registrati, che vengono rimossi da una modifica dell'hostname o della porta dell'endpoint. Solo display_name, traces, traces.endpoint_url, traces.content_mode, traces.max_content_bytes e i singoli valori di headers accettano null.
Se un'altra richiesta modifica la destinazione mentre l'aggiornamento è in corso, l'API restituisce un 409 conflict_error. Rileggi la destinazione, quindi riprova l'aggiornamento.
Consulta la guida all'esportazione OpenTelemetry per saperne di più sulla modifica di una destinazione.
Parameters
Returns
Aggiorna una destinazione di telemetria
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;
use Anthropic\Beta\Organization\TelemetryDestinations\TelemetryDestinationContentMode;
$client = new Client(apiKey: 'my-anthropic-api-key');
$betaTelemetryDestination = $client
->beta
->organization
->telemetryDestinations
->update(
'destination_id',
displayName: 'display_name',
endpointURL: 'endpoint_url',
headers: ['foo' => 'string'],
state: ['type' => 'enabled'],
traces: [
'contentMode' => TelemetryDestinationContentMode::METADATA_ONLY,
'enabled' => true,
'endpointURL' => 'endpoint_url',
'maxContentBytes' => 0,
],
workspaces: ['type' => 'all'],
betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);
var_dump($betaTelemetryDestination);Response 200
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"delivery_health": {
"last_error": "last_error",
"last_error_at": "2019-12-27T18:11:19.117Z",
"last_success_at": "2019-12-27T18:11:19.117Z"
},
"display_name": "display_name",
"endpoint_url": "endpoint_url",
"header_names": [
"string"
],
"state": {
"type": "enabled"
},
"traces": {
"content_mode": "metadata_only",
"enabled": true,
"endpoint_url": "endpoint_url",
"max_content_bytes": 0
},
"type": "telemetry_destination",
"updated_at": "2019-12-27T18:11:19.117Z",
"workspaces": {
"type": "all"
}
}Returns Examples
Response 200
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"delivery_health": {
"last_error": "last_error",
"last_error_at": "2019-12-27T18:11:19.117Z",
"last_success_at": "2019-12-27T18:11:19.117Z"
},
"display_name": "display_name",
"endpoint_url": "endpoint_url",
"header_names": [
"string"
],
"state": {
"type": "enabled"
},
"traces": {
"content_mode": "metadata_only",
"enabled": true,
"endpoint_url": "endpoint_url",
"max_content_bytes": 0
},
"type": "telemetry_destination",
"updated_at": "2019-12-27T18:11:19.117Z",
"workspaces": {
"type": "all"
}
}