Skip to content

Commit 97010a3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5ee63ae of spec repo
1 parent af4cea8 commit 97010a3

20 files changed

Lines changed: 1793 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39547,6 +39547,74 @@ components:
3954739547
- type
3954839548
- id
3954939549
type: object
39550+
ManagedOrgsData:
39551+
description: The managed organizations resource.
39552+
properties:
39553+
id:
39554+
description: The UUID of the current organization.
39555+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
39556+
format: uuid
39557+
type: string
39558+
relationships:
39559+
$ref: "#/components/schemas/ManagedOrgsRelationships"
39560+
type:
39561+
$ref: "#/components/schemas/ManagedOrgsType"
39562+
required:
39563+
- id
39564+
- type
39565+
- relationships
39566+
type: object
39567+
ManagedOrgsRelationshipToOrg:
39568+
description: Relationship to the current organization.
39569+
properties:
39570+
data:
39571+
$ref: "#/components/schemas/OrgRelationshipData"
39572+
required:
39573+
- data
39574+
type: object
39575+
ManagedOrgsRelationshipToOrgs:
39576+
description: Relationship to the managed organizations.
39577+
properties:
39578+
data:
39579+
description: List of managed organization references.
39580+
items:
39581+
$ref: "#/components/schemas/OrgRelationshipData"
39582+
type: array
39583+
required:
39584+
- data
39585+
type: object
39586+
ManagedOrgsRelationships:
39587+
description: Relationships of the managed organizations resource.
39588+
properties:
39589+
current_org:
39590+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrg"
39591+
managed_orgs:
39592+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrgs"
39593+
required:
39594+
- current_org
39595+
- managed_orgs
39596+
type: object
39597+
ManagedOrgsResponse:
39598+
description: Response containing the current organization and its managed organizations.
39599+
properties:
39600+
data:
39601+
$ref: "#/components/schemas/ManagedOrgsData"
39602+
included:
39603+
description: Included organization resources.
39604+
items:
39605+
$ref: "#/components/schemas/OrgData"
39606+
type: array
39607+
required:
39608+
- data
39609+
- included
39610+
type: object
39611+
ManagedOrgsType:
39612+
description: The resource type for managed organizations.
39613+
enum: [managed_orgs]
39614+
example: "managed_orgs"
39615+
type: string
39616+
x-enum-varnames:
39617+
- MANAGED_ORGS
3955039618
MemberTeam:
3955139619
description: A member team
3955239620
properties:
@@ -48098,6 +48166,53 @@ components:
4809848166
x-enum-varnames:
4809948167
- ASC
4810048168
- DESC
48169+
OrgAttributes:
48170+
description: Attributes of an organization.
48171+
properties:
48172+
created_at:
48173+
description: The creation timestamp of the organization.
48174+
example: "2019-09-26T17:28:28Z"
48175+
format: date-time
48176+
type: string
48177+
description:
48178+
description: A description of the organization.
48179+
example: "Production organization."
48180+
type: string
48181+
disabled:
48182+
description: Whether the organization is disabled.
48183+
example: false
48184+
type: boolean
48185+
modified_at:
48186+
description: The last modification timestamp of the organization.
48187+
example: "2024-01-15T10:30:00Z"
48188+
format: date-time
48189+
type: string
48190+
name:
48191+
description: The name of the organization.
48192+
example: "My Organization"
48193+
type: string
48194+
public_id:
48195+
description: The public identifier of the organization.
48196+
example: "abcdef12345"
48197+
type: string
48198+
sharing:
48199+
description: The sharing setting of the organization.
48200+
example: "none"
48201+
type: string
48202+
url:
48203+
description: The URL of the organization.
48204+
example: "https://app.datadoghq.com/account/my-org"
48205+
type: string
48206+
required:
48207+
- public_id
48208+
- name
48209+
- description
48210+
- sharing
48211+
- url
48212+
- disabled
48213+
- created_at
48214+
- modified_at
48215+
type: object
4810148216
OrgConfigGetResponse:
4810248217
description: A response with a single Org Config.
4810348218
properties:
@@ -48399,6 +48514,44 @@ components:
4839948514
type: string
4840048515
x-enum-varnames:
4840148516
- USERS
48517+
OrgData:
48518+
description: An organization resource.
48519+
properties:
48520+
attributes:
48521+
$ref: "#/components/schemas/OrgAttributes"
48522+
id:
48523+
description: The UUID of the organization.
48524+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
48525+
format: uuid
48526+
type: string
48527+
type:
48528+
$ref: "#/components/schemas/OrgResourceType"
48529+
required:
48530+
- id
48531+
- type
48532+
- attributes
48533+
type: object
48534+
OrgRelationshipData:
48535+
description: Reference to an organization resource.
48536+
properties:
48537+
id:
48538+
description: The UUID of the organization.
48539+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
48540+
format: uuid
48541+
type: string
48542+
type:
48543+
$ref: "#/components/schemas/OrgResourceType"
48544+
required:
48545+
- id
48546+
- type
48547+
type: object
48548+
OrgResourceType:
48549+
description: The resource type for organizations.
48550+
enum: [orgs]
48551+
example: "orgs"
48552+
type: string
48553+
x-enum-varnames:
48554+
- ORGS
4840248555
Organization:
4840348556
description: Organization object.
4840448557
properties:
@@ -98040,6 +98193,82 @@ paths:
9804098193
operator: OR
9804198194
permissions:
9804298195
- on_call_read
98196+
/api/v2/org:
98197+
get:
98198+
description: Returns the current organization and its managed organizations in JSON:API format.
98199+
operationId: ListOrgsV2
98200+
parameters:
98201+
- description: Filter managed organizations by name.
98202+
example: "My Child Org"
98203+
in: query
98204+
name: "filter[name]"
98205+
required: false
98206+
schema:
98207+
type: string
98208+
responses:
98209+
"200":
98210+
content:
98211+
application/json:
98212+
examples:
98213+
default:
98214+
value:
98215+
data:
98216+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
98217+
relationships:
98218+
current_org:
98219+
data:
98220+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
98221+
type: "orgs"
98222+
managed_orgs:
98223+
data:
98224+
- id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
98225+
type: "orgs"
98226+
type: "managed_orgs"
98227+
included:
98228+
- attributes:
98229+
created_at: "2019-09-26T17:28:28Z"
98230+
description: "Production organization."
98231+
disabled: false
98232+
modified_at: "2024-01-15T10:30:00Z"
98233+
name: "My Organization"
98234+
public_id: "abcdef12345"
98235+
sharing: "none"
98236+
url: "https://app.datadoghq.com/account/my-org"
98237+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
98238+
type: "orgs"
98239+
- attributes:
98240+
created_at: "2020-05-10T12:00:00Z"
98241+
description: "Child organization."
98242+
disabled: false
98243+
modified_at: "2024-06-20T08:15:00Z"
98244+
name: "My Child Org"
98245+
public_id: "ghijkl67890"
98246+
sharing: "none"
98247+
url: "https://app.datadoghq.com/account/my-child-org"
98248+
id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
98249+
type: "orgs"
98250+
schema:
98251+
$ref: "#/components/schemas/ManagedOrgsResponse"
98252+
description: OK
98253+
"401":
98254+
$ref: "#/components/responses/UnauthorizedResponse"
98255+
"403":
98256+
$ref: "#/components/responses/ForbiddenResponse"
98257+
"429":
98258+
$ref: "#/components/responses/TooManyRequestsResponse"
98259+
security:
98260+
- apiKeyAuth: []
98261+
appKeyAuth: []
98262+
- AuthZ:
98263+
- org_management
98264+
- org_connections_write
98265+
summary: List Managed Organizations
98266+
tags: ["Organizations"]
98267+
"x-permission":
98268+
operator: OR
98269+
permissions:
98270+
- org_management
98271+
- org_connections_write
9804398272
/api/v2/org_configs:
9804498273
get:
9804598274
description: Returns all Org Configs (name, description, and value).
@@ -114517,6 +114746,50 @@ paths:
114517114746
permissions:
114518114747
- user_access_manage
114519114748
- service_account_write
114749+
/api/v2/users/{user_id}/invitations:
114750+
delete:
114751+
description: |-
114752+
Cancel all pending invitations for a specified user.
114753+
Requires the `user_access_invite` permission.
114754+
operationId: DeleteUserInvitations
114755+
parameters:
114756+
- description: The UUID of the user whose pending invitations should be canceled.
114757+
in: path
114758+
name: user_id
114759+
required: true
114760+
schema:
114761+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
114762+
format: uuid
114763+
type: string
114764+
responses:
114765+
"200":
114766+
description: OK
114767+
"403":
114768+
content:
114769+
application/json:
114770+
schema:
114771+
$ref: "#/components/schemas/APIErrorResponse"
114772+
description: Authentication error
114773+
"404":
114774+
content:
114775+
application/json:
114776+
schema:
114777+
$ref: "#/components/schemas/APIErrorResponse"
114778+
description: Not found
114779+
"429":
114780+
$ref: "#/components/responses/TooManyRequestsResponse"
114781+
security:
114782+
- apiKeyAuth: []
114783+
appKeyAuth: []
114784+
- AuthZ:
114785+
- user_access_invite
114786+
summary: Delete a pending user's invitations
114787+
tags:
114788+
- Users
114789+
"x-permission":
114790+
operator: OR
114791+
permissions:
114792+
- user_access_invite
114520114793
/api/v2/users/{user_id}/orgs:
114521114794
get:
114522114795
description: |-
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List Managed Organizations returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new
5+
p api_instance.list_orgs_v2()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete a pending user's invitations returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::UsersAPI.new
5+
p api_instance.delete_user_invitations("4dee724d-00cc-11ea-a77b-570c9d03c6c5")

