Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,297 changes: 1,297 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2025-10-01T20:51:23.877Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"log": {
"_recordingName": "Reference Tables/Create reference table without upload or access details returns \"Bad Request\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "b227430e09eacae9d1cd62ee343d2443",
"_order": 0,
"cache": {},
"request": {
"bodySize": 371,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 578,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"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\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/reference-tables/tables"
},
"response": {
"bodySize": 107,
"content": {
"mimeType": "application/vnd.api+json",
"size": 107,
"text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"upload_id is required for tables with 'LOCAL_FILE' source\"}]}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/vnd.api+json"
}
],
"headersSize": 670,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 400,
"statusText": "Bad Request"
},
"startedDateTime": "2025-10-01T20:51:24.507Z",
"time": 129
}
],
"pages": [],
"version": "1.2"
}
}
8 changes: 4 additions & 4 deletions features/v1/logs_pipelines.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ Feature: Logs Pipelines
@generated @skip @team:DataDog/event-platform-experience
Scenario: Create a pipeline returns "Bad Request" response
Given new "CreateLogsPipeline" request
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/event-platform-experience
Scenario: Create a pipeline returns "OK" response
Given new "CreateLogsPipeline" request
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
When the request is sent
Then the response status is 200 OK

Expand Down Expand Up @@ -128,15 +128,15 @@ Feature: Logs Pipelines
Scenario: Update a pipeline returns "Bad Request" response
Given new "UpdateLogsPipeline" request
And request contains "pipeline_id" parameter from "REPLACE.ME"
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/event-platform-experience
Scenario: Update a pipeline returns "OK" response
Given new "UpdateLogsPipeline" request
And request contains "pipeline_id" parameter from "REPLACE.ME"
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
When the request is sent
Then the response status is 200 OK

Expand Down
121 changes: 121 additions & 0 deletions features/v2/reference_tables.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
@endpoint(reference-tables) @endpoint(reference-tables-v2)
Feature: Reference Tables
Auto-generated tag Reference Tables

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "ReferenceTables" API

@generated @skip @team:DataDog/redapl-experiences
Scenario: Create reference table returns "Bad Request" response
Given new "CreateReferenceTable" request
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "name", "type": "STRING"}, {"name": "account_id", "type": "STRING"}], "primary_keys": ["account_id"]}, "source": "S3", "table_name": "test_reference_table", "tags": ["test_tag"]}, "type": "reference_table"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/redapl-experiences
Scenario: Create reference table returns "Created" response
Given new "CreateReferenceTable" request
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "name", "type": "STRING"}, {"name": "account_id", "type": "STRING"}], "primary_keys": ["account_id"]}, "source": "S3", "table_name": "test_reference_table", "tags": ["test_tag"]}, "type": "reference_table"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/redapl-experiences
Scenario: Create reference table upload returns "Bad Request" response
Given new "CreateReferenceTableUpload" request
And body with value {"data": {"attributes": {"headers": [""], "part_count": 3, "part_size": 10000000, "table_name": ""}, "type": "upload"}}
When the request is sent
Then the response status is 400 Bad Request

@skip @team:DataDog/redapl-experiences
Scenario: Create reference table upload returns "Created" response
Given new "CreateReferenceTableUpload" request
And body with value {"data": {"attributes": {"headers": ["id", "name", "value"], "table_name": "test_upload_table_{{ unique }}", "part_count": 1, "part_size": 1024}, "type": "upload"}}
When the request is sent
Then the response status is 201 Created
And the response "data.type" is equal to "upload"
And the response "data.attributes.table_name" is equal to "test_upload_table_{{ unique }}"

@skip @team:DataDog/redapl-experiences
Scenario: Create reference table with upload returns "Created" response
Given new "CreateReferenceTable" request
And body with value {"data": {"attributes": {"description": "Test reference table created via BDD test {{ unique }}", "source": "LOCAL_FILE", "file_metadata": {"upload_id": "test-upload-id-{{ unique }}"}, "schema": {"fields": [{"name": "id", "type": "STRING"}, {"name": "name", "type": "STRING"}, {"name": "value", "type": "INT32"}], "primary_keys": ["id"]}, "table_name": "test_reference_table_{{ unique }}", "tags": ["test_tag"]}, "type": "reference_table"}}
When the request is sent
Then the response status is 201 Created
And the response "data.type" is equal to "reference_table"
And the response "data.attributes.table_name" is equal to "test_reference_table_{{ unique }}"

