"""
Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found
rows in the included section." response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.reference_tables_apiimportReferenceTablesApifromdatadog_api_client.v2.model.batch_rows_query_data_typeimportBatchRowsQueryDataTypefromdatadog_api_client.v2.model.batch_rows_query_requestimportBatchRowsQueryRequestfromdatadog_api_client.v2.model.batch_rows_query_request_dataimportBatchRowsQueryRequestDatafromdatadog_api_client.v2.model.batch_rows_query_request_data_attributesimportBatchRowsQueryRequestDataAttributesbody=BatchRowsQueryRequest(data=BatchRowsQueryRequestData(attributes=BatchRowsQueryRequestDataAttributes(row_ids=["row_id_1","row_id_2",],table_id="00000000-0000-0000-0000-000000000000",),type=BatchRowsQueryDataType.REFERENCE_TABLES_BATCH_ROWS_QUERY,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=ReferenceTablesApi(api_client)response=api_instance.batch_rows_query(body=body)print(response)
# Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found# rows in the included section." responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::ReferenceTablesAPI.newbody=DatadogAPIClient::V2::BatchRowsQueryRequest.new({data:DatadogAPIClient::V2::BatchRowsQueryRequestData.new({attributes:DatadogAPIClient::V2::BatchRowsQueryRequestDataAttributes.new({row_ids:["row_id_1","row_id_2",],table_id:"00000000-0000-0000-0000-000000000000",}),type:DatadogAPIClient::V2::BatchRowsQueryDataType::REFERENCE_TABLES_BATCH_ROWS_QUERY,}),})papi_instance.batch_rows_query(body)
// Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found// rows in the included section." 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.BatchRowsQueryRequest{Data:&datadogV2.BatchRowsQueryRequestData{Attributes:&datadogV2.BatchRowsQueryRequestDataAttributes{RowIds:[]string{"row_id_1","row_id_2",},TableId:"00000000-0000-0000-0000-000000000000",},Type:datadogV2.BATCHROWSQUERYDATATYPE_REFERENCE_TABLES_BATCH_ROWS_QUERY,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewReferenceTablesApi(apiClient)resp,r,err:=api.BatchRowsQuery(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `ReferenceTablesApi.BatchRowsQuery`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `ReferenceTablesApi.BatchRowsQuery`:\n%s\n",responseContent)}
// Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found.// Response includes found// rows in the included section." responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.ReferenceTablesApi;importcom.datadog.api.client.v2.model.BatchRowsQueryDataType;importcom.datadog.api.client.v2.model.BatchRowsQueryRequest;importcom.datadog.api.client.v2.model.BatchRowsQueryRequestData;importcom.datadog.api.client.v2.model.BatchRowsQueryRequestDataAttributes;importcom.datadog.api.client.v2.model.BatchRowsQueryResponse;importjava.util.Arrays;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();ReferenceTablesApiapiInstance=newReferenceTablesApi(defaultClient);BatchRowsQueryRequestbody=newBatchRowsQueryRequest().data(newBatchRowsQueryRequestData().attributes(newBatchRowsQueryRequestDataAttributes().rowIds(Arrays.asList("row_id_1","row_id_2")).tableId("00000000-0000-0000-0000-000000000000")).type(BatchRowsQueryDataType.REFERENCE_TABLES_BATCH_ROWS_QUERY));try{BatchRowsQueryResponseresult=apiInstance.batchRowsQuery(body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling ReferenceTablesApi#batchRowsQuery");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Batch rows query returns "Successfully retrieved rows. Some or all requested
// rows were found. Response includes found rows in the included section." response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_reference_tables::ReferenceTablesAPI;usedatadog_api_client::datadogV2::model::BatchRowsQueryDataType;usedatadog_api_client::datadogV2::model::BatchRowsQueryRequest;usedatadog_api_client::datadogV2::model::BatchRowsQueryRequestData;usedatadog_api_client::datadogV2::model::BatchRowsQueryRequestDataAttributes;#[tokio::main]asyncfnmain(){letbody=BatchRowsQueryRequest::new().data(BatchRowsQueryRequestData::new(BatchRowsQueryDataType::REFERENCE_TABLES_BATCH_ROWS_QUERY).attributes(BatchRowsQueryRequestDataAttributes::new(vec!["row_id_1".to_string(),"row_id_2".to_string()],"00000000-0000-0000-0000-000000000000".to_string(),)),);letconfiguration=datadog::Configuration::new();letapi=ReferenceTablesAPI::with_config(configuration);letresp=api.batch_rows_query(body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found
* rows in the included section." response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ReferenceTablesApi(configuration);constparams: v2.ReferenceTablesApiBatchRowsQueryRequest={body:{data:{attributes:{rowIds:["row_id_1","row_id_2"],tableId:"00000000-0000-0000-0000-000000000000",},type:"reference-tables-batch-rows-query",},},};apiInstance.batchRowsQuery(params).then((data: v2.BatchRowsQueryResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));