Skip to content

Commit aa0a877

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b6afe38 of spec repo
1 parent 829507f commit aa0a877

6 files changed

Lines changed: 39 additions & 17 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10502,6 +10502,7 @@ components:
1050210502
- Host
1050310503
- HostImage
1050410504
- Image
10505+
- ServerlessFunction
1050510506
example: Repository
1050610507
type: string
1050710508
x-enum-varnames:
@@ -10510,6 +10511,7 @@ components:
1051010511
- HOST
1051110512
- HOSTIMAGE
1051210513
- IMAGE
10514+
- SERVERLESSFUNCTION
1051310515
AssetVersion:
1051410516
description: Asset version.
1051510517
properties:
@@ -175616,6 +175618,11 @@ paths:
175616175618
description: |-
175617175619
Get a list of assets SBOMs for an organization.
175618175620

175621+
The `filter[asset_type]` parameter is required for initial requests (when no `page[token]` is provided).
175622+
Subsequent pages encode the asset type in the pagination token, so `filter[asset_type]` is not required
175623+
for paginated requests. Mixing infrastructure asset types (`Host`, `HostImage`, `Image`, `ServerlessFunction`)
175624+
with code asset types (`Repository`, `Service`) in the same request is not supported and returns a 400 error.
175625+
175619175626
### Pagination
175620175627

175621175628
Please review the [Pagination section](#pagination) for the "List Vulnerabilities" endpoint.
@@ -175645,7 +175652,8 @@ paths:
175645175652
format: int64
175646175653
minimum: 1
175647175654
type: integer
175648-
- description: The type of the assets for the SBOM request.
175655+
- description: >-
175656+
The type of the assets for the SBOM request. Required for initial requests (when no `page[token]` is provided). Infrastructure types (`Host`, `HostImage`, `Image`, `ServerlessFunction`) and code types (`Repository`, `Service`) cannot be mixed in the same request.
175649175657
example: Repository
175650175658
in: query
175651175659
name: filter[asset_type]

cassettes/v2/Security-Monitoring_1187227211/List-assets-SBOMs-returns-Bad-request-Invalid-pagination-token-response_3105078366/recording.har

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"log": {
3-
"_recordingName": "Security Monitoring/List assets SBOMs returns \"Bad request: Invalid pagination token.\" response",
3+
"_recordingName": "Security Monitoring/List assets SBOMs returns \"Not found: There is no request associated with the provided token.\" response",
44
"creator": {
55
"comment": "persister:fs",
66
"name": "Polly.JS",
77
"version": "6.0.5"
88
},
99
"entries": [
1010
{
11-
"_id": "5eb3b8f53dd3195ce37e46f12fa2d7a1",
11+
"_id": "ba0ed496453ce8e10a2316ea3ab92b2f",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -21,26 +21,26 @@
2121
"value": "application/json"
2222
}
2323
],
24-
"headersSize": 553,
24+
"headersSize": 563,
2525
"httpVersion": "HTTP/1.1",
2626
"method": "GET",
2727
"queryString": [
2828
{
2929
"name": "page",
3030
"value": {
3131
"number": "1",
32-
"token": "unknown"
32+
"token": "SERVICE:unknown"
3333
}
3434
}
3535
],
36-
"url": "https://api.datadoghq.com/api/v2/security/sboms?page%5Btoken%5D=unknown&page%5Bnumber%5D=1"
36+
"url": "https://api.datadoghq.com/api/v2/security/sboms?page%5Btoken%5D=SERVICE%3Aunknown&page%5Bnumber%5D=1"
3737
},
3838
"response": {
39-
"bodySize": 104,
39+
"bodySize": 65,
4040
"content": {
4141
"mimeType": "application/vnd.api+json",
42-
"size": 104,
43-
"text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad request: asset_type\",\"detail\":\"asset_type filter is required\"}]}"
42+
"size": 65,
43+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Unexpected internal error\"}]}"
4444
},
4545
"cookies": [],
4646
"headers": [
@@ -49,14 +49,14 @@
4949
"value": "application/vnd.api+json"
5050
}
5151
],
52-
"headersSize": 661,
52+
"headersSize": 660,
5353
"httpVersion": "HTTP/1.1",
5454
"redirectURL": "",
55-
"status": 400,
56-
"statusText": "Bad Request"
55+
"status": 404,
56+
"statusText": "Not Found"
5757
},
58-
"startedDateTime": "2026-07-06T19:25:16.970Z",
59-
"time": 89
58+
"startedDateTime": "2026-06-29T19:41:26.669Z",
59+
"time": 2459
6060
}
6161
],
6262
"pages": [],

