Skip to content

Commit ac65eac

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 77aa226 of spec repo (#3594)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent e181b9e commit ac65eac

22 files changed

Lines changed: 2003 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75076,6 +75076,18 @@ components:
7507675076
required:
7507775077
- data
7507875078
type: object
75079+
OwnershipConfidenceLevel:
75080+
description: The ownership confidence level.
75081+
enum:
75082+
- high
75083+
- medium
75084+
- low
75085+
example: high
75086+
type: string
75087+
x-enum-varnames:
75088+
- HIGH
75089+
- MEDIUM
75090+
- LOW
7507975091
OwnershipEvidenceAttributes:
7508075092
description: The attributes of an ownership evidence response.
7508175093
properties:
@@ -75639,6 +75651,152 @@ components:
7563975651
- TEAM
7564075652
- SERVICE
7564175653
- UNKNOWN
75654+
OwnershipSettingsAttributes:
75655+
description: The attributes of the ownership settings response.
75656+
properties:
75657+
auto_tag:
75658+
description: Whether automatic ownership tagging is enabled.
75659+
example: true
75660+
type: boolean
75661+
confidence_level:
75662+
$ref: "#/components/schemas/OwnershipConfidenceLevel"
75663+
version:
75664+
description: The current version of the ownership settings.
75665+
example: 1
75666+
format: int64
75667+
type: integer
75668+
required:
75669+
- version
75670+
- auto_tag
75671+
- confidence_level
75672+
type: object
75673+
OwnershipSettingsData:
75674+
description: The data wrapper for an ownership settings response.
75675+
properties:
75676+
attributes:
75677+
$ref: "#/components/schemas/OwnershipSettingsAttributes"
75678+
id:
75679+
description: The identifier of the ownership settings resource.
75680+
example: settings
75681+
type: string
75682+
type:
75683+
$ref: "#/components/schemas/OwnershipSettingsType"
75684+
required:
75685+
- id
75686+
- type
75687+
- attributes
75688+
type: object
75689+
OwnershipSettingsRequest:
75690+
description: The request body for updating ownership settings.
75691+
properties:
75692+
data:
75693+
$ref: "#/components/schemas/OwnershipSettingsRequestData"
75694+
required:
75695+
- data
75696+
type: object
75697+
OwnershipSettingsRequestAttributes:
75698+
description: The attributes of an ownership settings request.
75699+
properties:
75700+
auto_tag:
75701+
description: Whether automatic ownership tagging is enabled.
75702+
example: true
75703+
type: boolean
75704+
confidence_level:
75705+
$ref: "#/components/schemas/OwnershipConfidenceLevel"
75706+
required:
75707+
- auto_tag
75708+
- confidence_level
75709+
type: object
75710+
OwnershipSettingsRequestData:
75711+
description: The data wrapper for an ownership settings request.
75712+
properties:
75713+
attributes:
75714+
$ref: "#/components/schemas/OwnershipSettingsRequestAttributes"
75715+
type:
75716+
$ref: "#/components/schemas/OwnershipSettingsType"
75717+
required:
75718+
- type
75719+
- attributes
75720+
type: object
75721+
OwnershipSettingsResponse:
75722+
description: The response returned when retrieving or updating ownership settings.
75723+
properties:
75724+
data:
75725+
$ref: "#/components/schemas/OwnershipSettingsData"
75726+
required:
75727+
- data
75728+
type: object
75729+
OwnershipSettingsType:
75730+
default: ownership_settings
75731+
description: The type of the ownership settings resource. The value should always be `ownership_settings`.
75732+
enum:
75733+
- ownership_settings
75734+
example: ownership_settings
75735+
type: string
75736+
x-enum-varnames:
75737+
- OWNERSHIP_SETTINGS
75738+
OwnershipUntaggedFindingsAttributes:
75739+
description: The counts of findings without a team tag by ownership confidence.
75740+
properties:
75741+
high_confidence:
75742+
description: The number of high confidence findings without a team tag.
75743+
example: 30
75744+
format: int64
75745+
type: integer
75746+
low_confidence:
75747+
description: The number of low confidence findings without a team tag.
75748+
example: 42
75749+
format: int64
75750+
type: integer
75751+
medium_confidence:
75752+
description: The number of medium confidence findings without a team tag.
75753+
example: 70
75754+
format: int64
75755+
type: integer
75756+
total:
75757+
description: The total number of findings without a team tag.
75758+
example: 142
75759+
format: int64
75760+
type: integer
75761+
required:
75762+
- total
75763+
- high_confidence
75764+
- medium_confidence
75765+
- low_confidence
75766+
type: object
75767+
OwnershipUntaggedFindingsData:
75768+
description: The data wrapper for an ownership untagged findings response.
75769+
properties:
75770+
attributes:
75771+
$ref: "#/components/schemas/OwnershipUntaggedFindingsAttributes"
75772+
id:
75773+
description: The identifier of the ownership untagged findings resource.
75774+
example: untagged
75775+
type: string
75776+
type:
75777+
$ref: "#/components/schemas/OwnershipUntaggedFindingsType"
75778+
required:
75779+
- id
75780+
- type
75781+
- attributes
75782+
type: object
75783+
OwnershipUntaggedFindingsResponse:
75784+
description: The response returned when counting findings without a team tag by ownership confidence.
75785+
properties:
75786+
data:
75787+
$ref: "#/components/schemas/OwnershipUntaggedFindingsData"
75788+
required:
75789+
- data
75790+
type: object
75791+
OwnershipUntaggedFindingsType:
75792+
default: ownership_untagged_findings
75793+
description: The type of the ownership untagged findings resource. The value should always be `ownership_untagged_findings`.
75794+
enum:
75795+
- ownership_untagged_findings
75796+
example: ownership_untagged_findings
75797+
type: string
75798+
x-enum-varnames:
75799+
- OWNERSHIP_UNTAGGED_FINDINGS
7564275800
PageAnnotationsAttributes:
7564375801
description: Attributes of the annotations on a page.
7564475802
properties:
@@ -132295,6 +132453,128 @@ paths:
132295132453
$ref: "#/components/responses/TooManyRequestsResponse"
132296132454
summary: Get all CSM Serverless Agents
132297132455
tags: ["CSM Agents"]
132456+
/api/v2/csm/ownership/settings:
132457+
get:
132458+
description: Get ownership settings for the org. When settings are unset, the API returns the default opt-out configuration with `auto_tag` set to `true` and `confidence_level` set to `high`.
132459+
operationId: GetOwnershipSettings
132460+
responses:
132461+
"200":
132462+
content:
132463+
application/json:
132464+
examples:
132465+
default:
132466+
value:
132467+
data:
132468+
attributes:
132469+
auto_tag: true
132470+
confidence_level: high
132471+
version: 1
132472+
id: settings
132473+
type: ownership_settings
132474+
schema:
132475+
$ref: "#/components/schemas/OwnershipSettingsResponse"
132476+
description: OK
132477+
"401":
132478+
content:
132479+
application/json:
132480+
schema:
132481+
$ref: "#/components/schemas/JSONAPIErrorResponse"
132482+
description: Unauthorized
132483+
"429":
132484+
$ref: "#/components/responses/TooManyRequestsResponse"
132485+
summary: Get ownership settings for the org
132486+
tags: ["CSM Ownership"]
132487+
x-unstable: |-
132488+
**Note**: This endpoint is in Preview and may be subject to change.
132489+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
132490+
post:
132491+
description: Update ownership settings for the org.
132492+
operationId: PostOwnershipSettings
132493+
requestBody:
132494+
content:
132495+
application/json:
132496+
examples:
132497+
default:
132498+
value:
132499+
data:
132500+
attributes:
132501+
auto_tag: true
132502+
confidence_level: high
132503+
type: ownership_settings
132504+
schema:
132505+
$ref: "#/components/schemas/OwnershipSettingsRequest"
132506+
required: true
132507+
responses:
132508+
"200":
132509+
content:
132510+
application/json:
132511+
examples:
132512+
default:
132513+
value:
132514+
data:
132515+
attributes:
132516+
auto_tag: true
132517+
confidence_level: high
132518+
version: 1
132519+
id: settings
132520+
type: ownership_settings
132521+
schema:
132522+
$ref: "#/components/schemas/OwnershipSettingsResponse"
132523+
description: OK
132524+
"400":
132525+
content:
132526+
application/json:
132527+
schema:
132528+
$ref: "#/components/schemas/JSONAPIErrorResponse"
132529+
description: Bad Request
132530+
"401":
132531+
content:
132532+
application/json:
132533+
schema:
132534+
$ref: "#/components/schemas/JSONAPIErrorResponse"
132535+
description: Unauthorized
132536+
"429":
132537+
$ref: "#/components/responses/TooManyRequestsResponse"
132538+
summary: Update ownership settings for the org
132539+
tags: ["CSM Ownership"]
132540+
x-unstable: |-
132541+
**Note**: This endpoint is in Preview and may be subject to change.
132542+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
132543+
/api/v2/csm/ownership/settings/untagged:
132544+
get:
132545+
description: Count findings with no team tag, grouped by ownership confidence level.
132546+
operationId: GetOwnershipUntaggedFindings
132547+
responses:
132548+
"200":
132549+
content:
132550+
application/json:
132551+
examples:
132552+
default:
132553+
value:
132554+
data:
132555+
attributes:
132556+
high_confidence: 30
132557+
low_confidence: 42
132558+
medium_confidence: 70
132559+
total: 142
132560+
id: untagged
132561+
type: ownership_untagged_findings
132562+
schema:
132563+
$ref: "#/components/schemas/OwnershipUntaggedFindingsResponse"
132564+
description: OK
132565+
"401":
132566+
content:
132567+
application/json:
132568+
schema:
132569+
$ref: "#/components/schemas/JSONAPIErrorResponse"
132570+
description: Unauthorized
132571+
"429":
132572+
$ref: "#/components/responses/TooManyRequestsResponse"
132573+
summary: Count untagged findings by ownership confidence
132574+
tags: ["CSM Ownership"]
132575+
x-unstable: |-
132576+
**Note**: This endpoint is in Preview and may be subject to change.
132577+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
132298132578
/api/v2/csm/ownership/{resource_id}:
132299132579
get:
132300132580
description: Get all current ownership inferences for a resource, one per owner type (`user`, `team`, `service`, `unknown`).
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get ownership settings for the org returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_ownership_settings".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CSMOwnershipAPI.new
8+
p api_instance.get_ownership_settings()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Count untagged findings by ownership confidence returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_ownership_untagged_findings".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CSMOwnershipAPI.new
8+
p api_instance.get_ownership_untagged_findings()
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Update ownership settings for the org returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.post_ownership_settings".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CSMOwnershipAPI.new
8+
9+
body = DatadogAPIClient::V2::OwnershipSettingsRequest.new({
10+
data: DatadogAPIClient::V2::OwnershipSettingsRequestData.new({
11+
attributes: DatadogAPIClient::V2::OwnershipSettingsRequestAttributes.new({
12+
auto_tag: true,
13+
confidence_level: DatadogAPIClient::V2::OwnershipConfidenceLevel::HIGH,
14+
}),
15+
type: DatadogAPIClient::V2::OwnershipSettingsType::OWNERSHIP_SETTINGS,
16+
}),
17+
})
18+
p api_instance.post_ownership_settings(body)

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3030,6 +3030,9 @@
30303030
"query" => "String",
30313031
"order_direction" => "OrderDirection",
30323032
},
3033+
"v2.PostOwnershipSettings" => {
3034+
"body" => "OwnershipSettingsRequest",
3035+
},
30333036
"v2.ListOwnershipInferences" => {
30343037
"resource_id" => "String",
30353038
},

