Skip to content

Commit 474487b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2f438e8 of spec repo
1 parent 5eac345 commit 474487b

File tree

69 files changed

+5824
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+5824
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 1093 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-10-01T20:51:23.877Z"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Reference Tables/Create reference table without upload or access details returns \"Bad Request\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "b227430e09eacae9d1cd62ee343d2443",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 371,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 578,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"description\":\"Test reference table without upload or access details\",\"schema\":{\"fields\":[{\"name\":\"id\",\"type\":\"STRING\"}],\"primary_keys\":[\"id\"]},\"source\":\"LOCAL_FILE\",\"table_name\":\"test_invalid_table_Test-Create_reference_table_without_upload_or_access_details_returns_Bad_Request_response-1759351883\",\"tags\":[\"test_tag\"]},\"type\":\"reference_table\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/reference-tables/tables"
39+
},
40+
"response": {
41+
"bodySize": 107,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 107,
45+
"text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"upload_id is required for tables with 'LOCAL_FILE' source\"}]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 670,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 400,
58+
"statusText": "Bad Request"
59+
},
60+
"startedDateTime": "2025-10-01T20:51:24.507Z",
61+
"time": 129
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/**
2+
* Create reference table returns "Created" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.ReferenceTablesApi(configuration);
9+
10+
const params: v2.ReferenceTablesApiCreateReferenceTableRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
description: "this is a cloud table generated via a cloud bucket sync",
15+
fileMetadata: {
16+
accessDetails: {
17+
awsDetail: {
18+
awsAccountId: "test-account-id",
19+
awsBucketName: "test-bucket",
20+
filePath: "test_rt.csv",
21+
},
22+
},
23+
syncEnabled: true,
24+
},
25+
schema: {
26+
fields: [
27+
{
28+
name: "name",
29+
type: "STRING",
30+
},
31+
{
32+
name: "account_id",
33+
type: "STRING",
34+
},
35+
],
36+
primaryKeys: ["account_id"],
37+
},
38+
source: "S3",
39+
tableName: "test_reference_table",
40+
tags: ["test_tag"],
41+
},
42+
type: "reference_table",
43+
},
44+
},
45+
};
46+
47+
apiInstance
48+
.createReferenceTable(params)
49+
.then((data: v2.TableResultV2) => {
50+
console.log(
51+
"API called successfully. Returned data: " + JSON.stringify(data)
52+
);
53+
})
54+
.catch((error: any) => console.error(error));
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Create reference table upload returns "Created" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.ReferenceTablesApi(configuration);
9+
10+
const params: v2.ReferenceTablesApiCreateReferenceTableUploadRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
headers: ["id", "name", "value"],
15+
tableName: "test_upload_table_Example-Reference-Table",
16+
partCount: 1,
17+
partSize: 1024,
18+
},
19+
type: "upload",
20+
},
21+
},
22+
};
23+
24+
apiInstance
25+
.createReferenceTableUpload(params)
26+
.then((data: v2.CreateUploadResponse) => {
27+
console.log(
28+
"API called successfully. Returned data: " + JSON.stringify(data)
29+
);
30+
})
31+
.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+
* Create reference table with upload returns "Created" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.ReferenceTablesApi(configuration);
9+
10+
const params: v2.ReferenceTablesApiCreateReferenceTableRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
description:
15+
"Test reference table created via BDD test Example-Reference-Table",
16+
source: "LOCAL_FILE",
17+
fileMetadata: {
18+
uploadId: "test-upload-id-Example-Reference-Table",
19+
},
20+
schema: {
21+
fields: [
22+
{
23+
name: "id",
24+
type: "STRING",
25+
},
26+
{
27+
name: "name",
28+
type: "STRING",
29+
},
30+
{
31+
name: "value",
32+
type: "INT32",
33+
},
34+
],
35+
primaryKeys: ["id"],
36+
},
37+
tableName: "test_reference_table_Example-Reference-Table",
38+
tags: ["test_tag"],
39+
},
40+
type: "reference_table",
41+
},
42+
},
43+
};
44+
45+
apiInstance
46+
.createReferenceTable(params)
47+
.then((data: v2.TableResultV2) => {
48+
console.log(
49+
"API called successfully. Returned data: " + JSON.stringify(data)
50+
);
51+
})
52+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Delete table 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.ReferenceTablesApi(configuration);
9+
10+
const params: v2.ReferenceTablesApiDeleteTableRequest = {
11+
id: "id",
12+
};
13+
14+
apiInstance
15+
.deleteTable(params)
16+
.then((data: any) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Get rows by id returns "Some or all requested rows were found." response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.ReferenceTablesApi(configuration);
9+
10+
const params: v2.ReferenceTablesApiGetRowsByIDRequest = {
11+
rowId: [],
12+
id: "id",
13+
};
14+
15+
apiInstance
16+
.getRowsByID(params)
17+
.then((data: v2.TableRowResourceArray) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Get table 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.ReferenceTablesApi(configuration);
9+
10+
const params: v2.ReferenceTablesApiGetTableRequest = {
11+
id: "id",
12+
};
13+
14+
apiInstance
15+
.getTable(params)
16+
.then((data: v2.TableResultV2) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* List tables 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.ReferenceTablesApi(configuration);
9+
10+
apiInstance
11+
.listTables()
12+
.then((data: v2.TableResultV2Array) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.catch((error: any) => console.error(error));

0 commit comments

Comments
 (0)