Skip to content

Commit 4a91d69

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Query Parameters to ListOrgConnections Endpoint (#2784)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4c00034 commit 4a91d69

File tree

4 files changed

+115
-2
lines changed

4 files changed

+115
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62417,6 +62417,39 @@ paths:
6241762417
get:
6241862418
description: Returns a list of org connections.
6241962419
operationId: ListOrgConnections
62420+
parameters:
62421+
- description: The Org ID of the sink org.
62422+
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
62423+
in: query
62424+
name: sink_org_id
62425+
required: false
62426+
schema:
62427+
type: string
62428+
- description: The Org ID of the source org.
62429+
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
62430+
in: query
62431+
name: source_org_id
62432+
required: false
62433+
schema:
62434+
type: string
62435+
- description: The limit of number of entries you want to return. Default is
62436+
1000.
62437+
example: 1000
62438+
in: query
62439+
name: limit
62440+
required: false
62441+
schema:
62442+
format: int64
62443+
type: integer
62444+
- description: The pagination offset which you want to query from. Default is
62445+
0.
62446+
example: 0
62447+
in: query
62448+
name: offset
62449+
required: false
62450+
schema:
62451+
format: int64
62452+
type: integer
6242062453
responses:
6242162454
'200':
6242262455
content:

features/support/scenarios_model_mapping.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6771,6 +6771,22 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
67716771
"operationResponseType": "{}",
67726772
},
67736773
"v2.ListOrgConnections": {
6774+
"sinkOrgId": {
6775+
"type": "string",
6776+
"format": "",
6777+
},
6778+
"sourceOrgId": {
6779+
"type": "string",
6780+
"format": "",
6781+
},
6782+
"limit": {
6783+
"type": "number",
6784+
"format": "int64",
6785+
},
6786+
"offset": {
6787+
"type": "number",
6788+
"format": "int64",
6789+
},
67746790
"operationResponseType": "OrgConnectionListResponse",
67756791
},
67766792
"v2.CreateOrgConnections": {

packages/datadog-api-client-v2/apis/OrgConnectionsApi.ts

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ export class OrgConnectionsApiRequestFactory extends BaseAPIRequestFactory {
100100
}
101101

102102
public async listOrgConnections(
103+
sinkOrgId?: string,
104+
sourceOrgId?: string,
105+
limit?: number,
106+
offset?: number,
103107
_options?: Configuration
104108
): Promise<RequestContext> {
105109
const _config = _options || this.configuration;
@@ -114,6 +118,36 @@ export class OrgConnectionsApiRequestFactory extends BaseAPIRequestFactory {
114118
requestContext.setHeaderParam("Accept", "application/json");
115119
requestContext.setHttpConfig(_config.httpConfig);
116120

121+
// Query Params
122+
if (sinkOrgId !== undefined) {
123+
requestContext.setQueryParam(
124+
"sink_org_id",
125+
ObjectSerializer.serialize(sinkOrgId, "string", ""),
126+
""
127+
);
128+
}
129+
if (sourceOrgId !== undefined) {
130+
requestContext.setQueryParam(
131+
"source_org_id",
132+
ObjectSerializer.serialize(sourceOrgId, "string", ""),
133+
""
134+
);
135+
}
136+
if (limit !== undefined) {
137+
requestContext.setQueryParam(
138+
"limit",
139+
ObjectSerializer.serialize(limit, "number", "int64"),
140+
""
141+
);
142+
}
143+
if (offset !== undefined) {
144+
requestContext.setQueryParam(
145+
"offset",
146+
ObjectSerializer.serialize(offset, "number", "int64"),
147+
""
148+
);
149+
}
150+
117151
// Apply auth methods
118152
applySecurityAuthentication(_config, requestContext, [
119153
"apiKeyAuth",
@@ -437,6 +471,29 @@ export interface OrgConnectionsApiDeleteOrgConnectionsRequest {
437471
connectionId: string;
438472
}
439473

474+
export interface OrgConnectionsApiListOrgConnectionsRequest {
475+
/**
476+
* The Org ID of the sink org.
477+
* @type string
478+
*/
479+
sinkOrgId?: string;
480+
/**
481+
* The Org ID of the source org.
482+
* @type string
483+
*/
484+
sourceOrgId?: string;
485+
/**
486+
* The limit of number of entries you want to return. Default is 1000.
487+
* @type number
488+
*/
489+
limit?: number;
490+
/**
491+
* The pagination offset which you want to query from. Default is 0.
492+
* @type number
493+
*/
494+
offset?: number;
495+
}
496+
440497
export interface OrgConnectionsApiUpdateOrgConnectionsRequest {
441498
/**
442499
* The unique identifier of the org connection.
@@ -513,10 +570,16 @@ export class OrgConnectionsApi {
513570
* @param param The request object
514571
*/
515572
public listOrgConnections(
573+
param: OrgConnectionsApiListOrgConnectionsRequest = {},
516574
options?: Configuration
517575
): Promise<OrgConnectionListResponse> {
518-
const requestContextPromise =
519-
this.requestFactory.listOrgConnections(options);
576+
const requestContextPromise = this.requestFactory.listOrgConnections(
577+
param.sinkOrgId,
578+
param.sourceOrgId,
579+
param.limit,
580+
param.offset,
581+
options
582+
);
520583
return requestContextPromise.then((requestContext) => {
521584
return this.configuration.httpApi
522585
.send(requestContext)

packages/datadog-api-client-v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ export {
530530
export {
531531
OrgConnectionsApiCreateOrgConnectionsRequest,
532532
OrgConnectionsApiDeleteOrgConnectionsRequest,
533+
OrgConnectionsApiListOrgConnectionsRequest,
533534
OrgConnectionsApiUpdateOrgConnectionsRequest,
534535
OrgConnectionsApi,
535536
} from "./apis/OrgConnectionsApi";

0 commit comments

Comments
 (0)