Response for a batch annotation deletion. Partial errors are listed in the
response if any annotations could not be deleted.
Expand All
Field
Type
Description
data [required]
object
Data object for the annotation deletion response.
attributes [required]
object
Attributes of the annotation deletion response.
annotation_ids [required]
[string]
IDs of the successfully deleted annotations.
errors [required]
[object]
Errors for annotations that could not be deleted.
annotation_id [required]
string
ID of the annotation that could not be deleted.
error [required]
string
Error message.
id [required]
string
The annotation queue ID.
type [required]
enum
Resource type for LLM Observability annotations.
Allowed enum values: annotations
{"data":{"attributes":{"annotation_ids":["00000000-0000-0000-0000-000000000000"],"errors":[{"annotation_id":"00000000-0000-0000-0000-000000000000","error":"annotation not found"}]},"id":"00000000-0000-0000-0000-000000000001","type":"annotations"}}
"""
Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be deleted are listed in
`errors`." response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.llm_observability_apiimportLLMObservabilityApifromdatadog_api_client.v2.model.llm_obs_annotations_typeimportLLMObsAnnotationsTypefromdatadog_api_client.v2.model.llm_obs_delete_annotations_data_attributes_requestimport(LLMObsDeleteAnnotationsDataAttributesRequest,)fromdatadog_api_client.v2.model.llm_obs_delete_annotations_data_requestimportLLMObsDeleteAnnotationsDataRequestfromdatadog_api_client.v2.model.llm_obs_delete_annotations_requestimportLLMObsDeleteAnnotationsRequestbody=LLMObsDeleteAnnotationsRequest(data=LLMObsDeleteAnnotationsDataRequest(attributes=LLMObsDeleteAnnotationsDataAttributesRequest(annotation_ids=["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001",],),type=LLMObsAnnotationsType.ANNOTATIONS,),)configuration=Configuration()configuration.unstable_operations["delete_llm_obs_annotations"]=TruewithApiClient(configuration)asapi_client:api_instance=LLMObservabilityApi(api_client)response=api_instance.delete_llm_obs_annotations(queue_id="queue_id",body=body)print(response)
# Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be deleted are listed in# `errors`." responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.delete_llm_obs_annotations".to_sym]=trueendapi_instance=DatadogAPIClient::V2::LLMObservabilityAPI.newbody=DatadogAPIClient::V2::LLMObsDeleteAnnotationsRequest.new({data:DatadogAPIClient::V2::LLMObsDeleteAnnotationsDataRequest.new({attributes:DatadogAPIClient::V2::LLMObsDeleteAnnotationsDataAttributesRequest.new({annotation_ids:["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001",],}),type:DatadogAPIClient::V2::LLMObsAnnotationsType::ANNOTATIONS,}),})papi_instance.delete_llm_obs_annotations("queue_id",body)
// Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be deleted are listed in// `errors`." responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){body:=datadogV2.LLMObsDeleteAnnotationsRequest{Data:datadogV2.LLMObsDeleteAnnotationsDataRequest{Attributes:datadogV2.LLMObsDeleteAnnotationsDataAttributesRequest{AnnotationIds:[]string{"00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001",},},Type:datadogV2.LLMOBSANNOTATIONSTYPE_ANNOTATIONS,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.DeleteLLMObsAnnotations",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewLLMObservabilityApi(apiClient)resp,r,err:=api.DeleteLLMObsAnnotations(ctx,"queue_id",body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `LLMObservabilityApi.DeleteLLMObsAnnotations`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `LLMObservabilityApi.DeleteLLMObsAnnotations`:\n%s\n",responseContent)}
// Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be// deleted are listed in// `errors`." responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.LlmObservabilityApi;importcom.datadog.api.client.v2.model.LLMObsAnnotationsType;importcom.datadog.api.client.v2.model.LLMObsDeleteAnnotationsDataAttributesRequest;importcom.datadog.api.client.v2.model.LLMObsDeleteAnnotationsDataRequest;importcom.datadog.api.client.v2.model.LLMObsDeleteAnnotationsRequest;importcom.datadog.api.client.v2.model.LLMObsDeleteAnnotationsResponse;importjava.util.Arrays;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.deleteLLMObsAnnotations",true);LlmObservabilityApiapiInstance=newLlmObservabilityApi(defaultClient);LLMObsDeleteAnnotationsRequestbody=newLLMObsDeleteAnnotationsRequest().data(newLLMObsDeleteAnnotationsDataRequest().attributes(newLLMObsDeleteAnnotationsDataAttributesRequest().annotationIds(Arrays.asList("00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"))).type(LLMObsAnnotationsType.ANNOTATIONS));try{LLMObsDeleteAnnotationsResponseresult=apiInstance.deleteLLMObsAnnotations("00000000-0000-0000-0000-000000000001",body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling LlmObservabilityApi#deleteLLMObsAnnotations");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete annotations returns "OK — annotations deleted. Errors for annotations
// that could not be deleted are listed in `errors`." response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;usedatadog_api_client::datadogV2::model::LLMObsAnnotationsType;usedatadog_api_client::datadogV2::model::LLMObsDeleteAnnotationsDataAttributesRequest;usedatadog_api_client::datadogV2::model::LLMObsDeleteAnnotationsDataRequest;usedatadog_api_client::datadogV2::model::LLMObsDeleteAnnotationsRequest;#[tokio::main]asyncfnmain(){letbody=LLMObsDeleteAnnotationsRequest::new(LLMObsDeleteAnnotationsDataRequest::new(LLMObsDeleteAnnotationsDataAttributesRequest::new(vec!["00000000-0000-0000-0000-000000000000".to_string(),"00000000-0000-0000-0000-000000000001".to_string(),]),LLMObsAnnotationsType::ANNOTATIONS,));letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.DeleteLLMObsAnnotations",true);letapi=LLMObservabilityAPI::with_config(configuration);letresp=api.delete_llm_obs_annotations("queue_id".to_string(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be deleted are listed in
* `errors`." response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.deleteLLMObsAnnotations"]=true;constapiInstance=newv2.LLMObservabilityApi(configuration);constparams: v2.LLMObservabilityApiDeleteLLMObsAnnotationsRequest={body:{data:{attributes:{annotationIds:["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001",],},type:"annotations",},},queueId:"queue_id",};apiInstance.deleteLLMObsAnnotations(params).then((data: v2.LLMObsDeleteAnnotationsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));