Skip to content

Commit 371a8fa

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 934826b of spec repo
1 parent 43b92ca commit 371a8fa

20 files changed

Lines changed: 1794 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42396,6 +42396,74 @@ components:
4239642396
- type
4239742397
- id
4239842398
type: object
42399+
ManagedOrgsData:
42400+
description: The managed organizations resource.
42401+
properties:
42402+
id:
42403+
description: The UUID of the current organization.
42404+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
42405+
format: uuid
42406+
type: string
42407+
relationships:
42408+
$ref: "#/components/schemas/ManagedOrgsRelationships"
42409+
type:
42410+
$ref: "#/components/schemas/ManagedOrgsType"
42411+
required:
42412+
- id
42413+
- type
42414+
- relationships
42415+
type: object
42416+
ManagedOrgsRelationshipToOrg:
42417+
description: Relationship to the current organization.
42418+
properties:
42419+
data:
42420+
$ref: "#/components/schemas/OrgRelationshipData"
42421+
required:
42422+
- data
42423+
type: object
42424+
ManagedOrgsRelationshipToOrgs:
42425+
description: Relationship to the managed organizations.
42426+
properties:
42427+
data:
42428+
description: List of managed organization references.
42429+
items:
42430+
$ref: "#/components/schemas/OrgRelationshipData"
42431+
type: array
42432+
required:
42433+
- data
42434+
type: object
42435+
ManagedOrgsRelationships:
42436+
description: Relationships of the managed organizations resource.
42437+
properties:
42438+
current_org:
42439+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrg"
42440+
managed_orgs:
42441+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrgs"
42442+
required:
42443+
- current_org
42444+
- managed_orgs
42445+
type: object
42446+
ManagedOrgsResponse:
42447+
description: Response containing the current organization and its managed organizations.
42448+
properties:
42449+
data:
42450+
$ref: "#/components/schemas/ManagedOrgsData"
42451+
included:
42452+
description: Included organization resources.
42453+
items:
42454+
$ref: "#/components/schemas/OrgData"
42455+
type: array
42456+
required:
42457+
- data
42458+
- included
42459+
type: object
42460+
ManagedOrgsType:
42461+
description: The resource type for managed organizations.
42462+
enum: [managed_orgs]
42463+
example: "managed_orgs"
42464+
type: string
42465+
x-enum-varnames:
42466+
- MANAGED_ORGS
4239942467
MemberTeam:
4240042468
description: A member team
4240142469
properties:
@@ -51091,6 +51159,53 @@ components:
5109151159
x-enum-varnames:
5109251160
- ASC
5109351161
- DESC
51162+
OrgAttributes:
51163+
description: Attributes of an organization.
51164+
properties:
51165+
created_at:
51166+
description: The creation timestamp of the organization.
51167+
example: "2019-09-26T17:28:28Z"
51168+
format: date-time
51169+
type: string
51170+
description:
51171+
description: A description of the organization.
51172+
example: "Production organization."
51173+
type: string
51174+
disabled:
51175+
description: Whether the organization is disabled.
51176+
example: false
51177+
type: boolean
51178+
modified_at:
51179+
description: The last modification timestamp of the organization.
51180+
example: "2024-01-15T10:30:00Z"
51181+
format: date-time
51182+
type: string
51183+
name:
51184+
description: The name of the organization.
51185+
example: "My Organization"
51186+
type: string
51187+
public_id:
51188+
description: The public identifier of the organization.
51189+
example: "abcdef12345"
51190+
type: string
51191+
sharing:
51192+
description: The sharing setting of the organization.
51193+
example: "none"
51194+
type: string
51195+
url:
51196+
description: The URL of the organization.
51197+
example: "https://app.datadoghq.com/account/my-org"
51198+
type: string
51199+
required:
51200+
- public_id
51201+
- name
51202+
- description
51203+
- sharing
51204+
- url
51205+
- disabled
51206+
- created_at
51207+
- modified_at
51208+
type: object
5109451209
OrgConfigGetResponse:
5109551210
description: A response with a single Org Config.
5109651211
properties:
@@ -51392,6 +51507,23 @@ components:
5139251507
type: string
5139351508
x-enum-varnames:
5139451509
- USERS
51510+
OrgData:
51511+
description: An organization resource.
51512+
properties:
51513+
attributes:
51514+
$ref: "#/components/schemas/OrgAttributes"
51515+
id:
51516+
description: The UUID of the organization.
51517+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
51518+
format: uuid
51519+
type: string
51520+
type:
51521+
$ref: "#/components/schemas/OrgResourceType"
51522+
required:
51523+
- id
51524+
- type
51525+
- attributes
51526+
type: object
5139551527
OrgGroupAttributes:
5139651528
description: Attributes of an org group.
5139751529
properties:
@@ -52316,6 +52448,27 @@ components:
5231652448
required:
5231752449
- data
5231852450
type: object
52451+
OrgRelationshipData:
52452+
description: Reference to an organization resource.
52453+
properties:
52454+
id:
52455+
description: The UUID of the organization.
52456+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
52457+
format: uuid
52458+
type: string
52459+
type:
52460+
$ref: "#/components/schemas/OrgResourceType"
52461+
required:
52462+
- id
52463+
- type
52464+
type: object
52465+
OrgResourceType:
52466+
description: The resource type for organizations.
52467+
enum: [orgs]
52468+
example: "orgs"
52469+
type: string
52470+
x-enum-varnames:
52471+
- ORGS
5231952472
Organization:
5232052473
description: Organization object.
5232152474
properties:
@@ -110097,6 +110250,83 @@ paths:
110097110250
operator: OR
110098110251
permissions:
110099110252
- on_call_read
110253+
/api/v2/org:
110254+
get:
110255+
description: Returns the current organization and its managed organizations in JSON:API format.
110256+
operationId: ListOrgs
110257+
parameters:
110258+
- description: Filter managed organizations by name.
110259+
example: "My Child Org"
110260+
in: query
110261+
name: "filter[name]"
110262+
required: false
110263+
schema:
110264+
type: string
110265+
responses:
110266+
"200":
110267+
content:
110268+
application/json:
110269+
examples:
110270+
default:
110271+
value:
110272+
data:
110273+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
110274+
relationships:
110275+
current_org:
110276+
data:
110277+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
110278+
type: "orgs"
110279+
managed_orgs:
110280+
data:
110281+
- id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
110282+
type: "orgs"
110283+
type: "managed_orgs"
110284+
included:
110285+
- attributes:
110286+
created_at: "2019-09-26T17:28:28Z"
110287+
description: "Production organization."
110288+
disabled: false
110289+
modified_at: "2024-01-15T10:30:00Z"
110290+
name: "My Organization"
110291+
public_id: "abcdef12345"
110292+
sharing: "none"
110293+
url: "https://app.datadoghq.com/account/my-org"
110294+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
110295+
type: "orgs"
110296+
- attributes:
110297+
created_at: "2020-05-10T12:00:00Z"
110298+
description: "Child organization."
110299+
disabled: false
110300+
modified_at: "2024-06-20T08:15:00Z"
110301+
name: "My Child Org"
110302+
public_id: "ghijkl67890"
110303+
sharing: "none"
110304+
url: "https://app.datadoghq.com/account/my-child-org"
110305+
id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
110306+
type: "orgs"
110307+
schema:
110308+
$ref: "#/components/schemas/ManagedOrgsResponse"
110309+
description: OK
110310+
"401":
110311+
$ref: "#/components/responses/UnauthorizedResponse"
110312+
"403":
110313+
$ref: "#/components/responses/ForbiddenResponse"
110314+
"429":
110315+
$ref: "#/components/responses/TooManyRequestsResponse"
110316+
security:
110317+
- apiKeyAuth: []
110318+
appKeyAuth: []
110319+
- AuthZ:
110320+
- org_management
110321+
- org_connections_write
110322+
summary: List your managed organizations
110323+
tags:
110324+
- Organizations
110325+
"x-permission":
110326+
operator: OR
110327+
permissions:
110328+
- org_management
110329+
- org_connections_write
110100110330
/api/v2/org_configs:
110101110331
get:
110102110332
description: Returns all Org Configs (name, description, and value).
@@ -131957,6 +132187,50 @@ paths:
131957132187
permissions:
131958132188
- user_access_manage
131959132189
- service_account_write
132190+
/api/v2/users/{user_id}/invitations:
132191+
delete:
132192+
description: |-
132193+
Cancel all pending invitations for a specified user.
132194+
Requires the `user_access_invite` permission.
132195+
operationId: DeleteUserInvitations
132196+
parameters:
132197+
- description: The UUID of the user whose pending invitations should be canceled.
132198+
in: path
132199+
name: user_id
132200+
required: true
132201+
schema:
132202+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
132203+
format: uuid
132204+
type: string
132205+
responses:
132206+
"200":
132207+
description: OK
132208+
"403":
132209+
content:
132210+
application/json:
132211+
schema:
132212+
$ref: "#/components/schemas/APIErrorResponse"
132213+
description: Authentication error
132214+
"404":
132215+
content:
132216+
application/json:
132217+
schema:
132218+
$ref: "#/components/schemas/APIErrorResponse"
132219+
description: Not found
132220+
"429":
132221+
$ref: "#/components/responses/TooManyRequestsResponse"
132222+
security:
132223+
- apiKeyAuth: []
132224+
appKeyAuth: []
132225+
- AuthZ:
132226+
- user_access_invite
132227+
summary: Delete a pending user's invitations
132228+
tags:
132229+
- Users
132230+
"x-permission":
132231+
operator: OR
132232+
permissions:
132233+
- user_access_invite
131960132234
/api/v2/users/{user_id}/orgs:
131961132235
get:
131962132236
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()
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
@@ -1161,6 +1161,9 @@
11611161
"user_id" => "String",
11621162
"body" => "UserUpdateRequest",
11631163
},
1164+
"v2.DeleteUserInvitations" => {
1165+
"user_id" => "UUID",
1166+
},
11641167
"v2.ListUserOrganizations" => {
11651168
"user_id" => "String",
11661169
},
@@ -3414,6 +3417,9 @@
34143417
"v2.ResolveOnCallPage" => {
34153418
"page_id" => "UUID",
34163419
},
3420+
"v2.ListOrgs" => {
3421+
"filter_name" => "String",
3422+
},
34173423
"v2.GetOrgConfig" => {
34183424
"org_config_name" => "String",
34193425
},

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 "ListOrgs" 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
@@ -4131,6 +4131,12 @@
41314131
"type": "safe"
41324132
}
41334133
},
4134+
"ListOrgs": {
4135+
"tag": "Organizations",
4136+
"undo": {
4137+
"type": "safe"
4138+
}
4139+
},
41344140
"ListOrgConfigs": {
41354141
"tag": "Organizations",
41364142
"undo": {
@@ -7011,6 +7017,12 @@
70117017
"type": "idempotent"
70127018
}
70137019
},
7020+
"DeleteUserInvitations": {
7021+
"tag": "Users",
7022+
"undo": {
7023+
"type": "safe"
7024+
}
7025+
},
70147026
"ListUserOrganizations": {
70157027
"tag": "Users",
70167028
"undo": {

0 commit comments

Comments
 (0)