Skip to content

Commit f533796

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d1c1cb2 of spec repo
1 parent 1b6af6f commit f533796

File tree

18 files changed

+2376
-0
lines changed

18 files changed

+2376
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40512,6 +40512,74 @@ components:
4051240512
- type
4051340513
- id
4051440514
type: object
40515+
ManagedOrgsData:
40516+
description: The managed organizations resource.
40517+
properties:
40518+
id:
40519+
description: The UUID of the current organization.
40520+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
40521+
format: uuid
40522+
type: string
40523+
relationships:
40524+
$ref: "#/components/schemas/ManagedOrgsRelationships"
40525+
type:
40526+
$ref: "#/components/schemas/ManagedOrgsType"
40527+
required:
40528+
- id
40529+
- type
40530+
- relationships
40531+
type: object
40532+
ManagedOrgsRelationshipToOrg:
40533+
description: Relationship to the current organization.
40534+
properties:
40535+
data:
40536+
$ref: "#/components/schemas/OrgRelationshipData"
40537+
required:
40538+
- data
40539+
type: object
40540+
ManagedOrgsRelationshipToOrgs:
40541+
description: Relationship to the managed organizations.
40542+
properties:
40543+
data:
40544+
description: List of managed organization references.
40545+
items:
40546+
$ref: "#/components/schemas/OrgRelationshipData"
40547+
type: array
40548+
required:
40549+
- data
40550+
type: object
40551+
ManagedOrgsRelationships:
40552+
description: Relationships of the managed organizations resource.
40553+
properties:
40554+
current_org:
40555+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrg"
40556+
managed_orgs:
40557+
$ref: "#/components/schemas/ManagedOrgsRelationshipToOrgs"
40558+
required:
40559+
- current_org
40560+
- managed_orgs
40561+
type: object
40562+
ManagedOrgsResponse:
40563+
description: Response containing the current organization and its managed organizations.
40564+
properties:
40565+
data:
40566+
$ref: "#/components/schemas/ManagedOrgsData"
40567+
included:
40568+
description: Included organization resources.
40569+
items:
40570+
$ref: "#/components/schemas/OrgData"
40571+
type: array
40572+
required:
40573+
- data
40574+
- included
40575+
type: object
40576+
ManagedOrgsType:
40577+
description: The resource type for managed organizations.
40578+
enum: [managed_orgs]
40579+
example: "managed_orgs"
40580+
type: string
40581+
x-enum-varnames:
40582+
- MANAGED_ORGS
4051540583
MemberTeam:
4051640584
description: A member team
4051740585
properties:
@@ -49207,6 +49275,53 @@ components:
4920749275
x-enum-varnames:
4920849276
- ASC
4920949277
- DESC
49278+
OrgAttributes:
49279+
description: Attributes of an organization.
49280+
properties:
49281+
created_at:
49282+
description: The creation timestamp of the organization.
49283+
example: "2019-09-26T17:28:28Z"
49284+
format: date-time
49285+
type: string
49286+
description:
49287+
description: A description of the organization.
49288+
example: "Production organization."
49289+
type: string
49290+
disabled:
49291+
description: Whether the organization is disabled.
49292+
example: false
49293+
type: boolean
49294+
modified_at:
49295+
description: The last modification timestamp of the organization.
49296+
example: "2024-01-15T10:30:00Z"
49297+
format: date-time
49298+
type: string
49299+
name:
49300+
description: The name of the organization.
49301+
example: "My Organization"
49302+
type: string
49303+
public_id:
49304+
description: The public identifier of the organization.
49305+
example: "abcdef12345"
49306+
type: string
49307+
sharing:
49308+
description: The sharing setting of the organization.
49309+
example: "none"
49310+
type: string
49311+
url:
49312+
description: The URL of the organization.
49313+
example: "https://app.datadoghq.com/account/my-org"
49314+
type: string
49315+
required:
49316+
- public_id
49317+
- name
49318+
- description
49319+
- sharing
49320+
- url
49321+
- disabled
49322+
- created_at
49323+
- modified_at
49324+
type: object
4921049325
OrgConfigGetResponse:
4921149326
description: A response with a single Org Config.
4921249327
properties:
@@ -49508,6 +49623,23 @@ components:
4950849623
type: string
4950949624
x-enum-varnames:
4951049625
- USERS
49626+
OrgData:
49627+
description: An organization resource.
49628+
properties:
49629+
attributes:
49630+
$ref: "#/components/schemas/OrgAttributes"
49631+
id:
49632+
description: The UUID of the organization.
49633+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
49634+
format: uuid
49635+
type: string
49636+
type:
49637+
$ref: "#/components/schemas/OrgResourceType"
49638+
required:
49639+
- id
49640+
- type
49641+
- attributes
49642+
type: object
4951149643
OrgGroupAttributes:
4951249644
description: Attributes of an org group.
4951349645
properties:
@@ -50400,6 +50532,27 @@ components:
5040050532
required:
5040150533
- data
5040250534
type: object
50535+
OrgRelationshipData:
50536+
description: Reference to an organization resource.
50537+
properties:
50538+
id:
50539+
description: The UUID of the organization.
50540+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
50541+
format: uuid
50542+
type: string
50543+
type:
50544+
$ref: "#/components/schemas/OrgResourceType"
50545+
required:
50546+
- id
50547+
- type
50548+
type: object
50549+
OrgResourceType:
50550+
description: The resource type for organizations.
50551+
enum: [orgs]
50552+
example: "orgs"
50553+
type: string
50554+
x-enum-varnames:
50555+
- ORGS
5040350556
Organization:
5040450557
description: Organization object.
5040550558
properties:
@@ -102090,6 +102243,83 @@ paths:
102090102243
operator: OR
102091102244
permissions:
102092102245
- on_call_read
102246+
/api/v2/org:
102247+
get:
102248+
description: Returns the current organization and its managed organizations in JSON:API format.
102249+
operationId: ListOrgs
102250+
parameters:
102251+
- description: Filter managed organizations by name.
102252+
example: "My Child Org"
102253+
in: query
102254+
name: "filter[name]"
102255+
required: false
102256+
schema:
102257+
type: string
102258+
responses:
102259+
"200":
102260+
content:
102261+
application/json:
102262+
examples:
102263+
default:
102264+
value:
102265+
data:
102266+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
102267+
relationships:
102268+
current_org:
102269+
data:
102270+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
102271+
type: "orgs"
102272+
managed_orgs:
102273+
data:
102274+
- id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
102275+
type: "orgs"
102276+
type: "managed_orgs"
102277+
included:
102278+
- attributes:
102279+
created_at: "2019-09-26T17:28:28Z"
102280+
description: "Production organization."
102281+
disabled: false
102282+
modified_at: "2024-01-15T10:30:00Z"
102283+
name: "My Organization"
102284+
public_id: "abcdef12345"
102285+
sharing: "none"
102286+
url: "https://app.datadoghq.com/account/my-org"
102287+
id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
102288+
type: "orgs"
102289+
- attributes:
102290+
created_at: "2020-05-10T12:00:00Z"
102291+
description: "Child organization."
102292+
disabled: false
102293+
modified_at: "2024-06-20T08:15:00Z"
102294+
name: "My Child Org"
102295+
public_id: "ghijkl67890"
102296+
sharing: "none"
102297+
url: "https://app.datadoghq.com/account/my-child-org"
102298+
id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5"
102299+
type: "orgs"
102300+
schema:
102301+
$ref: "#/components/schemas/ManagedOrgsResponse"
102302+
description: OK
102303+
"401":
102304+
$ref: "#/components/responses/UnauthorizedResponse"
102305+
"403":
102306+
$ref: "#/components/responses/ForbiddenResponse"
102307+
"429":
102308+
$ref: "#/components/responses/TooManyRequestsResponse"
102309+
security:
102310+
- apiKeyAuth: []
102311+
appKeyAuth: []
102312+
- AuthZ:
102313+
- org_management
102314+
- org_connections_write
102315+
summary: List your managed organizations
102316+
tags:
102317+
- Organizations
102318+
"x-permission":
102319+
operator: OR
102320+
permissions:
102321+
- org_management
102322+
- org_connections_write
102093102323
/api/v2/org_configs:
102094102324
get:
102095102325
description: Returns all Org Configs (name, description, and value).
@@ -120262,6 +120492,50 @@ paths:
120262120492
permissions:
120263120493
- user_access_manage
120264120494
- service_account_write
120495+
/api/v2/users/{user_id}/invitations:
120496+
delete:
120497+
description: |-
120498+
Cancel all pending invitations for a specified user.
120499+
Requires the `user_access_invite` permission.
120500+
operationId: DeleteUserInvitations
120501+
parameters:
120502+
- description: The UUID of the user whose pending invitations should be canceled.
120503+
in: path
120504+
name: user_id
120505+
required: true
120506+
schema:
120507+
example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5"
120508+
format: uuid
120509+
type: string
120510+
responses:
120511+
"200":
120512+
description: OK
120513+
"403":
120514+
content:
120515+
application/json:
120516+
schema:
120517+
$ref: "#/components/schemas/APIErrorResponse"
120518+
description: Authentication error
120519+
"404":
120520+
content:
120521+
application/json:
120522+
schema:
120523+
$ref: "#/components/schemas/APIErrorResponse"
120524+
description: Not found
120525+
"429":
120526+
$ref: "#/components/responses/TooManyRequestsResponse"
120527+
security:
120528+
- apiKeyAuth: []
120529+
appKeyAuth: []
120530+
- AuthZ:
120531+
- user_access_invite
120532+
summary: Delete a pending user's invitations
120533+
tags:
120534+
- Users
120535+
"x-permission":
120536+
operator: OR
120537+
permissions:
120538+
- user_access_invite
120265120539
/api/v2/users/{user_id}/orgs:
120266120540
get:
120267120541
description: |-
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// List your managed organizations returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.OrganizationsApi;
6+
import com.datadog.api.client.v2.model.ManagedOrgsResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);
12+
13+
try {
14+
ManagedOrgsResponse result = apiInstance.listOrgs();
15+
System.out.println(result);
16+
} catch (ApiException e) {
17+
System.err.println("Exception when calling OrganizationsApi#listOrgs");
18+
System.err.println("Status code: " + e.getCode());
19+
System.err.println("Reason: " + e.getResponseBody());
20+
System.err.println("Response headers: " + e.getResponseHeaders());
21+
e.printStackTrace();
22+
}
23+
}
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Delete a pending user's invitations returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.UsersApi;
6+
import java.util.UUID;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
UsersApi apiInstance = new UsersApi(defaultClient);
12+
13+
try {
14+
apiInstance.deleteUserInvitations(UUID.fromString("4dee724d-00cc-11ea-a77b-570c9d03c6c5"));
15+
} catch (ApiException e) {
16+
System.err.println("Exception when calling UsersApi#deleteUserInvitations");
17+
System.err.println("Status code: " + e.getCode());
18+
System.err.println("Reason: " + e.getResponseBody());
19+
System.err.println("Response headers: " + e.getResponseHeaders());
20+
e.printStackTrace();
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)