features/v2/security_monitoring.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2369,7 +2369,7 @@ Feature: Security Monitoring
23692369
@team:DataDog/k9-cloud-vm
23702370
Scenario: List assets SBOMs returns "Bad request: Invalid pagination token." response
23712371
Given new "ListAssetsSBOMs" request
2372-
And request contains "page[token]" parameter with value "unknown"
2372+
And request contains "page[token]" parameter with value "SERVICE:unknown"
23732373
And request contains "page[number]" parameter with value 1
23742374
When the request is sent
23752375
Then the response status is 400 Bad request: Invalid pagination token.

services/security_monitoring/src/v2/SecurityMonitoringApi.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20845,7 +20845,7 @@ export interface SecurityMonitoringApiListAssetsSBOMsRequest {
2084520845
*/
2084620846
pageNumber?: number;
2084720847
/**
20848-
* The type of the assets for the SBOM request.
20848+
* The type of the assets for the SBOM request. Required for initial requests (when no `page[token]` is provided). Infrastructure types (`Host`, `HostImage`, `Image`, `ServerlessFunction`) and code types (`Repository`, `Service`) cannot be mixed in the same request.
2084920849
* @type AssetType
2085020850
*/
2085120851
filterAssetType?: AssetType;
@@ -24328,6 +24328,11 @@ export class SecurityMonitoringApi {
2432824328
/**
2432924329
* Get a list of assets SBOMs for an organization.
2433024330
*
24331+
* The `filter[asset_type]` parameter is required for initial requests (when no `page[token]` is provided).
24332+
* Subsequent pages encode the asset type in the pagination token, so `filter[asset_type]` is not required
24333+
* for paginated requests. Mixing infrastructure asset types (`Host`, `HostImage`, `Image`, `ServerlessFunction`)
24334+
* with code asset types (`Repository`, `Service`) in the same request is not supported and returns a 400 error.
24335+
*
2433124336
* ### Pagination
2433224337
*
2433324338
* Please review the [Pagination section](#pagination) for the "List Vulnerabilities" endpoint.

services/security_monitoring/src/v2/models/AssetType.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ export type AssetType =
99
| typeof HOST
1010
| typeof HOSTIMAGE
1111
| typeof IMAGE
12+
| typeof SERVERLESSFUNCTION
1213
| UnparsedObject;
1314
export const REPOSITORY = "Repository";
1415
export const SERVICE = "Service";
1516
export const HOST = "Host";
1617
export const HOSTIMAGE = "HostImage";
1718
export const IMAGE = "Image";
19+
export const SERVERLESSFUNCTION = "ServerlessFunction";

services/security_monitoring/src/v2/models/TypingInfo.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,14 @@ export const TypingInfo: ModelTypingInfo = {
541541
AnalysisRequestDataType: ["analysis_request"],
542542
AnalysisResponseDataType: ["server_request"],
543543
AssetEntityType: ["assets"],
544-
AssetType: ["Repository", "Service", "Host", "HostImage", "Image"],
544+
AssetType: [
545+
"Repository",
546+
"Service",
547+
"Host",
548+
"HostImage",
549+
"Image",
550+
"ServerlessFunction",
551+
],
545552
AssigneeDataType: ["assignee"],
546553
AutomationRuleActorType: ["user", "system"],
547554
CaseDataType: ["cases"],

0 commit comments

Comments
 (0)