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
2 changes: 1 addition & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238536,7 +238536,7 @@ paths:
appKeyAuth: []
- AuthZ:
- teams_read
summary: Get all teams
summary: List all teams
tags:
- Teams
x-pagination:
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/teams/ListTeams.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Get all teams returns "OK" response
* List all teams returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";
Expand Down
23 changes: 23 additions & 0 deletions examples/v2/teams/ListTeams_3712027764.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Get all teams returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
const apiInstance = new v2.TeamsApi(configuration);

apiInstance
.listTeams()
.then((data: v2.TeamsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
24 changes: 24 additions & 0 deletions examples/v2/teams/ListTeams_4010677014.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* List all teams returns "OK" response with pagination
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
const apiInstance = new v2.TeamsApi(configuration);

(async () => {
try {
for await (const item of apiInstance.listTeamsWithPagination()) {
console.log(item);
}
} catch (error) {
console.error(error);
}
})();
12 changes: 12 additions & 0 deletions features/v2/teams.feature
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,18 @@ Feature: Teams
When the request is sent
Then the response status is 200 OK

@generated @skip @team:ddoghq/aaa-omg
Scenario: List all teams returns "OK" response
Given new "ListTeams" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:ddoghq/aaa-omg @with-pagination
Scenario: List all teams returns "OK" response with pagination
Given new "ListTeams" request
When the request with pagination is sent
Then the response status is 200 OK

@generated @skip @team:ddoghq/aaa-omg
Scenario: List team connections returns "Bad Request" response
Given new "ListTeamConnections" request
Expand Down
Loading