Skip to content

Commit b699ba7

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit bd2edc1 of spec repo (#3929)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 151acc4 commit b699ba7

17 files changed

Lines changed: 2369 additions & 1 deletion

.generator/schemas/v2/openapi.yaml

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39913,6 +39913,64 @@ components:
3991339913
type: string
3991439914
x-enum-varnames:
3991539915
- INCIDENTS_GLOBAL_SETTINGS
39916+
GlobalOrg:
39917+
description: Organization information for a global organization association.
39918+
properties:
39919+
name:
39920+
description: The name of the organization.
39921+
example: Example Org
39922+
type: string
39923+
public_id:
39924+
description: The public identifier of the organization.
39925+
example: abcdef12345
39926+
nullable: true
39927+
type: string
39928+
subdomain:
39929+
description: The subdomain used to access the organization, if configured.
39930+
example: example
39931+
nullable: true
39932+
type: string
39933+
uuid:
39934+
description: The UUID of the organization.
39935+
example: "13d10a96-6ff2-49be-be7b-4f56ebb13335"
39936+
format: uuid
39937+
type: string
39938+
required:
39939+
- uuid
39940+
- name
39941+
type: object
39942+
GlobalOrgAttributes:
39943+
description: Attributes of an organization associated with the authenticated user.
39944+
properties:
39945+
org:
39946+
$ref: "#/components/schemas/GlobalOrg"
39947+
redirect_url:
39948+
description: The login URL used to switch into the organization, if available.
39949+
example: "https://app.datadoghq.com/account/login/password?dd_oid=13d10a96-6ff2-49be-be7b-4f56ebb13335&login_hint=user%40example.com"
39950+
nullable: true
39951+
type: string
39952+
source_region:
39953+
description: The source region of the organization.
39954+
example: us1.prod.dog
39955+
type: string
39956+
user:
39957+
$ref: "#/components/schemas/GlobalOrgUser"
39958+
required:
39959+
- user
39960+
- org
39961+
- source_region
39962+
type: object
39963+
GlobalOrgData:
39964+
description: An organization associated with the authenticated user.
39965+
properties:
39966+
attributes:
39967+
$ref: "#/components/schemas/GlobalOrgAttributes"
39968+
type:
39969+
$ref: "#/components/schemas/GlobalOrgType"
39970+
required:
39971+
- type
39972+
- attributes
39973+
type: object
3991639974
GlobalOrgIdentifier:
3991739975
description: A unique identifier for an organization including its site.
3991839976
properties:
@@ -39929,6 +39987,99 @@ components:
3992939987
- org_uuid
3993039988
- org_site
3993139989
type: object
39990+
GlobalOrgType:
39991+
description: The resource type for global user organizations.
39992+
enum: [global_user_orgs]
39993+
example: global_user_orgs
39994+
type: string
39995+
x-enum-varnames:
39996+
- GLOBAL_USER_ORGS
39997+
GlobalOrgUser:
39998+
description: User information for a global organization association.
39999+
properties:
40000+
handle:
40001+
description: The handle of the user.
40002+
example: user@example.com
40003+
type: string
40004+
uuid:
40005+
description: The UUID of the user.
40006+
example: "cfab5cf9-5472-48ea-a79c-a64045f4f745"
40007+
format: uuid
40008+
type: string
40009+
required:
40010+
- uuid
40011+
- handle
40012+
type: object
40013+
GlobalOrgsLinks:
40014+
description: Pagination links.
40015+
properties:
40016+
next:
40017+
description: Link to the next page.
40018+
example: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100&page[cursor]=next-page"
40019+
nullable: true
40020+
type: string
40021+
prev:
40022+
description: Link to the previous page.
40023+
nullable: true
40024+
type: string
40025+
self:
40026+
description: Link to the current page.
40027+
example: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100"
40028+
type: string
40029+
type: object
40030+
GlobalOrgsMeta:
40031+
description: Response metadata object.
40032+
properties:
40033+
page:
40034+
$ref: "#/components/schemas/GlobalOrgsMetaPage"
40035+
type: object
40036+
GlobalOrgsMetaPage:
40037+
description: Paging attributes.
40038+
properties:
40039+
cursor:
40040+
description: The cursor used to get the current results, if any.
40041+
example: ""
40042+
type: string
40043+
limit:
40044+
description: Number of results returned.
40045+
example: 100
40046+
format: int32
40047+
maximum: 1000
40048+
type: integer
40049+
next_cursor:
40050+
description: The cursor used to get the next results, if any.
40051+
example: next-page
40052+
nullable: true
40053+
type: string
40054+
prev_cursor:
40055+
description: The cursor used to get the previous results, if any.
40056+
nullable: true
40057+
type: string
40058+
type:
40059+
$ref: "#/components/schemas/GlobalOrgsMetaPageType"
40060+
type: object
40061+
GlobalOrgsMetaPageType:
40062+
description: Type of global orgs pagination.
40063+
enum: [cursor]
40064+
example: cursor
40065+
type: string
40066+
x-enum-varnames:
40067+
- CURSOR
40068+
GlobalOrgsResponse:
40069+
description: Response containing organizations across regions for the authenticated user.
40070+
properties:
40071+
data:
40072+
description: Organizations across regions for the authenticated user.
40073+
items:
40074+
$ref: "#/components/schemas/GlobalOrgData"
40075+
type: array
40076+
links:
40077+
$ref: "#/components/schemas/GlobalOrgsLinks"
40078+
meta:
40079+
$ref: "#/components/schemas/GlobalOrgsMeta"
40080+
required:
40081+
- data
40082+
type: object
3993240083
GlobalVariableData:
3993340084
description: Synthetics global variable data. Wrapper around the global variable object.
3993440085
properties:
@@ -129537,6 +129688,94 @@ paths:
129537129688
x-unstable: |-
129538129689
**Note**: This endpoint is in preview and is subject to change.
129539129690
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
129691+
/api/v2/global_orgs:
129692+
get:
129693+
description: |-
129694+
Returns organizations across regions for the authenticated user. The `user_handle` query parameter must match the authenticated user's handle.
129695+
operationId: ListGlobalOrgs
129696+
parameters:
129697+
- description: The handle of the authenticated user.
129698+
in: query
129699+
name: user_handle
129700+
required: true
129701+
schema:
129702+
example: user@example.com
129703+
type: string
129704+
- description: Maximum number of results returned.
129705+
in: query
129706+
name: page[limit]
129707+
required: false
129708+
schema:
129709+
default: 100
129710+
format: int32
129711+
maximum: 1000
129712+
minimum: 1
129713+
type: integer
129714+
- description: |-
129715+
String to query the next page of results.
129716+
This key is provided with each valid response from the API in `meta.page.next_cursor`.
129717+
in: query
129718+
name: page[cursor]
129719+
required: false
129720+
schema:
129721+
type: string
129722+
responses:
129723+
"200":
129724+
content:
129725+
application/json:
129726+
examples:
129727+
default:
129728+
value:
129729+
data:
129730+
- attributes:
129731+
org:
129732+
name: Example Org
129733+
public_id: abcdef12345
129734+
subdomain: example
129735+
uuid: "13d10a96-6ff2-49be-be7b-4f56ebb13335"
129736+
redirect_url: "https://app.datadoghq.com/account/login/password?dd_oid=13d10a96-6ff2-49be-be7b-4f56ebb13335&login_hint=user%40example.com"
129737+
source_region: us1.prod.dog
129738+
user:
129739+
handle: user@example.com
129740+
uuid: "cfab5cf9-5472-48ea-a79c-a64045f4f745"
129741+
type: global_user_orgs
129742+
links:
129743+
next: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100&page[cursor]=next-page"
129744+
self: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100"
129745+
meta:
129746+
page:
129747+
cursor: ""
129748+
limit: 100
129749+
next_cursor: next-page
129750+
type: cursor
129751+
schema:
129752+
$ref: "#/components/schemas/GlobalOrgsResponse"
129753+
description: OK
129754+
"400":
129755+
$ref: "#/components/responses/BadRequestResponse"
129756+
"401":
129757+
$ref: "#/components/responses/UnauthorizedResponse"
129758+
"403":
129759+
$ref: "#/components/responses/ForbiddenResponse"
129760+
"429":
129761+
$ref: "#/components/responses/TooManyRequestsResponse"
129762+
security:
129763+
- apiKeyAuth: []
129764+
appKeyAuth: []
129765+
- AuthZ:
129766+
- user_access_read
129767+
summary: List global orgs
129768+
tags:
129769+
- Organizations
129770+
x-pagination:
129771+
cursorParam: page[cursor]
129772+
cursorPath: meta.page.next_cursor
129773+
limitParam: page[limit]
129774+
resultsPath: data
129775+
"x-permission":
129776+
operator: OR
129777+
permissions:
129778+
- user_access_read
129540129779
/api/v2/hamr:
129541129780
get:
129542129781
description: |-
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// List global orgs 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.GlobalOrgsResponse;
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+
GlobalOrgsResponse result = apiInstance.listGlobalOrgs("user@example.com");
15+
System.out.println(result);
16+
} catch (ApiException e) {
17+
System.err.println("Exception when calling OrganizationsApi#listGlobalOrgs");
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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// List global orgs returns "OK" response with pagination
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.PaginationIterable;
5+
import com.datadog.api.client.v2.api.OrganizationsApi;
6+
import com.datadog.api.client.v2.model.GlobalOrgData;
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+
PaginationIterable<GlobalOrgData> iterable =
15+
apiInstance.listGlobalOrgsWithPagination("user@example.com");
16+
17+
for (GlobalOrgData item : iterable) {
18+
System.out.println(item);
19+
}
20+
} catch (RuntimeException e) {
21+
System.err.println("Exception when calling OrganizationsApi#listGlobalOrgsWithPagination");
22+
System.err.println("Reason: " + e.getMessage());
23+
e.printStackTrace();
24+
}
25+
}
26+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ public class ApiClient {
10201020
put("v2.updateForm", false);
10211021
put("v2.upsertAndPublishFormVersion", false);
10221022
put("v2.upsertFormVersion", false);
1023+
put("v2.updateOrgSamlConfigurations", false);
10231024
put("v2.createHamrOrgConnection", false);
10241025
put("v2.getHamrOrgConnection", false);
10251026
put("v2.deleteEntityIntegrationConfig", false);
@@ -1132,7 +1133,6 @@ public class ApiClient {
11321133
put("v2.getScopesRestriction", false);
11331134
put("v2.registerOAuthClient", false);
11341135
put("v2.upsertScopesRestriction", false);
1135-
put("v2.updateOrgSamlConfigurations", false);
11361136
put("v2.disableCustomerOrg", false);
11371137
put("v2.bulkUpdateOrgGroupMemberships", false);
11381138
put("v2.createOrgGroup", false);

0 commit comments

Comments
 (0)