列出遥测目标工作区
GET/v1/organizations/telemetry_destinations/{destination_id}/workspaces
列出目标工作区列表中的工作区,最新条目排在最前。
workspaces.type 为 all 的目标没有列表,因此其页面为空。该列表包含已归档的工作区。
请参阅 OpenTelemetry 导出指南,详细了解如何为目标选择工作区。
Parameters
Returns
列出遥测目标工作区
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
page, err := client.Beta.Organization.TelemetryDestinations.Workspaces.List(
context.TODO(),
"destination_id",
anthropic.BetaOrganizationTelemetryDestinationWorkspaceListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}Response 200
{
"data": [
{
"created_at": "2019-12-27T18:11:19.117Z",
"telemetry_destination_id": "telemetry_destination_id",
"type": "telemetry_destination_workspace",
"workspace_id": "workspace_id"
}
],
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"created_at": "2019-12-27T18:11:19.117Z",
"telemetry_destination_id": "telemetry_destination_id",
"type": "telemetry_destination_workspace",
"workspace_id": "workspace_id"
}
],
"next_page": "next_page"
}