Skip to content

Commit fb156e5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e1a0059 of spec repo
1 parent 0a5362f commit fb156e5

20 files changed

+1794
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40409,6 +40409,74 @@ components:
4040940409
- type
4041040410
- id
4041140411
type: object
40412+
ManagedOrgsData:
40413+
description: The managed organizations resource.
40414+
properties:
40415+
id:
40416+
description: The UUID of the current organization.
40417+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
40418+
format: uuid
40419+
type: string
40420+
relationships:
40421+
$ref: "#/components/schemas/ManagedOrgsRelationships"
40422+
type:
40423+
$ref: "#/components/schemas/ManagedOrgsType"
40424+
required:
40425+
- id
40426+
- type
40427+
- relationships
40428+
type: object
40429+
ManagedOrgsRelationshipToOrg:
40430+
description: Relationship to the current organization.
40431+
properties:
40432+
data:
40433+
$ref: "#/components/schemas/OrgRelationshipData"
40434+
required:
40435+
- data
40436+
type: object
40437+
ManagedOrgsRelationshipToOrgs:
40438+
description: Relationship to the managed organizations.
40439+
properties:
40440+
data:
40441+
description: List of managed organization references.
40442+
items:
40443+
$ref: "#/components/schemas/OrgRelationshipData"
40444+
type: array
40445+
required:
40446+
- data
40447+
type: object
40448+
ManagedOrgsRelationships:
40449+
description: Relationships of the managed organizations resource.
40450+
properties:
40451+
current_org:
40452+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrg"
40453+
managed_orgs:
40454+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrgs"
40455+
required:
40456+
- current_org
40457+
- managed_orgs
40458+
type: object
40459+
ManagedOrgsResponse:
40460+
description: Response containing the current organization and its managed organizations.
40461+
properties:
40462+
data:
40463+
$ref: "#/components/schemas/ManagedOrgsData"
40464+
included:
40465+
description: Included organization resources.
40466+
items:
40467+
$ref: "#/components/schemas/OrgData"
40468+
type: array
40469+
required:
40470+
- data
40471+
- included
40472+
type: object
40473+
ManagedOrgsType:
40474+
description: The resource type for managed organizations.
40475+
enum: [managed_orgs]
40476+
example: "managed_orgs"
40477+
type: string
40478+
x-enum-varnames:
40479+
- MANAGED_ORGS
4041240480
MemberTeam:
4041340481
description: A member team
4041440482
properties:
@@ -49104,6 +49172,53 @@ components:
4910449172
x-enum-varnames:
4910549173
- ASC
4910649174
- DESC
49175+
OrgAttributes:
49176+
description: Attributes of an organization.
49177+
properties:
49178+
created_at:
49179+
description: The creation timestamp of the organization.
49180+
example: "2019-09-26T17:28:28Z"
49181+
format: date-time
49182+
type: string
49183+
description:
49184+
description: A description of the organization.
49185+
example: "Production organization."
49186+
type: string
49187+
disabled:
49188+
description: Whether the organization is disabled.
49189+
example: false
49190+
type: boolean
49191+
modified_at:
49192+
description: The last modification timestamp of the organization.
49193+
example: "2024-01-15T10:30:00Z"
49194+
format: date-time
49195+
type: string
49196+
name:
49197+
description: The name of the organization.
49198+
example: "My Organization"
49199+
type: string
49200+
public_id:
49201+
description: The public identifier of the organization.
49202+
example: "abcdef12345"
49203+
type: string
49204+
sharing:
49205+
description: The sharing setting of the organization.
49206+
example: "none"
49207+
type: string
49208+
url:
49209+
description: The URL of the organization.
49210+
example: "https://app.datadoghq.com/account/my-org"
49211+
type: string
49212+
required:
49213+
- public_id
49214+
- name
49215+
- description
49216+
- sharing
49217+
- url
49218+
- disabled
49219+
- created_at
49220+
- modified_at
49221+
type: object
4910749222
OrgConfigGetResponse:
4910849223
description: A response with a single Org Config.
4910949224
properties:
@@ -49405,6 +49520,23 @@ components:
4940549520
type: string
4940649521
x-enum-varnames:
4940749522
- USERS
49523+
OrgData:
49524+
description: An organization resource.
49525+
properties:
49526+
attributes:
49527+
$ref: "#/components/schemas/OrgAttributes"
49528+
id:
49529+
description: The UUID of the organization.
49530+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
49531+
format: uuid
49532+
type: string
49533+
type:
49534+
$ref: "#/components/schemas/OrgResourceType"
49535+
required:
49536+
- id
49537+
- type
49538+
- attributes
49539+
type: object
4940849540
OrgGroupAttributes:
4940949541
description: Attributes of an org group.
4941049542
properties:
@@ -50297,6 +50429,27 @@ components:
5029750429
required:
5029850430
- data
5029950431
type: object
50432+
OrgRelationshipData:
50433+
description: Reference to an organization resource.
50434+
properties:
50435+
id:
50436+
description: The UUID of the organization.
50437+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
50438+
format: uuid
50439+
type: string
50440+
type:
50441+
$ref: "#/components/schemas/OrgResourceType"
50442+
required:
50443+
- id
50444+
- type
50445+
type: object
50446+
OrgResourceType:
50447+
description: The resource type for organizations.
50448+
enum: [orgs]
50449+
example: "orgs"
50450+
type: string
50451+
x-enum-varnames:
50452+
- ORGS
5030050453
Organization:
5030150454
description: Organization object.
5030250455
properties:
@@ -101731,6 +101884,83 @@ paths:
101731101884
operator: OR
101732101885
permissions:
101733101886
- on_call_read
101887+
/api/v2/org:
101888+
get:
101889+
description: Returns the current organization and its managed organizations in JSON:API format.
101890+
operationId: ListOrgsV2
101891+
parameters:
101892+
- description: Filter managed organizations by name.
101893+
example: "My Child Org"
101894+
in: query
101895+
name: "filter[name]"
101896+
required: false
101897+
schema:
101898+
type: string
101899+
responses:
101900+
"200":
101901+
content:
101902+
application/json:
101903+
examples:
101904+
default:
101905+
value:
101906+
data:
101907+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
101908+
relationships:
101909+
current_org:
101910+
data:
101911+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
101912+
type: "orgs"
101913+
managed_orgs:
101914+
data:
101915+
- id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
101916+
type: "orgs"
101917+
type: "managed_orgs"
101918+
included:
101919+
- attributes:
101920+
created_at: "2019-09-26T17:28:28Z"
101921+
description: "Production organization."
101922+
disabled: false
101923+
modified_at: "2024-01-15T10:30:00Z"
101924+
name: "My Organization"
101925+
public_id: "abcdef12345"
101926+
sharing: "none"
101927+
url: "https://app.datadoghq.com/account/my-org"
101928+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
101929+
type: "orgs"
101930+
- attributes:
101931+
created_at: "2020-05-10T12:00:00Z"
101932+
description: "Child organization."
101933+
disabled: false
101934+
modified_at: "2024-06-20T08:15:00Z"
101935+
name: "My Child Org"
101936+
public_id: "ghijkl67890"
101937+
sharing: "none"
101938+
url: "https://app.datadoghq.com/account/my-child-org"
101939+
id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
101940+
type: "orgs"
101941+
schema:
101942+
$ref: "#/components/schemas/ManagedOrgsResponse"
101943+
description: OK
101944+
"401":
101945+
$ref: "#/components/responses/UnauthorizedResponse"
101946+
"403":
101947+
$ref: "#/components/responses/ForbiddenResponse"
101948+
"429":
101949+
$ref: "#/components/responses/TooManyRequestsResponse"
101950+
security:
101951+
- apiKeyAuth: []
101952+
appKeyAuth: []
101953+
- AuthZ:
101954+
- org_management
101955+
- org_connections_write
101956+
summary: List your managed organizations
101957+
tags:
101958+
- Organizations
101959+
"x-permission":
101960+
operator: OR
101961+
permissions:
101962+
- org_management
101963+
- org_connections_write
101734101964
/api/v2/org_configs:
101735101965
get:
101736101966
description: Returns all Org Configs (name, description, and value).
@@ -119512,6 +119742,50 @@ paths:
119512119742
permissions:
119513119743
- user_access_manage
119514119744
- service_account_write
119745+
/api/v2/users/{user_id}/invitations:
119746+
delete:
119747+
description: |-
119748+
Cancel all pending invitations for a specified user.
119749+
Requires the `user_access_invite` permission.
119750+
operationId: DeleteUserInvitations
119751+
parameters:
119752+
- description: The UUID of the user whose pending invitations should be canceled.
119753+
in: path
119754+
name: user_id
119755+
required: true
119756+
schema:
119757+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
119758+
format: uuid
119759+
type: string
119760+
responses:
119761+
"200":
119762+
description: OK
119763+
"403":
119764+
content:
119765+
application/json:
119766+
schema:
119767+
$ref: "#/components/schemas/APIErrorResponse"
119768+
description: Authentication error
119769+
"404":
119770+
content:
119771+
application/json:
119772+
schema:
119773+
$ref: "#/components/schemas/APIErrorResponse"
119774+
description: Not found
119775+
"429":
119776+
$ref: "#/components/responses/TooManyRequestsResponse"
119777+
security:
119778+
- apiKeyAuth: []
119779+
appKeyAuth: []
119780+
- AuthZ:
119781+
- user_access_invite
119782+
summary: Delete a pending user's invitations
119783+
tags:
119784+
- Users
119785+
"x-permission":
119786+
operator: OR
119787+
permissions:
119788+
- user_access_invite
119515119789
/api/v2/users/{user_id}/orgs:
119516119790
get:
119517119791
description: |-
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List your 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
@@ -3292,6 +3292,9 @@
32923292
"v2.ResolveOnCallPage" => {
32933293
"page_id" => "UUID",
32943294
},
3295+
"v2.ListOrgsV2" => {
3296+
"filter_name" => "String",
3297+
},
32953298
"v2.GetOrgConfig" => {
32963299
"org_config_name" => "String",
32973300
},
@@ -4419,6 +4422,9 @@
44194422
"user_id" => "String",
44204423
"body" => "UserUpdateRequest",
44214424
},
4425+
"v2.DeleteUserInvitations" => {
4426+
"user_id" => "UUID",
4427+
},
44224428
"v2.ListUserOrganizations" => {
44234429
"user_id" => "String",
44244430
},

features/v2/organizations.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ Feature: Organizations
4141
When the request is sent
4242
Then the response status is 200 OK
4343

44+
@generated @skip @team:DataDog/org-management
45+
Scenario: List your managed organizations returns "OK" response
46+
Given new "ListOrgsV2" request
47+
When the request is sent
48+
Then the response status is 200 OK
49+
4450
@team:DataDog/org-management
4551
Scenario: Update a specific Org Config returns "Bad Request" response
4652
Given new "UpdateOrgConfig" request

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4076,6 +4076,12 @@
40764076
"type": "safe"
40774077
}
40784078
},
4079+
"ListOrgsV2": {
4080+
"tag": "Organizations",
4081+
"undo": {
4082+
"type": "safe"
4083+
}
4084+
},
40794085
"ListOrgConfigs": {
40804086
"tag": "Organizations",
40814087
"undo": {
@@ -6794,6 +6800,12 @@
67946800
"type": "idempotent"
67956801
}
67966802
},
6803+
"DeleteUserInvitations": {
6804+
"tag": "Users",
6805+
"undo": {
6806+
"type": "safe"
6807+
}
6808+
},
67976809
"ListUserOrganizations": {
67986810
"tag": "Users",
67996811
"undo": {

0 commit comments

Comments
 (0)