Skip to content

Commit 39406be

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d651845 of spec repo
1 parent 3549c31 commit 39406be

21 files changed

Lines changed: 1224 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40997,6 +40997,74 @@ components:
4099740997
- type
4099840998
- id
4099940999
type: object
41000+
ManagedOrgsData:
41001+
description: The managed organizations resource.
41002+
properties:
41003+
id:
41004+
description: The UUID of the current organization.
41005+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
41006+
format: uuid
41007+
type: string
41008+
relationships:
41009+
$ref: "#/components/schemas/ManagedOrgsRelationships"
41010+
type:
41011+
$ref: "#/components/schemas/ManagedOrgsType"
41012+
required:
41013+
- id
41014+
- type
41015+
- relationships
41016+
type: object
41017+
ManagedOrgsRelationshipToOrg:
41018+
description: Relationship to the current organization.
41019+
properties:
41020+
data:
41021+
$ref: "#/components/schemas/OrgRelationshipData"
41022+
required:
41023+
- data
41024+
type: object
41025+
ManagedOrgsRelationshipToOrgs:
41026+
description: Relationship to the managed organizations.
41027+
properties:
41028+
data:
41029+
description: List of managed organization references.
41030+
items:
41031+
$ref: "#/components/schemas/OrgRelationshipData"
41032+
type: array
41033+
required:
41034+
- data
41035+
type: object
41036+
ManagedOrgsRelationships:
41037+
description: Relationships of the managed organizations resource.
41038+
properties:
41039+
current_org:
41040+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrg"
41041+
managed_orgs:
41042+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrgs"
41043+
required:
41044+
- current_org
41045+
- managed_orgs
41046+
type: object
41047+
ManagedOrgsResponse:
41048+
description: Response containing the current organization and its managed organizations.
41049+
properties:
41050+
data:
41051+
$ref: "#/components/schemas/ManagedOrgsData"
41052+
included:
41053+
description: Included organization resources.
41054+
items:
41055+
$ref: "#/components/schemas/OrgData"
41056+
type: array
41057+
required:
41058+
- data
41059+
- included
41060+
type: object
41061+
ManagedOrgsType:
41062+
description: The resource type for managed organizations.
41063+
enum: [managed_orgs]
41064+
example: "managed_orgs"
41065+
type: string
41066+
x-enum-varnames:
41067+
- MANAGED_ORGS
4100041068
MemberTeam:
4100141069
description: A member team
4100241070
properties:
@@ -49692,6 +49760,53 @@ components:
4969249760
x-enum-varnames:
4969349761
- ASC
4969449762
- DESC
49763+
OrgAttributes:
49764+
description: Attributes of an organization.
49765+
properties:
49766+
created_at:
49767+
description: The creation timestamp of the organization.
49768+
example: "2019-09-26T17:28:28Z"
49769+
format: date-time
49770+
type: string
49771+
description:
49772+
description: A description of the organization.
49773+
example: "Production organization."
49774+
type: string
49775+
disabled:
49776+
description: Whether the organization is disabled.
49777+
example: false
49778+
type: boolean
49779+
modified_at:
49780+
description: The last modification timestamp of the organization.
49781+
example: "2024-01-15T10:30:00Z"
49782+
format: date-time
49783+
type: string
49784+
name:
49785+
description: The name of the organization.
49786+
example: "My Organization"
49787+
type: string
49788+
public_id:
49789+
description: The public identifier of the organization.
49790+
example: "abcdef12345"
49791+
type: string
49792+
sharing:
49793+
description: The sharing setting of the organization.
49794+
example: "none"
49795+
type: string
49796+
url:
49797+
description: The URL of the organization.
49798+
example: "https://app.datadoghq.com/account/my-org"
49799+
type: string
49800+
required:
49801+
- public_id
49802+
- name
49803+
- description
49804+
- sharing
49805+
- url
49806+
- disabled
49807+
- created_at
49808+
- modified_at
49809+
type: object
4969549810
OrgConfigGetResponse:
4969649811
description: A response with a single Org Config.
4969749812
properties:
@@ -49993,6 +50108,23 @@ components:
4999350108
type: string
4999450109
x-enum-varnames:
4999550110
- USERS
50111+
OrgData:
50112+
description: An organization resource.
50113+
properties:
50114+
attributes:
50115+
$ref: "#/components/schemas/OrgAttributes"
50116+
id:
50117+
description: The UUID of the organization.
50118+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
50119+
format: uuid
50120+
type: string
50121+
type:
50122+
$ref: "#/components/schemas/OrgResourceType"
50123+
required:
50124+
- id
50125+
- type
50126+
- attributes
50127+
type: object
4999650128
OrgGroupAttributes:
4999750129
description: Attributes of an org group.
4999850130
properties:
@@ -50885,6 +51017,27 @@ components:
5088551017
required:
5088651018
- data
5088751019
type: object
51020+
OrgRelationshipData:
51021+
description: Reference to an organization resource.
51022+
properties:
51023+
id:
51024+
description: The UUID of the organization.
51025+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
51026+
format: uuid
51027+
type: string
51028+
type:
51029+
$ref: "#/components/schemas/OrgResourceType"
51030+
required:
51031+
- id
51032+
- type
51033+
type: object
51034+
OrgResourceType:
51035+
description: The resource type for organizations.
51036+
enum: [orgs]
51037+
example: "orgs"
51038+
type: string
51039+
x-enum-varnames:
51040+
- ORGS
5088851041
Organization:
5088951042
description: Organization object.
5089051043
properties:
@@ -102863,6 +103016,83 @@ paths:
102863103016
operator: OR
102864103017
permissions:
102865103018
- on_call_read
103019+
/api/v2/org:
103020+
get:
103021+
description: Returns the current organization and its managed organizations in JSON:API format.
103022+
operationId: ListOrgs
103023+
parameters:
103024+
- description: Filter managed organizations by name.
103025+
example: "My Child Org"
103026+
in: query
103027+
name: "filter[name]"
103028+
required: false
103029+
schema:
103030+
type: string
103031+
responses:
103032+
"200":
103033+
content:
103034+
application/json:
103035+
examples:
103036+
default:
103037+
value:
103038+
data:
103039+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
103040+
relationships:
103041+
current_org:
103042+
data:
103043+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
103044+
type: "orgs"
103045+
managed_orgs:
103046+
data:
103047+
- id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
103048+
type: "orgs"
103049+
type: "managed_orgs"
103050+
included:
103051+
- attributes:
103052+
created_at: "2019-09-26T17:28:28Z"
103053+
description: "Production organization."
103054+
disabled: false
103055+
modified_at: "2024-01-15T10:30:00Z"
103056+
name: "My Organization"
103057+
public_id: "abcdef12345"
103058+
sharing: "none"
103059+
url: "https://app.datadoghq.com/account/my-org"
103060+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
103061+
type: "orgs"
103062+
- attributes:
103063+
created_at: "2020-05-10T12:00:00Z"
103064+
description: "Child organization."
103065+
disabled: false
103066+
modified_at: "2024-06-20T08:15:00Z"
103067+
name: "My Child Org"
103068+
public_id: "ghijkl67890"
103069+
sharing: "none"
103070+
url: "https://app.datadoghq.com/account/my-child-org"
103071+
id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
103072+
type: "orgs"
103073+
schema:
103074+
$ref: "#/components/schemas/ManagedOrgsResponse"
103075+
description: OK
103076+
"401":
103077+
$ref: "#/components/responses/UnauthorizedResponse"
103078+
"403":
103079+
$ref: "#/components/responses/ForbiddenResponse"
103080+
"429":
103081+
$ref: "#/components/responses/TooManyRequestsResponse"
103082+
security:
103083+
- apiKeyAuth: []
103084+
appKeyAuth: []
103085+
- AuthZ:
103086+
- org_management
103087+
- org_connections_write
103088+
summary: List your managed organizations
103089+
tags:
103090+
- Organizations
103091+
"x-permission":
103092+
operator: OR
103093+
permissions:
103094+
- org_management
103095+
- org_connections_write
102866103096
/api/v2/org_configs:
102867103097
get:
102868103098
description: Returns all Org Configs (name, description, and value).
@@ -121040,6 +121270,50 @@ paths:
121040121270
permissions:
121041121271
- user_access_manage
121042121272
- service_account_write
121273+
/api/v2/users/{user_id}/invitations:
121274+
delete:
121275+
description: |-
121276+
Cancel all pending invitations for a specified user.
121277+
Requires the `user_access_invite` permission.
121278+
operationId: DeleteUserInvitations
121279+
parameters:
121280+
- description: The UUID of the user whose pending invitations should be canceled.
121281+
in: path
121282+
name: user_id
121283+
required: true
121284+
schema:
121285+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
121286+
format: uuid
121287+
type: string
121288+
responses:
121289+
"200":
121290+
description: OK
121291+
"403":
121292+
content:
121293+
application/json:
121294+
schema:
121295+
$ref: "#/components/schemas/APIErrorResponse"
121296+
description: Authentication error
121297+
"404":
121298+
content:
121299+
application/json:
121300+
schema:
121301+
$ref: "#/components/schemas/APIErrorResponse"
121302+
description: Not found
121303+
"429":
121304+
$ref: "#/components/responses/TooManyRequestsResponse"
121305+
security:
121306+
- apiKeyAuth: []
121307+
appKeyAuth: []
121308+
- AuthZ:
121309+
- user_access_invite
121310+
summary: Delete a pending user's invitations
121311+
tags:
121312+
- Users
121313+
"x-permission":
121314+
operator: OR
121315+
permissions:
121316+
- user_access_invite
121043121317
/api/v2/users/{user_id}/orgs:
121044121318
get:
121045121319
description: |-
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* List your managed organizations returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.OrganizationsApi(configuration);
9+
10+
apiInstance
11+
.listOrgs()
12+
.then((data: v2.ManagedOrgsResponse) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Delete a pending user's invitations returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.UsersApi(configuration);
9+
10+
const params: v2.UsersApiDeleteUserInvitationsRequest = {
11+
userId: "4dee724d-00cc-11ea-a77b-570c9d03c6c5",
12+
};
13+
14+
apiInstance
15+
.deleteUserInvitations(params)
16+
.then((data: any) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9401,6 +9401,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
94019401
},
94029402
"operationResponseType": "{}",
94039403
},
9404+
"v2.ListOrgs": {
9405+
"filterName": {
9406+
"type": "string",
9407+
"format": "",
9408+
},
9409+
"operationResponseType": "ManagedOrgsResponse",
9410+
},
94049411
"v2.ListOrgConfigs": {
94059412
"operationResponseType": "OrgConfigListResponse",
94069413
},
@@ -12664,6 +12671,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1266412671
},
1266512672
"operationResponseType": "UserResponse",
1266612673
},
12674+
"v2.DeleteUserInvitations": {
12675+
"userId": {
12676+
"type": "string",
12677+
"format": "uuid",
12678+
},
12679+
"operationResponseType": "{}",
12680+
},
1266712681
"v2.ListUserOrganizations": {
1266812682
"userId": {
1266912683
"type": "string",

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

0 commit comments

Comments
 (0)