@team:DataDog/redapl-experiences
Scenario: Create reference table without upload or access details returns "Bad Request" response
Given new "CreateReferenceTable" request
And body with value {"data": {"attributes": {"description": "Test reference table without upload or access details", "source": "LOCAL_FILE", "schema": {"fields": [{"name": "id", "type": "STRING"}], "primary_keys": ["id"]}, "table_name": "test_invalid_table_{{ unique }}", "tags": ["test_tag"]}, "type": "reference_table"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/redapl-experiences
Scenario: Delete table returns "Not Found" response
Given new "DeleteTable" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/redapl-experiences
Scenario: Delete table returns "OK" response
Given new "DeleteTable" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/redapl-experiences
Scenario: Get rows by id returns "Not Found" response
Given new "GetRowsByID" request
And request contains "row_id" parameter from "REPLACE.ME"
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/redapl-experiences
Scenario: Get rows by id returns "Some or all requested rows were found." response
Given new "GetRowsByID" request
And request contains "row_id" parameter from "REPLACE.ME"
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 Some or all requested rows were found.

@generated @skip @team:DataDog/redapl-experiences
Scenario: Get table returns "Not Found" response
Given new "GetTable" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/redapl-experiences
Scenario: Get table returns "OK" response
Given new "GetTable" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@skip @team:DataDog/redapl-experiences
Scenario: List tables returns "OK" response
Given new "ListTables" request
When the request is sent
Then the response status is 200 OK
And the response "data" has length 1

@generated @skip @team:DataDog/redapl-experiences
Scenario: Update reference table returns "Bad Request" response
Given new "UpdateReferenceTable" request
And request contains "id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/redapl-experiences
Scenario: Update reference table returns "OK" response
Given new "UpdateReferenceTable" request
And request contains "id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}}
When the request is sent
Then the response status is 200 OK
49 changes: 49 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2641,6 +2641,55 @@
"type": "idempotent"
}
},
"ListTables": {
"tag": "Reference Tables",
"undo": {
"type": "safe"
}
},
"CreateReferenceTable": {
"tag": "Reference Tables",
"undo": {
"operationId": "DeleteTable",
"parameters": [
{
"name": "id",
"source": "data.id"
}
],
"type": "unsafe"
}
},
"DeleteTable": {
"tag": "Reference Tables",
"undo": {
"type": "idempotent"
}
},
"GetTable": {
"tag": "Reference Tables",
"undo": {
"type": "safe"
}
},
"UpdateReferenceTable": {
"tag": "Reference Tables",
"undo": {
"type": "idempotent"
}
},
"GetRowsByID": {
"tag": "Reference Tables",
"undo": {
"type": "safe"
}
},
"CreateReferenceTableUpload": {
"tag": "Reference Tables",
"undo": {
"type": "idempotent"
}
},
"ListApplicationSecurityWAFCustomRules": {
"tag": "Application Security",
"undo": {
Expand Down
1 change: 1 addition & 0 deletions packages/datadog-api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ apiInstance
| PagerDuty Integration | @datadog/datadog-api-client-pager-duty-integration | [README.md](../../services/pager-duty-integration/README.md) |
| Powerpack | @datadog/datadog-api-client-powerpack | [README.md](../../services/powerpack/README.md) |
| Processes | @datadog/datadog-api-client-processes | [README.md](../../services/processes/README.md) |
| Reference Tables | @datadog/datadog-api-client-reference-tables | [README.md](../../services/reference-tables/README.md) |
| Restriction Policies | @datadog/datadog-api-client-restriction-policies | [README.md](../../services/restriction-policies/README.md) |
| Roles | @datadog/datadog-api-client-roles | [README.md](../../services/roles/README.md) |
| RUM | @datadog/datadog-api-client-rum | [README.md](../../services/rum/README.md) |
Expand Down
77 changes: 77 additions & 0 deletions private/bdd_runner/src/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7248,6 +7248,83 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
},
operationResponseType: "ProcessSummariesResponse",
},
"ReferenceTablesApi.V2.ListTables": {
limit: {
type: "number",
format: "int64",
},
offset: {
type: "number",
format: "int64",
},
sort: {
type: "ReferenceTableSortType",
format: "",
},
filterStatus: {
type: "string",
format: "",
},
filterTableNameExact: {
type: "string",
format: "",
},
filterTableNameContains: {
type: "string",
format: "",
},
operationResponseType: "TableResultV2Array",
},
"ReferenceTablesApi.V2.CreateReferenceTable": {
body: {
type: "CreateTableRequest",
format: "",
},
operationResponseType: "TableResultV2",
},
"ReferenceTablesApi.V2.GetTable": {
id: {
type: "string",
format: "",
},
operationResponseType: "TableResultV2",
},
"ReferenceTablesApi.V2.DeleteTable": {
id: {
type: "string",
format: "",
},
operationResponseType: "{}",
},
"ReferenceTablesApi.V2.UpdateReferenceTable": {
id: {
type: "string",
format: "",
},
body: {
type: "PatchTableRequest",
format: "",
},
operationResponseType: "{}",
},
"ReferenceTablesApi.V2.GetRowsByID": {
rowId: {
type: "Array<string>",
format: "",
},
id: {
type: "string",
format: "",
},
operationResponseType: "TableRowResourceArray",
},
"ReferenceTablesApi.V2.CreateReferenceTableUpload": {
body: {
type: "CreateUploadRequest",
format: "",
},
operationResponseType: "CreateUploadResponse",
},
"ApplicationSecurityApi.V2.ListApplicationSecurityWAFCustomRules": {
operationResponseType: "ApplicationSecurityWafCustomRuleListResponse",
},
Expand Down
1 change: 1 addition & 0 deletions services/reference_tables/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
Loading