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
1 change: 1 addition & 0 deletions .buildkite/ftr_platform_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ enabled:
- x-pack/platform/test/api_integration_basic/apis/transform/config.ts
- x-pack/platform/test/automatic_import_api_integration/apis/config_basic.ts
- x-pack/platform/test/automatic_import_api_integration/apis/config_graphs.ts
- x-pack/platform/test/automatic_import_v2_api_integration/configs/config.stateful.ts
- x-pack/platform/test/encrypted_saved_objects_api_integration/config.ts
- x-pack/platform/test/fleet_multi_cluster/config.ts
- x-pack/platform/test/monitoring_api_integration/config.ts
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2918,6 +2918,8 @@ x-pack/solutions/security/test/security_solution_api_integration/test_suites/gen

## Security Solution sub teams - Automatic Import
x-pack/platform/test/automatic_import_api_integration @elastic/integration-experience
x-pack/platform/test/automatic_import_v2_api_integration @elastic/integration-experience


# Security Defend Workflows - OSQuery Ownership
/x-pack/solutions/security/test/osquery_cypress @elastic/security-defend-workflows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,26 @@
* 2.0.
*/
export type {
CreateAutoImportIntegrationRequestBody,
CreateAutoImportIntegrationResponse,
DeleteAutoImportIntegrationRequestParams,
GetAutoImportIntegrationRequestParams,
GetAutoImportIntegrationResponse,
GetAutoImportIntegrationsResponse,
GetAllAutoImportIntegrationsResponse,
UpdateAutoImportIntegrationRequestBody,
UpdateAutoImportIntegrationRequestParams,
} from './model/api/integrations/integration.gen';

export type { DataStreamSamples } from './model/index_samples.gen';
export {
CreateAutoImportIntegrationRequestBody,
GetAutoImportIntegrationRequestParams,
} from './model/api/integrations/integration.gen';

export type { Integration } from './model/common_attributes.gen';
export type {
Integration,
DataStream,
InputType,
TaskStatusEnum,
TaskStatus,
IntegrationResponse,
DataStreamResponse,
AllIntegrationsResponseIntegration,
} from './model/common_attributes.gen';
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
import { z } from '@kbn/zod';

import { NonEmptyString } from '../../primitive.gen';
import { InputType, Integration } from '../../common_attributes.gen';
import {
DataStream,
AllIntegrationsResponseIntegration,
InputType,
IntegrationResponse,
} from '../../common_attributes.gen';

export type CreateAutoImportIntegrationRequestBody = z.infer<
typeof CreateAutoImportIntegrationRequestBody
Expand All @@ -39,30 +44,7 @@ export const CreateAutoImportIntegrationRequestBody = z
/**
* The data streams of the integration
*/
dataStreams: z
.array(
z
.object({
/**
* The title of the data stream
*/
title: NonEmptyString,
/**
* The description of the data stream
*/
description: NonEmptyString,
/**
* The input types of the data stream
*/
inputTypes: z.array(InputType).min(1),
/**
* The raw samples of the data stream
*/
rawSamples: z.array(NonEmptyString).min(1),
})
.strict()
)
.min(1),
dataStreams: z.array(DataStream).optional(),
})
.strict();
export type CreateAutoImportIntegrationRequestBodyInput = z.input<
Expand Down Expand Up @@ -94,6 +76,11 @@ export type DeleteAutoImportIntegrationRequestParamsInput = z.input<
typeof DeleteAutoImportIntegrationRequestParams
>;

export type GetAllAutoImportIntegrationsResponse = z.infer<
typeof GetAllAutoImportIntegrationsResponse
>;
export const GetAllAutoImportIntegrationsResponse = z.array(AllIntegrationsResponseIntegration);

export type GetAutoImportIntegrationRequestParams = z.infer<
typeof GetAutoImportIntegrationRequestParams
>;
Expand All @@ -108,12 +95,11 @@ export type GetAutoImportIntegrationRequestParamsInput = z.input<
>;

export type GetAutoImportIntegrationResponse = z.infer<typeof GetAutoImportIntegrationResponse>;
export const GetAutoImportIntegrationResponse = z.object({
integration: Integration,
});

export type GetAutoImportIntegrationsResponse = z.infer<typeof GetAutoImportIntegrationsResponse>;
export const GetAutoImportIntegrationsResponse = z.array(Integration);
export const GetAutoImportIntegrationResponse = z
.object({
integrationResponse: IntegrationResponse,
})
.strict();

export type UpdateAutoImportIntegrationRequestParams = z.infer<
typeof UpdateAutoImportIntegrationRequestParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ paths:
required:
- title
- description
- dataStreams
properties:
title:
description: The title of the integration
Expand All @@ -38,34 +37,8 @@ paths:
dataStreams:
description: The data streams of the integration
type: array
minItems: 1
items:
type: object
additionalProperties: false
required:
- title
- description
- inputTypes
- rawSamples
properties:
title:
description: The title of the data stream
$ref: "../../../model/primitive.schema.yaml#/components/schemas/NonEmptyString"
description:
description: The description of the data stream
$ref: "../../../model/primitive.schema.yaml#/components/schemas/NonEmptyString"
inputTypes:
description: The input types of the data stream
type: array
minItems: 1
items:
$ref: "../../../model/common_attributes.schema.yaml#/components/schemas/InputType"
rawSamples:
description: The raw samples of the data stream
type: array
minItems: 1
items:
$ref: "../../../model/primitive.schema.yaml#/components/schemas/NonEmptyString"
$ref: "../../../model/common_attributes.schema.yaml#/components/schemas/DataStream"
responses:
200:
description: >-
Expand Down Expand Up @@ -93,7 +66,7 @@ paths:
$ref: "../../../model/primitive.schema.yaml#/components/schemas/NonEmptyString"
get:
summary: Retrieves all integrations.
operationId: GetAutoImportIntegrations
operationId: GetAllAutoImportIntegrations
x-codegen-enabled: true
x-internal: true
description: >-
Expand All @@ -108,9 +81,8 @@ paths:
application/json:
schema:
type: array
additionalProperties: false
items:
$ref: "../../../model/common_attributes.schema.yaml#/components/schemas/Integration"
$ref: "../../../model/common_attributes.schema.yaml#/components/schemas/AllIntegrationsResponseIntegration"
/internal/automatic_import/integrations/{integration_id}:
patch:
summary: Updates an existing integration.
Expand Down Expand Up @@ -192,11 +164,23 @@ paths:
application/json:
schema:
type: object
additionalProperties: false
required:
- integration
- integrationResponse
properties:
integration:
$ref: "../../../model/common_attributes.schema.yaml#/components/schemas/Integration"
integrationResponse:
$ref: "../../../model/common_attributes.schema.yaml#/components/schemas/IntegrationResponse"
404:
description: Indicates the integration id was not found.
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
error:
description: The error message
$ref: "../../../model/primitive.schema.yaml#/components/schemas/NonEmptyString"
delete:
summary: Deletes an integration by its id.
operationId: DeleteAutoImportIntegration
Expand Down
Loading