features/scenarios_model_mapping.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3227,6 +3227,9 @@
32273227
"v2.ResolveOnCallPage" => {
32283228
"page_id" => "UUID",
32293229
},
3230+
"v2.ListOrgsV2" => {
3231+
"filter_name" => "String",
3232+
},
32303233
"v2.GetOrgConfig" => {
32313234
"org_config_name" => "String",
32323235
},
@@ -4284,6 +4287,9 @@
42844287
"user_id" => "String",
42854288
"body" => "UserUpdateRequest",
42864289
},
4290+
"v2.DeleteUserInvitations" => {
4291+
"user_id" => "UUID",
4292+
},
42874293
"v2.ListUserOrganizations" => {
42884294
"user_id" => "String",
42894295
},

features/v2/organizations.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ Feature: Organizations
2929
When the request is sent
3030
Then the response status is 200 OK
3131

32+
@generated @skip @team:DataDog/org-management
33+
Scenario: List Managed Organizations returns "OK" response
34+
Given new "ListOrgsV2" request
35+
When the request is sent
36+
Then the response status is 200 OK
37+
3238
@generated @skip @team:DataDog/team-aaa-identity
3339
Scenario: List Org Configs returns "Bad Request" response
3440
Given new "ListOrgConfigs" request

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3951,6 +3951,12 @@
39513951
"type": "safe"
39523952
}
39533953
},
3954+
"ListOrgsV2": {
3955+
"tag": "Organizations",
3956+
"undo": {
3957+
"type": "safe"
3958+
}
3959+
},
39543960
"ListOrgConfigs": {
39553961
"tag": "Organizations",
39563962
"undo": {
@@ -6531,6 +6537,12 @@
65316537
"type": "idempotent"
65326538
}
65336539
},
6540+
"DeleteUserInvitations": {
6541+
"tag": "Users",
6542+
"undo": {
6543+
"type": "safe"
6544+
}
6545+
},
65346546
"ListUserOrganizations": {
65356547
"tag": "Users",
65366548
"undo": {

features/v2/users.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ Feature: Users
2525
And the response "data.attributes.disabled" is false
2626
And the response "data.attributes.service_account" is false
2727

28+
@generated @skip @team:DataDog/org-management
29+
Scenario: Delete a pending user's invitations returns "Not found" response
30+
Given new "DeleteUserInvitations" request
31+
And request contains "user_id" parameter from "REPLACE.ME"
32+
When the request is sent
33+
Then the response status is 404 Not found
34+
35+
@generated @skip @team:DataDog/org-management
36+
Scenario: Delete a pending user's invitations returns "OK" response
37+
Given new "DeleteUserInvitations" request
38+
And request contains "user_id" parameter from "REPLACE.ME"
39+
When the request is sent
40+
Then the response status is 200 OK
41+
2842
@generated @skip @team:DataDog/team-aaa-identity
2943
Scenario: Disable a user returns "Not found" response
3044
Given new "DisableUser" request

0 commit comments

Comments
 (0)