All URIs are relative to https://api.datadoghq.com
Method | HTTP request | Description |
---|---|---|
createLogsPipeline | POST /api/v1/logs/config/pipelines | Create a pipeline |
deleteLogsPipeline | DELETE /api/v1/logs/config/pipelines/{pipeline_id} | Delete a pipeline |
getLogsPipeline | GET /api/v1/logs/config/pipelines/{pipeline_id} | Get a pipeline |
getLogsPipelineOrder | GET /api/v1/logs/config/pipeline-order | Get pipeline order |
listLogsPipelines | GET /api/v1/logs/config/pipelines | Get all pipelines |
updateLogsPipeline | PUT /api/v1/logs/config/pipelines/{pipeline_id} | Update a pipeline |
updateLogsPipelineOrder | PUT /api/v1/logs/config/pipeline-order | Update pipeline order |
LogsPipeline createLogsPipeline(body)
Create a pipeline in your organization.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.LogsPipelinesApi(configuration);
let params: v1.LogsPipelinesApiCreateLogsPipelineRequest = {
// LogsPipeline | Definition of the new pipeline.
body: {
filter: {
query: "source:python",
},
isEnabled: true,
name: "",
processors: [
{
grok: {
matchRules: `rule_name_1 foo
rule_name_2 bar
`,
supportRules: `rule_name_1 foo
rule_name_2 bar
`,
},
isEnabled: false,
name: "name_example",
samples: ["samples_example"],
source: "message",
type: "grok-parser",
},
],
},
};
apiInstance
.createLogsPipeline(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
body | LogsPipeline | Definition of the new pipeline. |
LogsPipeline
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void deleteLogsPipeline()
Delete a given pipeline from your organization. This endpoint takes no JSON arguments.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.LogsPipelinesApi(configuration);
let params: v1.LogsPipelinesApiDeleteLogsPipelineRequest = {
// string | ID of the pipeline to delete.
pipelineId: "pipeline_id_example",
};
apiInstance
.deleteLogsPipeline(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
pipelineId | [string] | ID of the pipeline to delete. | defaults to undefined |
void
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LogsPipeline getLogsPipeline()
Get a specific pipeline from your organization. This endpoint takes no JSON arguments.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.LogsPipelinesApi(configuration);
let params: v1.LogsPipelinesApiGetLogsPipelineRequest = {
// string | ID of the pipeline to get.
pipelineId: "pipeline_id_example",
};
apiInstance
.getLogsPipeline(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
pipelineId | [string] | ID of the pipeline to get. | defaults to undefined |
LogsPipeline
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LogsPipelinesOrder getLogsPipelineOrder()
Get the current order of your pipelines. This endpoint takes no JSON arguments.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.LogsPipelinesApi(configuration);
apiInstance
.getLogsPipelineOrder()
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
This endpoint does not need any parameter.
LogsPipelinesOrder
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Array listLogsPipelines()
Get all pipelines from your organization. This endpoint takes no JSON arguments.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.LogsPipelinesApi(configuration);
apiInstance
.listLogsPipelines()
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
This endpoint does not need any parameter.
Array
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LogsPipeline updateLogsPipeline(body)
Update a given pipeline configuration to change it’s processors or their order.
Note: Using this method updates your pipeline configuration by replacing your current configuration with the new one sent to your Datadog organization.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.LogsPipelinesApi(configuration);
let params: v1.LogsPipelinesApiUpdateLogsPipelineRequest = {
// string | ID of the pipeline to delete.
pipelineId: "pipeline_id_example",
// LogsPipeline | New definition of the pipeline.
body: {
filter: {
query: "source:python",
},
isEnabled: true,
name: "",
processors: [
{
grok: {
matchRules: `rule_name_1 foo
rule_name_2 bar
`,
supportRules: `rule_name_1 foo
rule_name_2 bar
`,
},
isEnabled: false,
name: "name_example",
samples: ["samples_example"],
source: "message",
type: "grok-parser",
},
],
},
};
apiInstance
.updateLogsPipeline(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
body | LogsPipeline | New definition of the pipeline. | |
pipelineId | [string] | ID of the pipeline to delete. | defaults to undefined |
LogsPipeline
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LogsPipelinesOrder updateLogsPipelineOrder(body)
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.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.LogsPipelinesApi(configuration);
let params: v1.LogsPipelinesApiUpdateLogsPipelineOrderRequest = {
// LogsPipelinesOrder | Object containing the new ordered list of pipeline IDs.
body: {
pipelineIds: ["tags", "org_ids", "products"],
},
};
apiInstance
.updateLogsPipelineOrder(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
body | LogsPipelinesOrder | Object containing the new ordered list of pipeline IDs. |
LogsPipelinesOrder
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
422 | Unprocessable Entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]