Claude Platform Docs

Testar um destino de telemetria

$client->beta->organization->telemetryDestinations->test(string destinationID, ?list<AnthropicBeta> betas): TelemetryDestinationTestResponse
POST/v1/organizations/telemetry_destinations/{destination_id}/test
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Envia um span de teste, chamado anthropic.test, ao destino com seus cabeçalhos registrados, uma única vez e sem novas tentativas, e relata a resposta do destino. A resposta é 200, quer o destino tenha respondido com um status 2xx ou não: seu result tem o tipo success, ou o tipo failure e o motivo em error. A configuração, o state e o delivery_health do destino não mudam. Um destino desabilitado também pode ser testado. Aguarde 10 segundos entre testes de um mesmo destino; uma solicitação que chegar antes disso pode ser respondida com o status 429.

Parameters
destinationID: string⁠Path parameter

ID of the destination to test (starts with tdst_).

betas?: optional list<AnthropicBeta>⁠Header parameter

This endpoint is in beta: requests must send telemetry-destinations-2026-08-11 in this header.

Returns
class TelemetryDestinationTestResponse { $type = 'telemetry_destination_test'; $result; }
"telemetry_destination_test" type

How the test went: success when the destination answered with a 2xx status, else failure with the reason.

Testar um destino de telemetria
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

$client = new Client(apiKey: 'my-anthropic-api-key');

$betaTelemetryDestinationTestResponse = $client
  ->beta
  ->organization
  ->telemetryDestinations
  ->test('destination_id', betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24]);

var_dump($betaTelemetryDestinationTestResponse);
Returns Examples
Response 200
{
  "result": {
    "type": "success"
  },
  "type": "telemetry_destination_test"
}