Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25943,17 +25943,17 @@ components:
description: Used for fixed span times, such as 'March 1 to March 7'.
properties:
from:
description: Start time in seconds since epoch.
example: 1712080128
description: Start time in milliseconds since epoch.
example: 1712080128000
format: int64
minimum: 0
type: integer
hide_incomplete_cost_data:
description: Whether to hide incomplete cost data in the widget.
type: boolean
to:
description: End time in seconds since epoch.
example: 1712083128
description: End time in milliseconds since epoch.
example: 1712083128000
format: int64
minimum: 0
type: integer
Expand Down
97 changes: 97 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32179,6 +32179,53 @@ components:
type: string
type: array
type: object
Integration:
description: Integration resource object.
properties:
attributes:
$ref: '#/components/schemas/IntegrationAttributes'
id:
description: The unique identifier of the integration.
example: calico
type: string
links:
$ref: '#/components/schemas/IntegrationLinks'
type:
$ref: '#/components/schemas/IntegrationType'
required:
- type
- id
- attributes
type: object
IntegrationAttributes:
description: Attributes for an integration.
properties:
categories:
description: List of categories associated with the integration.
example:
- Category::Kubernetes
- Category::Log Collection
items:
type: string
type: array
description:
description: A description of the integration.
example: Calico is a networking and network security solution for containers.
type: string
installed:
description: Whether the integration is installed.
example: true
type: boolean
title:
description: The name of the integration.
example: calico
type: string
required:
- title
- description
- categories
- installed
type: object
IntegrationIncident:
description: Incident integration settings
properties:
Expand Down Expand Up @@ -32284,6 +32331,14 @@ components:
value:
$ref: '#/components/schemas/AnyValue'
type: object
IntegrationLinks:
description: Links for the integration resource.
properties:
self:
description: Link to the integration resource.
example: /integrations?integrationId=calico
type: string
type: object
IntegrationMonitor:
description: Monitor integration settings
properties:
Expand Down Expand Up @@ -32385,6 +32440,15 @@ components:
type: string
type: object
type: object
IntegrationType:
default: integration
description: Integration resource type.
enum:
- integration
example: integration
type: string
x-enum-varnames:
- INTEGRATION
InterfaceAttributes:
description: The interface attributes
properties:
Expand Down Expand Up @@ -34776,6 +34840,17 @@ components:
- data
- meta
type: object
ListIntegrationsResponse:
description: Response containing information about multiple integrations.
properties:
data:
description: Array of integration objects.
items:
$ref: '#/components/schemas/Integration'
type: array
required:
- data
type: object
ListInterfaceTagsResponse:
description: Response for listing interface tags.
properties:
Expand Down Expand Up @@ -84205,6 +84280,24 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/integrations:
get:
operationId: ListIntegrations
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListIntegrationsResponse'
description: Successful Response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
summary: List Integrations
tags:
- Integrations
/api/v2/integrations/cloudflare/accounts:
get:
description: List Cloudflare accounts.
Expand Down Expand Up @@ -106291,6 +106384,10 @@ tags:
and todos. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/)
for more information.
name: Incidents
- description: 'The Integrations API is used to list available integrations

and retrieve information about their installation status.'
name: Integrations
- description: Manage your Jira Integration. Atlassian Jira is a project management
and issue tracking tool for teams to coordinate work and handle tasks efficiently.
name: Jira Integration
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2026-02-18T20:11:26.764Z"

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions examples/v2/integrations/ListIntegrations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* List Integrations returns "Successful Response." response
*/

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

const configuration = client.createConfiguration();
const apiInstance = new v2.IntegrationsApi(configuration);