features/v2/csm_ownership.feature

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ Feature: CSM Ownership
1212
And a valid "appKeyAuth" key in the system
1313
And an instance of "CSMOwnership" API
1414

15+
@generated @skip @team:DataDog/k9-misconfigs
16+
Scenario: Count untagged findings by ownership confidence returns "OK" response
17+
Given operation "GetOwnershipUntaggedFindings" enabled
18+
And new "GetOwnershipUntaggedFindings" request
19+
When the request is sent
20+
Then the response status is 200 OK
21+
1522
@generated @skip @team:DataDog/k9-misconfigs
1623
Scenario: Get an ownership inference by owner type returns "Bad Request" response
1724
Given operation "GetOwnershipInference" enabled
@@ -39,6 +46,13 @@ Feature: CSM Ownership
3946
When the request is sent
4047
Then the response status is 200 OK
4148

49+
@generated @skip @team:DataDog/k9-misconfigs
50+
Scenario: Get ownership settings for the org returns "OK" response
51+
Given operation "GetOwnershipSettings" enabled
52+
And new "GetOwnershipSettings" request
53+
When the request is sent
54+
Then the response status is 200 OK
55+
4256
@generated @skip @team:DataDog/k9-misconfigs
4357
Scenario: Get the evidence for an ownership inference returns "Bad Request" response
4458
Given operation "GetOwnershipEvidence" enabled
@@ -163,3 +177,19 @@ Feature: CSM Ownership
163177
And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
164178
When the request is sent
165179
Then the response status is 404 Not Found
180+
181+
@generated @skip @team:DataDog/k9-misconfigs
182+
Scenario: Update ownership settings for the org returns "Bad Request" response
183+
Given operation "PostOwnershipSettings" enabled
184+
And new "PostOwnershipSettings" request
185+
And body with value {"data": {"attributes": {"auto_tag": true, "confidence_level": "high"}, "type": "ownership_settings"}}
186+
When the request is sent
187+
Then the response status is 400 Bad Request
188+
189+
@generated @skip @team:DataDog/k9-misconfigs
190+
Scenario: Update ownership settings for the org returns "OK" response
191+
Given operation "PostOwnershipSettings" enabled
192+
And new "PostOwnershipSettings" request
193+
And body with value {"data": {"attributes": {"auto_tag": true, "confidence_level": "high"}, "type": "ownership_settings"}}
194+
When the request is sent
195+
Then the response status is 200 OK

0 commit comments

Comments
 (0)