移除遥测目标工作区
DELETE/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}
从目标的工作区列表中移除一个工作区。
在 include 模式下,该工作区的 span 停止发送到该目标。在 exclude 模式下,则开始发送。已归档的工作区也可以移除。
当该工作区不在列表中时,API 返回 404。workspaces.type 为 all 的目标没有列表,因此 API 会返回 400。
请参阅 OpenTelemetry 导出指南,详细了解如何为目标选择工作区。
Parameters
Returns
移除遥测目标工作区
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.telemetrydestinations.workspaces.BetaDeletedTelemetryDestinationWorkspace;
import com.anthropic.models.beta.organization.telemetrydestinations.workspaces.WorkspaceRemoveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
WorkspaceRemoveParams params = WorkspaceRemoveParams.builder()
.destinationId("destination_id")
.workspaceId("workspace_id")
.build();
BetaDeletedTelemetryDestinationWorkspace betaDeletedTelemetryDestinationWorkspace = client.beta().organization().telemetryDestinations().workspaces().remove(params);
}
}Response 200
{
"telemetry_destination_id": "telemetry_destination_id",
"type": "telemetry_destination_workspace_deleted",
"workspace_id": "workspace_id"
}Returns Examples
Response 200
{
"telemetry_destination_id": "telemetry_destination_id",
"type": "telemetry_destination_workspace_deleted",
"workspace_id": "workspace_id"
}