Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 254 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37347,6 +37347,75 @@ components:
type: string
x-enum-varnames:
- INCIDENTS_GLOBAL_SETTINGS
GlobalOrg:
description: Organization information for a global organization association.
properties:
id:
description: The numeric ID of the organization.
example: 123
format: int64
type: integer
name:
description: The name of the organization.
example: Example Org
type: string
public_id:
description: The public identifier of the organization.
example: abcdef12345
nullable: true
type: string
subdomain:
description: The subdomain used to access the organization, if configured.
example: example
nullable: true
type: string
uuid:
description: The UUID of the organization.
example: "13d10a96-6ff2-49be-be7b-4f56ebb13335"
format: uuid
type: string
required:
- id
- uuid
- name
type: object
GlobalOrgAttributes:
description: Attributes of an organization associated with the authenticated user.
properties:
org:
$ref: "#/components/schemas/GlobalOrg"
redirect_url:
description: The login URL used to switch into the organization, if available.
example: "https://app.datadoghq.com/account/login/password?dd_oid=13d10a96-6ff2-49be-be7b-4f56ebb13335&login_hint=user%40example.com"
nullable: true
type: string
source_region:
description: The source region of the organization.
example: us1.prod.dog
type: string
user:
$ref: "#/components/schemas/GlobalOrgUser"
required:
- user
- org
- source_region
type: object
GlobalOrgData:
description: An organization associated with the authenticated user.
properties:
attributes:
$ref: "#/components/schemas/GlobalOrgAttributes"
id:
description: A unique identifier for this user and organization association.
example: "cfab5cf9-5472-48ea-a79c-a64045f4f745-13d10a96-6ff2-49be-be7b-4f56ebb13335"
type: string
type:
$ref: "#/components/schemas/GlobalOrgType"
required:
- id
- type
- attributes
type: object
GlobalOrgIdentifier:
description: A unique identifier for an organization including its site.
properties:
Expand All @@ -37363,6 +37432,104 @@ components:
- org_uuid
- org_site
type: object
GlobalOrgType:
description: The resource type for global user organizations.
enum: [global_user_orgs]
example: global_user_orgs
type: string
x-enum-varnames:
- GLOBAL_USER_ORGS
GlobalOrgUser:
description: User information for a global organization association.
properties:
handle:
description: The handle of the user.
example: user@example.com
type: string
id:
description: The numeric ID of the user.
example: 42
format: int64
type: integer
uuid:
description: The UUID of the user.
example: "cfab5cf9-5472-48ea-a79c-a64045f4f745"
format: uuid
type: string
required:
- id
- uuid
- handle
type: object
GlobalOrgsLinks:
description: Pagination links.
properties:
next:
description: Link to the next page.
example: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100&page[cursor]=next-page"
nullable: true
type: string
prev:
description: Link to the previous page.
nullable: true
type: string
self:
description: Link to the current page.
example: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100"
type: string
type: object
GlobalOrgsMeta:
description: Response metadata object.
properties:
page:
$ref: "#/components/schemas/GlobalOrgsMetaPage"
type: object
GlobalOrgsMetaPage:
description: Paging attributes.
properties:
cursor:
description: The cursor used to get the current results, if any.
example: ""
type: string
limit:
description: Number of results returned.
example: 100
format: int32
type: integer
next_cursor:
description: The cursor used to get the next results, if any.
example: next-page
nullable: true
type: string
prev_cursor:
description: The cursor used to get the previous results, if any.
nullable: true
type: string
type:
$ref: "#/components/schemas/GlobalOrgsMetaPageType"
type: object
GlobalOrgsMetaPageType:
description: Type of global orgs pagination.
enum: [cursor]
example: cursor
type: string
x-enum-varnames:
- CURSOR
GlobalOrgsResponse:
description: Response containing organizations across regions for the authenticated user.
properties:
data:
description: Organizations across regions for the authenticated user.
items:
$ref: "#/components/schemas/GlobalOrgData"
type: array
links:
$ref: "#/components/schemas/GlobalOrgsLinks"
meta:
$ref: "#/components/schemas/GlobalOrgsMeta"
required:
- data
type: object
GlobalVariableData:
description: Synthetics global variable data. Wrapper around the global variable object.
properties:
Expand Down Expand Up @@ -119736,6 +119903,93 @@ paths:
permissions:
- feature_flag_config_write
- feature_flag_environment_config_read
/api/v2/global_orgs:
get:
description: |-
Returns organizations across regions for the authenticated user. The `user_handle` query parameter must match the authenticated user's handle.
operationId: ListGlobalOrgs
parameters:
- description: The handle of the authenticated user.
in: query
name: user_handle
required: true
schema:
example: user@example.com
type: string
- description: Maximum number of results returned.
in: query
name: page[limit]
required: false
schema:
default: 100
format: int32
maximum: 1000
minimum: 1
type: integer
- description: |-
String to query the next page of results.
This key is provided with each valid response from the API in `meta.page.next_cursor`.
in: query
name: page[cursor]
required: false
schema:
type: string
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
- attributes:
org:
id: 123
name: Example Org
public_id: abcdef12345
subdomain: example
uuid: "13d10a96-6ff2-49be-be7b-4f56ebb13335"
redirect_url: "https://app.datadoghq.com/account/login/password?dd_oid=13d10a96-6ff2-49be-be7b-4f56ebb13335&login_hint=user%40example.com"
source_region: us1.prod.dog
user:
handle: user@example.com
id: 42
uuid: "cfab5cf9-5472-48ea-a79c-a64045f4f745"
id: "cfab5cf9-5472-48ea-a79c-a64045f4f745-13d10a96-6ff2-49be-be7b-4f56ebb13335"
type: global_user_orgs
links:
next: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100&page[cursor]=next-page"
self: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100"
meta:
page:
cursor: ""
limit: 100
next_cursor: next-page
type: cursor
schema:
$ref: "#/components/schemas/GlobalOrgsResponse"
description: OK
"400": {$ref: "#/components/responses/BadRequestResponse"}
"401": {$ref: "#/components/responses/UnauthorizedResponse"}
"403": {$ref: "#/components/responses/ForbiddenResponse"}
"429": {$ref: "#/components/responses/TooManyRequestsResponse"}
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- user_access_read
summary: List global orgs
tags:
- Organizations
x-pagination:
cursorParam: page[cursor]
cursorPath: meta.page.next_cursor
limitParam: page[limit]
resultsPath: data
"x-permission":
operator: OR
permissions:
- user_access_read
/api/v2/hamr:
get:
description: |-
Expand Down
24 changes: 24 additions & 0 deletions examples/v2/organizations/ListGlobalOrgs.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// List global orgs returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.OrganizationsApi;
import com.datadog.api.client.v2.model.GlobalOrgsResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);

try {
GlobalOrgsResponse result = apiInstance.listGlobalOrgs("user@example.com");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OrganizationsApi#listGlobalOrgs");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
26 changes: 26 additions & 0 deletions examples/v2/organizations/ListGlobalOrgs_465966063.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// List global orgs returns "OK" response with pagination

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.PaginationIterable;
import com.datadog.api.client.v2.api.OrganizationsApi;
import com.datadog.api.client.v2.model.GlobalOrgData;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);

try {
PaginationIterable<GlobalOrgData> iterable =
apiInstance.listGlobalOrgsWithPagination("user@example.com");

for (GlobalOrgData item : iterable) {
System.out.println(item);
}
} catch (RuntimeException e) {
System.err.println("Exception when calling OrganizationsApi#listGlobalOrgsWithPagination");
System.err.println("Reason: " + e.getMessage());
e.printStackTrace();
}
}
}
Loading
Loading