apiInstance
.listIntegrations()
.then((data: v2.ListIntegrationsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
3 changes: 3 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7015,6 +7015,9 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "ServiceNowUsersResponse",
},
"v2.ListIntegrations": {
"operationResponseType": "ListIntegrationsResponse",
},
"v2.ListCloudflareAccounts": {
"operationResponseType": "CloudflareAccountsResponse",
},
Expand Down
13 changes: 13 additions & 0 deletions features/v2/integrations.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@endpoint(integrations) @endpoint(integrations-v2)
Feature: Integrations
The Integrations API is used to list available integrations and retrieve
information about their installation status.

@skip-validation @team:DataDog/integrations-experience
Scenario: List Integrations returns "Successful Response." response
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "Integrations" API
And new "ListIntegrations" request
When the request is sent
Then the response status is 200 Successful Response.
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2527,6 +2527,12 @@
"type": "safe"
}
},
"ListIntegrations": {
"tag": "Integrations",
"undo": {
"type": "safe"
}
},
"ListCloudflareAccounts": {
"tag": "Cloudflare Integration",
"undo": {
Expand Down
4 changes: 2 additions & 2 deletions packages/datadog-api-client-v1/models/WidgetNewFixedSpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
*/
export class WidgetNewFixedSpan {
/**
* Start time in seconds since epoch.
* Start time in milliseconds since epoch.
*/
"from": number;
/**
* Whether to hide incomplete cost data in the widget.
*/
"hideIncompleteCostData"?: boolean;
/**
* End time in seconds since epoch.
* End time in milliseconds since epoch.
*/
"to": number;
/**
Expand Down
137 changes: 137 additions & 0 deletions packages/datadog-api-client-v2/apis/IntegrationsApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi";
import {
Configuration,
applySecurityAuthentication,
} from "../../datadog-api-client-common/configuration";
import {
RequestContext,
HttpMethod,
ResponseContext,
} from "../../datadog-api-client-common/http/http";

import { logger } from "../../../logger";
import { ObjectSerializer } from "../models/ObjectSerializer";
import { ApiException } from "../../datadog-api-client-common/exception";

import { APIErrorResponse } from "../models/APIErrorResponse";
import { ListIntegrationsResponse } from "../models/ListIntegrationsResponse";

export class IntegrationsApiRequestFactory extends BaseAPIRequestFactory {
public async listIntegrations(
_options?: Configuration
): Promise<RequestContext> {
const _config = _options || this.configuration;

// Path Params
const localVarPath = "/api/v2/integrations";

// Make Request Context
const requestContext = _config
.getServer("v2.IntegrationsApi.listIntegrations")
.makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);

// Apply auth methods
applySecurityAuthentication(_config, requestContext, [
"apiKeyAuth",
"appKeyAuth",
]);

return requestContext;
}
}

export class IntegrationsApiResponseProcessor {
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listIntegrations
* @throws ApiException if the response code was not in [200, 299]
*/
public async listIntegrations(
response: ResponseContext
): Promise<ListIntegrationsResponse> {
const contentType = ObjectSerializer.normalizeMediaType(
response.headers["content-type"]
);
if (response.httpStatusCode === 200) {
const body: ListIntegrationsResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ListIntegrationsResponse"
) as ListIntegrationsResponse;
return body;
}
if (response.httpStatusCode === 429) {
const bodyText = ObjectSerializer.parse(
await response.body.text(),
contentType
);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
bodyText,
"APIErrorResponse"
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
throw new ApiException<APIErrorResponse>(
response.httpStatusCode,
bodyText
);
}
throw new ApiException<APIErrorResponse>(response.httpStatusCode, body);
}

// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: ListIntegrationsResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ListIntegrationsResponse",
""
) as ListIntegrationsResponse;
return body;
}

const body = (await response.body.text()) || "";
throw new ApiException<string>(
response.httpStatusCode,
'Unknown API Status Code!\nBody: "' + body + '"'
);
}
}

export class IntegrationsApi {
private requestFactory: IntegrationsApiRequestFactory;
private responseProcessor: IntegrationsApiResponseProcessor;
private configuration: Configuration;

public constructor(
configuration: Configuration,
requestFactory?: IntegrationsApiRequestFactory,
responseProcessor?: IntegrationsApiResponseProcessor
) {
this.configuration = configuration;
this.requestFactory =
requestFactory || new IntegrationsApiRequestFactory(configuration);
this.responseProcessor =
responseProcessor || new IntegrationsApiResponseProcessor();
}

/**
* @param param The request object
*/
public listIntegrations(
options?: Configuration
): Promise<ListIntegrationsResponse> {
const requestContextPromise = this.requestFactory.listIntegrations(options);
return requestContextPromise.then((requestContext) => {
return this.configuration.httpApi
.send(requestContext)
.then((responseContext) => {
return this.responseProcessor.listIntegrations(responseContext);
});
});
}
}
Loading