Update the order of your pipelines. Since logs are processed sequentially, reordering a pipeline may change
the structure and content of the data processed by other pipelines and their processors.
Note: Using the PUT method updates your pipeline order by replacing your current order
with the new one sent to your Datadog organization.
This endpoint requires the logs_write_pipelines permission.
Request
Body Data (required)
Object containing the new ordered list of pipeline IDs.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
# Update pipeline order returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]endapi_instance=DatadogAPIClient::V1::LogsPipelinesAPI.newbody=DatadogAPIClient::V1::LogsPipelinesOrder.new({pipeline_ids:["tags","org_ids","products",],})papi_instance.update_logs_pipeline_order(body)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// Update pipeline order returns "OK" 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/datadogV1")funcmain(){body:=datadogV1.LogsPipelinesOrder{PipelineIds:[]string{"tags","org_ids","products",},}ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewLogsPipelinesApi(apiClient)resp,r,err:=api.UpdateLogsPipelineOrder(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `LogsPipelinesApi.UpdateLogsPipelineOrder`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `LogsPipelinesApi.UpdateLogsPipelineOrder`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// Update pipeline order returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.LogsPipelinesApi;importcom.datadog.api.client.v1.model.LogsPipelinesOrder;importjava.util.Arrays;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));LogsPipelinesApiapiInstance=newLogsPipelinesApi(defaultClient);LogsPipelinesOrderbody=newLogsPipelinesOrder().pipelineIds(Arrays.asList("tags","org_ids","products"));try{LogsPipelinesOrderresult=apiInstance.updateLogsPipelineOrder(body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling LogsPipelinesApi#updateLogsPipelineOrder");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
// Update pipeline order returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_logs_pipelines::LogsPipelinesAPI;usedatadog_api_client::datadogV1::model::LogsPipelinesOrder;#[tokio::main]asyncfnmain(){letbody=LogsPipelinesOrder::new(vec!["tags".to_string(),"org_ids".to_string(),"products".to_string(),]);letconfiguration=datadog::Configuration::new();letapi=LogsPipelinesAPI::with_config(configuration);letresp=api.update_logs_pipeline_order(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="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update pipeline order returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv1.LogsPipelinesApi(configuration);constparams: v1.LogsPipelinesApiUpdateLogsPipelineOrderRequest={body:{pipelineIds:["tags","org_ids","products"],},};apiInstance.updateLogsPipelineOrder(params).then((data: v1.LogsPipelinesOrder)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.