Skip to content

Commit d6e0c00

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8d710f7 of spec repo
1 parent ed7c570 commit d6e0c00

39 files changed

Lines changed: 2719 additions & 3 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 575 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/**
2+
* Scalar cross product query with apm_resource_stats data source returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.MetricsApi(configuration);
9+
10+
const params: v2.MetricsApiQueryScalarDataRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
formulas: [
15+
{
16+
formula: "a",
17+
limit: {
18+
count: 10,
19+
order: "desc",
20+
},
21+
},
22+
],
23+
from: 1636625471000,
24+
queries: [
25+
{
26+
dataSource: "apm_resource_stats",
27+
name: "a",
28+
env: "staging",
29+
service: "azure-bill-import",
30+
stat: "hits",
31+
operationName: "cassandra.query",
32+
groupBy: ["resource_name"],
33+
primaryTagName: "datacenter",
34+
primaryTagValue: "*",
35+
},
36+
],
37+
to: 1636629071000,
38+
},
39+
type: "scalar_request",
40+
},
41+
},
42+
};
43+
44+
apiInstance
45+
.queryScalarData(params)
46+
.then((data: v2.ScalarFormulaQueryResponse) => {
47+
console.log(
48+
"API called successfully. Returned data: " + JSON.stringify(data)
49+
);
50+
})
51+
.catch((error: any) => console.error(error));
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* Scalar cross product query with apm_metrics data source returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.MetricsApi(configuration);
9+
10+
const params: v2.MetricsApiQueryScalarDataRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
formulas: [
15+
{
16+
formula: "a",
17+
limit: {
18+
count: 10,
19+
order: "desc",
20+
},
21+
},
22+
],
23+
from: 1636625471000,
24+
queries: [
25+
{
26+
dataSource: "apm_metrics",
27+
name: "a",
28+
stat: "hits",
29+
service: "web-store",
30+
queryFilter: "env:prod",
31+
groupBy: ["resource_name"],
32+
},
33+
],
34+
to: 1636629071000,
35+
},
36+
type: "scalar_request",
37+
},
38+
},
39+
};
40+
41+
apiInstance
42+
.queryScalarData(params)
43+
.then((data: v2.ScalarFormulaQueryResponse) => {
44+
console.log(
45+
"API called successfully. Returned data: " + JSON.stringify(data)
46+
);
47+
})
48+
.catch((error: any) => console.error(error));
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Scalar cross product query with slo data source returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.MetricsApi(configuration);
9+
10+
const params: v2.MetricsApiQueryScalarDataRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
formulas: [
15+
{
16+
formula: "a",
17+
limit: {
18+
count: 10,
19+
order: "desc",
20+
},
21+
},
22+
],
23+
from: 1636625471000,
24+
queries: [
25+
{
26+
dataSource: "slo",
27+
name: "a",
28+
sloId: "12345678910",
29+
measure: "slo_status",
30+
sloQueryType: "metric",
31+
groupMode: "overall",
32+
additionalQueryFilters: "*",
33+
},
34+
],
35+
to: 1636629071000,
36+
},
37+
type: "scalar_request",
38+
},
39+
},
40+
};
41+
42+
apiInstance
43+
.queryScalarData(params)
44+
.then((data: v2.ScalarFormulaQueryResponse) => {
45+
console.log(
46+
"API called successfully. Returned data: " + JSON.stringify(data)
47+
);
48+
})
49+
.catch((error: any) => console.error(error));
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/**
2+
* Scalar cross product query with apm_dependency_stats data source returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.MetricsApi(configuration);
9+
10+
const params: v2.MetricsApiQueryScalarDataRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
formulas: [
15+
{
16+
formula: "a",
17+
limit: {
18+
count: 10,
19+
order: "desc",
20+
},
21+
},
22+
],
23+
from: 1636625471000,
24+
queries: [
25+
{
26+
dataSource: "apm_dependency_stats",
27+
name: "a",
28+
env: "ci",
29+
service: "cassandra",
30+
stat: "avg_duration",
31+
operationName: "cassandra.query",
32+
resourceName:
33+
"DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?",
34+
primaryTagName: "datacenter",
35+
primaryTagValue: "edge-eu1.prod.dog",
36+
},
37+
],
38+
to: 1636629071000,
39+
},
40+
type: "scalar_request",
41+
},
42+
},
43+
};
44+
45+
apiInstance
46+
.queryScalarData(params)
47+
.then((data: v2.ScalarFormulaQueryResponse) => {
48+
console.log(
49+
"API called successfully. Returned data: " + JSON.stringify(data)
50+
);
51+
})
52+
.catch((error: any) => console.error(error));
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/**
2+
* Scalar cross product query with process data source returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.MetricsApi(configuration);
9+
10+
const params: v2.MetricsApiQueryScalarDataRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
formulas: [
15+
{
16+
formula: "a",
17+
limit: {
18+
count: 10,
19+
order: "desc",
20+
},
21+
},
22+
],
23+
from: 1636625471000,
24+
queries: [
25+
{
26+
dataSource: "process",
27+
name: "a",
28+
metric: "process.stat.cpu.total_pct",
29+
aggregator: "avg",
30+
textFilter: "",
31+
tagFilters: [],
32+
limit: 10,
33+
sort: "desc",
34+
isNormalizedCpu: false,
35+
},
36+
],
37+
to: 1636629071000,
38+
},
39+
type: "scalar_request",
40+
},
41+
},
42+
};
43+
44+
apiInstance
45+
.queryScalarData(params)
46+
.then((data: v2.ScalarFormulaQueryResponse) => {
47+
console.log(
48+
"API called successfully. Returned data: " + JSON.stringify(data)
49+
);
50+
})
51+
.catch((error: any) => console.error(error));
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Scalar cross product query with container data source returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.MetricsApi(configuration);
9+
10+
const params: v2.MetricsApiQueryScalarDataRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
formulas: [
15+
{
16+
formula: "a",
17+
limit: {
18+
count: 10,
19+
order: "desc",
20+
},
21+
},
22+
],
23+
from: 1636625471000,
24+
queries: [
25+
{
26+
dataSource: "container",
27+
name: "a",
28+
metric: "container.cpu.usage",
29+
aggregator: "avg",
30+
tagFilters: [],
31+
limit: 10,
32+
sort: "desc",
33+
},
34+
],
35+
to: 1636629071000,
36+
},
37+
type: "scalar_request",
38+
},
39+
},
40+
};
41+
42+
apiInstance
43+
.queryScalarData(params)
44+
.then((data: v2.ScalarFormulaQueryResponse) => {
45+
console.log(
46+
"API called successfully. Returned data: " + JSON.stringify(data)
47+
);
48+
})
49+
.catch((error: any) => console.error(error));
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* Timeseries cross product query with slo data source returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.MetricsApi(configuration);
9+
10+
const params: v2.MetricsApiQueryTimeseriesDataRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
formulas: [
15+
{
16+
formula: "a",
17+
limit: {
18+
count: 10,
19+
order: "desc",
20+
},
21+
},
22+
],
23+
from: 1636625471000,
24+
interval: 5000,
25+
queries: [
26+
{
27+
dataSource: "slo",
28+
name: "a",
29+
sloId: "12345678910",
30+
measure: "slo_status",
31+
sloQueryType: "metric",
32+
groupMode: "overall",
33+
additionalQueryFilters: "*",
34+
},
35+
],
36+
to: 1636629071000,
37+
},
38+
type: "timeseries_request",
39+
},
40+
},
41+
};
42+
43+
apiInstance
44+
.queryTimeseriesData(params)
45+
.then((data: v2.TimeseriesFormulaQueryResponse) => {
46+
console.log(
47+
"API called successfully. Returned data: " + JSON.stringify(data)
48+
);
49+
})
50+
.catch((error: any) => console.error(error));

0 commit comments

Comments
 (0)