Skip to content

Commit 518bc40

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ab39840 of spec repo
1 parent 0962c62 commit 518bc40

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
@@ -40651,6 +40651,74 @@ components:
4065140651
- type
4065240652
- id
4065340653
type: object
40654+
ManagedOrgsData:
40655+
description: The managed organizations resource.
40656+
properties:
40657+
id:
40658+
description: The UUID of the current organization.
40659+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
40660+
format: uuid
40661+
type: string
40662+
relationships:
40663+
$ref: "#/components/schemas/ManagedOrgsRelationships"
40664+
type:
40665+
$ref: "#/components/schemas/ManagedOrgsType"
40666+
required:
40667+
- id
40668+
- type
40669+
- relationships
40670+
type: object
40671+
ManagedOrgsRelationshipToOrg:
40672+
description: Relationship to the current organization.
40673+
properties:
40674+
data:
40675+
$ref: "#/components/schemas/OrgRelationshipData"
40676+
required:
40677+
- data
40678+
type: object
40679+
ManagedOrgsRelationshipToOrgs:
40680+
description: Relationship to the managed organizations.
40681+
properties:
40682+
data:
40683+
description: List of managed organization references.
40684+
items:
40685+
$ref: "#/components/schemas/OrgRelationshipData"
40686+
type: array
40687+
required:
40688+
- data
40689+
type: object
40690+
ManagedOrgsRelationships:
40691+
description: Relationships of the managed organizations resource.
40692+
properties:
40693+
current_org:
40694+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrg"
40695+
managed_orgs:
40696+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrgs"
40697+
required:
40698+
- current_org
40699+
- managed_orgs
40700+
type: object
40701+
ManagedOrgsResponse:
40702+
description: Response containing the current organization and its managed organizations.
40703+
properties:
40704+
data:
40705+
$ref: "#/components/schemas/ManagedOrgsData"
40706+
included:
40707+
description: Included organization resources.
40708+
items:
40709+
$ref: "#/components/schemas/OrgData"
40710+
type: array
40711+
required:
40712+
- data
40713+
- included
40714+
type: object
40715+
ManagedOrgsType:
40716+
description: The resource type for managed organizations.
40717+
enum: [managed_orgs]
40718+
example: "managed_orgs"
40719+
type: string
40720+
x-enum-varnames:
40721+
- MANAGED_ORGS
4065440722
MemberTeam:
4065540723
description: A member team
4065640724
properties:
@@ -49346,6 +49414,53 @@ components:
4934649414
x-enum-varnames:
4934749415
- ASC
4934849416
- DESC
49417+
OrgAttributes:
49418+
description: Attributes of an organization.
49419+
properties:
49420+
created_at:
49421+
description: The creation timestamp of the organization.
49422+
example: "2019-09-26T17:28:28Z"
49423+
format: date-time
49424+
type: string
49425+
description:
49426+
description: A description of the organization.
49427+
example: "Production organization."
49428+
type: string
49429+
disabled:
49430+
description: Whether the organization is disabled.
49431+
example: false
49432+
type: boolean
49433+
modified_at:
49434+
description: The last modification timestamp of the organization.
49435+
example: "2024-01-15T10:30:00Z"
49436+
format: date-time
49437+
type: string
49438+
name:
49439+
description: The name of the organization.
49440+
example: "My Organization"
49441+
type: string
49442+
public_id:
49443+
description: The public identifier of the organization.
49444+
example: "abcdef12345"
49445+
type: string
49446+
sharing:
49447+
description: The sharing setting of the organization.
49448+
example: "none"
49449+
type: string
49450+
url:
49451+
description: The URL of the organization.
49452+
example: "https://app.datadoghq.com/account/my-org"
49453+
type: string
49454+
required:
49455+
- public_id
49456+
- name
49457+
- description
49458+
- sharing
49459+
- url
49460+
- disabled
49461+
- created_at
49462+
- modified_at
49463+
type: object
4934949464
OrgConfigGetResponse:
4935049465
description: A response with a single Org Config.
4935149466
properties:
@@ -49647,6 +49762,23 @@ components:
4964749762
type: string
4964849763
x-enum-varnames:
4964949764
- USERS
49765+
OrgData:
49766+
description: An organization resource.
49767+
properties:
49768+
attributes:
49769+
$ref: "#/components/schemas/OrgAttributes"
49770+
id:
49771+
description: The UUID of the organization.
49772+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
49773+
format: uuid
49774+
type: string
49775+
type:
49776+
$ref: "#/components/schemas/OrgResourceType"
49777+
required:
49778+
- id
49779+
- type
49780+
- attributes
49781+
type: object
4965049782
OrgGroupAttributes:
4965149783
description: Attributes of an org group.
4965249784
properties:
@@ -50539,6 +50671,27 @@ components:
5053950671
required:
5054050672
- data
5054150673
type: object
50674+
OrgRelationshipData:
50675+
description: Reference to an organization resource.
50676+
properties:
50677+
id:
50678+
description: The UUID of the organization.
50679+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
50680+
format: uuid
50681+
type: string
50682+
type:
50683+
$ref: "#/components/schemas/OrgResourceType"
50684+
required:
50685+
- id
50686+
- type
50687+
type: object
50688+
OrgResourceType:
50689+
description: The resource type for organizations.
50690+
enum: [orgs]
50691+
example: "orgs"
50692+
type: string
50693+
x-enum-varnames:
50694+
- ORGS
5054250695
Organization:
5054350696
description: Organization object.
5054450697
properties:
@@ -102229,6 +102382,83 @@ paths:
102229102382
operator: OR
102230102383
permissions:
102231102384
- on_call_read
102385+
/api/v2/org:
102386+
get:
102387+
description: Returns the current organization and its managed organizations in JSON:API format.
102388+
operationId: ListOrgs
102389+
parameters:
102390+
- description: Filter managed organizations by name.
102391+
example: "My Child Org"
102392+
in: query
102393+
name: "filter[name]"
102394+
required: false
102395+
schema:
102396+
type: string
102397+
responses:
102398+
"200":
102399+
content:
102400+
application/json:
102401+
examples:
102402+
default:
102403+
value:
102404+
data:
102405+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
102406+
relationships:
102407+
current_org:
102408+
data:
102409+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
102410+
type: "orgs"
102411+
managed_orgs:
102412+
data:
102413+
- id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
102414+
type: "orgs"
102415+
type: "managed_orgs"
102416+
included:
102417+
- attributes:
102418+
created_at: "2019-09-26T17:28:28Z"
102419+
description: "Production organization."
102420+
disabled: false
102421+
modified_at: "2024-01-15T10:30:00Z"
102422+
name: "My Organization"
102423+
public_id: "abcdef12345"
102424+
sharing: "none"
102425+
url: "https://app.datadoghq.com/account/my-org"
102426+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
102427+
type: "orgs"
102428+
- attributes:
102429+
created_at: "2020-05-10T12:00:00Z"
102430+
description: "Child organization."
102431+
disabled: false
102432+
modified_at: "2024-06-20T08:15:00Z"
102433+
name: "My Child Org"
102434+
public_id: "ghijkl67890"
102435+
sharing: "none"
102436+
url: "https://app.datadoghq.com/account/my-child-org"
102437+
id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
102438+
type: "orgs"
102439+
schema:
102440+
$ref: "#/components/schemas/ManagedOrgsResponse"
102441+
description: OK
102442+
"401":
102443+
$ref: "#/components/responses/UnauthorizedResponse"
102444+
"403":
102445+
$ref: "#/components/responses/ForbiddenResponse"
102446+
"429":
102447+
$ref: "#/components/responses/TooManyRequestsResponse"
102448+
security:
102449+
- apiKeyAuth: []
102450+
appKeyAuth: []
102451+
- AuthZ:
102452+
- org_management
102453+
- org_connections_write
102454+
summary: List your managed organizations
102455+
tags:
102456+
- Organizations
102457+
"x-permission":
102458+
operator: OR
102459+
permissions:
102460+
- org_management
102461+
- org_connections_write
102232102462
/api/v2/org_configs:
102233102463
get:
102234102464
description: Returns all Org Configs (name, description, and value).
@@ -120406,6 +120636,50 @@ paths:
120406120636
permissions:
120407120637
- user_access_manage
120408120638
- service_account_write
120639+
/api/v2/users/{user_id}/invitations:
120640+
delete:
120641+
description: |-
120642+
Cancel all pending invitations for a specified user.
120643+
Requires the `user_access_invite` permission.
120644+
operationId: DeleteUserInvitations
120645+
parameters:
120646+
- description: The UUID of the user whose pending invitations should be canceled.
120647+
in: path
120648+
name: user_id
120649+
required: true
120650+
schema:
120651+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
120652+
format: uuid
120653+
type: string
120654+
responses:
120655+
"200":
120656+
description: OK
120657+
"403":
120658+
content:
120659+
application/json:
120660+
schema:
120661+
$ref: "#/components/schemas/APIErrorResponse"
120662+
description: Authentication error
120663+
"404":
120664+
content:
120665+
application/json:
120666+
schema:
120667+
$ref: "#/components/schemas/APIErrorResponse"
120668+
description: Not found
120669+
"429":
120670+
$ref: "#/components/responses/TooManyRequestsResponse"
120671+
security:
120672+
- apiKeyAuth: []
120673+
appKeyAuth: []
120674+
- AuthZ:
120675+
- user_access_invite
120676+
summary: Delete a pending user's invitations
120677+
tags:
120678+
- Users
120679+
"x-permission":
120680+
operator: OR
120681+
permissions:
120682+
- user_access_invite
120409120683
/api/v2/users/{user_id}/orgs:
120410120684
get:
120411120685
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
@@ -3312,6 +3312,9 @@
33123312
"v2.ResolveOnCallPage" => {
33133313
"page_id" => "UUID",
33143314
},
3315+
"v2.ListOrgs" => {
3316+
"filter_name" => "String",
3317+
},
33153318
"v2.GetOrgConfig" => {
33163319
"org_config_name" => "String",
33173320
},
@@ -4464,6 +4467,9 @@
44644467
"user_id" => "String",
44654468
"body" => "UserUpdateRequest",
44664469
},
4470+
"v2.DeleteUserInvitations" => {
4471+
"user_id" => "UUID",
4472+
},
44674473
"v2.ListUserOrganizations" => {
44684474
"user_id" => "String",
44694475
},

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
@@ -4076,6 +4076,12 @@
40764076
"type": "safe"
40774077
}
40784078
},
4079+
"ListOrgs": {
4080+
"tag": "Organizations",
4081+
"undo": {
4082+
"type": "safe"
4083+
}
4084+
},
40794085
"ListOrgConfigs": {
40804086
"tag": "Organizations",
40814087
"undo": {
@@ -6872,6 +6878,12 @@
68726878
"type": "idempotent"
68736879
}
68746880
},
6881+
"DeleteUserInvitations": {
6882+
"tag": "Users",
6883+
"undo": {
6884+
"type": "safe"
6885+
}
6886+
},
68756887
"ListUserOrganizations": {
68766888
"tag": "Users",
68776889
"undo": {

0 commit comments

Comments
 (0)