diff --git a/oas_docs/output/kibana.serverless.yaml b/oas_docs/output/kibana.serverless.yaml index cfb9fabdd4a7a..27d1419a62d1f 100644 --- a/oas_docs/output/kibana.serverless.yaml +++ b/oas_docs/output/kibana.serverless.yaml @@ -24554,855 +24554,7 @@ paths: properties: items: items: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision + $ref: '#/components/schemas/Kibana_HTTP_APIs_agent_policy_response' maxItems: 10000 type: array page: @@ -25490,273 +24642,224 @@ paths: name: My agent policy namespace: default schema: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fleet_server_host_id: - nullable: true - type: string - force: - type: boolean - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_protected: - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces + $ref: '#/components/schemas/Kibana_HTTP_APIs_new_agent_policy' + responses: + '200': + content: + application/json: + examples: + postAgentPolicyExample: + description: The created agent policy + value: + item: + description: A sample agent policy + id: agent-policy-id-2 + is_managed: false + is_protected: false + name: My agent policy + namespace: default + revision: 1 + status: active + updated_at: '2024-01-15T10:00:00.000Z' + updated_by: user1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Create an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agent_policies/_bulk_get: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agent_policies/_bulk_get
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get multiple agent policies by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup. + operationId: post-fleet-agent-policies-bulk-get + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + requestBody: + content: + application/json: + examples: + postBulkGetAgentPoliciesRequestExample: + description: Retrieve multiple agent policies by ID + value: + ids: + - agent-policy-id-1 + - agent-policy-id-2 + schema: + additionalProperties: false + type: object + properties: + full: + description: get full policies with package policies populated type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - space_ids: + ids: + description: list of package policy ids items: type: string - maxItems: 100 + maxItems: 1000 type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API. - nullable: true + ignoreMissing: type: boolean - unenroll_timeout: - minimum: 0 - type: number required: - - name - - namespace + - ids responses: '200': content: application/json: examples: - postAgentPolicyExample: - description: The created agent policy + postBulkGetAgentPoliciesExample: + description: The requested agent policies + value: + items: + - id: agent-policy-id-1 + is_managed: false + is_protected: false + name: My agent policy + namespace: default + revision: 1 + status: active + updated_at: '2024-01-15T10:00:00.000Z' + updated_by: user1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_get_agent_policies_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: One or more agent policies were not found + value: + error: Not Found + message: An error message describing what went wrong + statusCode: 404 + description: Not Found + summary: Bulk get agent policies + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agent_policies/{agentPolicyId}: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup. + operationId: get-fleet-agent-policies-agentpolicyid + parameters: + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + responses: + '200': + content: + application/json: + examples: + getAgentPolicyExample: + description: An agent policy value: item: description: A sample agent policy - id: agent-policy-id-2 + id: agent-policy-id-1 is_managed: false is_protected: false name: My agent policy @@ -25765,862 +24868,235 @@ paths: status: active updated_at: '2024-01-15T10:00:00.000Z' updated_by: user1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false + description: Generic Error type: object properties: - item: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent policy was found with the given ID + value: + error: Not Found + message: Agent policy not found + statusCode: 404 + description: Not Found + summary: Get an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + put: + description: |- + **Spaces method and path for this operation:** + +
put /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Update an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. + operationId: put-fleet-agent-policies-agentpolicyid + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + requestBody: + content: + application/json: + examples: + putAgentPolicyRequestExample: + description: Update an agent policy + value: + description: An updated agent policy description + monitoring_enabled: + - logs + name: Updated agent policy + namespace: default + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_new_agent_policy' + responses: + '200': + content: + application/json: + examples: + putAgentPolicyExample: + description: The updated agent policy + value: + item: + description: An updated agent policy description + id: agent-policy-id-1 + is_managed: false + is_protected: false + name: Updated agent policy + namespace: default + revision: 2 + status: active + updated_at: '2024-01-15T11:00:00.000Z' + updated_by: user1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Update an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get the auto-upgrade status for agents assigned to an agent policy.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agent-policies-agentpolicyid-auto-upgrade-agents-status + parameters: + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string + responses: + '200': + content: + application/json: + examples: + getAutoUpgradeAgentsStatusExample: + description: Auto-upgrade status for agents in the policy + value: + agentsCount: 5 + currentVersion: 8.16.0 + failedAgentsCount: 0 + upgradedAgentsCount: 3 + upgradingAgentsCount: 1 + schema: + additionalProperties: false + type: object + properties: + currentVersions: + items: + additionalProperties: false + type: object + properties: + agents: + description: Number of agents that upgraded to this version + type: number + failedUpgradeActionIds: + description: List of action IDs related to failed upgrades + items: + type: string + maxItems: 1000 + type: array + failedUpgradeAgents: + description: Number of agents that failed to upgrade to this version + type: number + inProgressUpgradeActionIds: + description: List of action IDs related to in-progress upgrades + items: + type: string + maxItems: 1000 + type: array + inProgressUpgradeAgents: + description: Number of agents that are upgrading to this version + type: number + version: + description: Agent version type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision + required: + - version + - agents + - failedUpgradeAgents + - inProgressUpgradeAgents + maxItems: 10000 + type: array + totalAgents: + type: number required: - - item + - currentVersions + - totalAgents description: Successful response '400': content: @@ -26651,23 +25127,23 @@ paths: - message - attributes description: Bad Request - summary: Create an agent policy + summary: Get auto upgrade agent status tags: - Elastic Agent policies x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agent_policies/_bulk_get: + /api/fleet/agent_policies/{agentPolicyId}/copy: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agent_policies/_bulk_get
+
post /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/copy
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get multiple agent policies by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup. - operationId: post-fleet-agent-policies-bulk-get + Copy an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. + operationId: post-fleet-agent-policies-agentpolicyid-copy parameters: - description: A required header to protect against CSRF attacks in: header @@ -26676,6 +25152,12 @@ paths: schema: example: 'true' type: string + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string - description: 'Format for the response: simplified or legacy' in: query name: format @@ -26689,906 +25171,34 @@ paths: content: application/json: examples: - postBulkGetAgentPoliciesRequestExample: - description: Retrieve multiple agent policies by ID + postCopyAgentPolicyRequestExample: + description: Copy an agent policy with a new name value: - ids: - - agent-policy-id-1 - - agent-policy-id-2 + description: A copy of the original agent policy + name: Copy of my agent policy schema: - additionalProperties: false - type: object - properties: - full: - description: get full policies with package policies populated - type: boolean - ids: - description: list of package policy ids - items: - type: string - maxItems: 1000 - type: array - ignoreMissing: - type: boolean - required: - - ids + $ref: '#/components/schemas/Kibana_HTTP_APIs_copy_agent_policy_request' responses: '200': content: application/json: examples: - postBulkGetAgentPoliciesExample: - description: The requested agent policies + postCopyAgentPolicyExample: + description: The copied agent policy value: - items: - - id: agent-policy-id-1 - is_managed: false - is_protected: false - name: My agent policy - namespace: default - revision: 1 - status: active - updated_at: '2024-01-15T10:00:00.000Z' - updated_by: user1 + item: + description: A copy of the original agent policy + id: agent-policy-id-copy-1 + is_managed: false + is_protected: false + name: Copy of my agent policy + namespace: default + revision: 1 + status: active + updated_at: '2024-01-15T11:00:00.000Z' + updated_by: user1 schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_response' description: Successful response '400': content: @@ -27619,34 +25229,23 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: One or more agent policies were not found - value: - error: Not Found - message: An error message describing what went wrong - statusCode: 404 - description: Not Found - summary: Bulk get agent policies + summary: Copy an agent policy tags: - Elastic Agent policies x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agent_policies/{agentPolicyId}: + /api/fleet/agent_policies/{agentPolicyId}/download: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}
+
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/download
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup. - operationId: get-fleet-agent-policies-agentpolicyid + Download an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. + operationId: get-fleet-agent-policies-agentpolicyid-download parameters: - description: The ID of the agent policy in: path @@ -27654,891 +25253,42 @@ paths: required: true schema: type: string - - description: 'Format for the response: simplified or legacy' + - description: If true, returns the policy as a downloadable file in: query - name: format + name: download required: false schema: - enum: - - simplified - - legacy - type: string + type: boolean + - description: If true, returns the policy formatted for standalone agents + in: query + name: standalone + required: false + schema: + type: boolean + - description: If true, returns the policy formatted for Kubernetes deployment + in: query + name: kubernetes + required: false + schema: + type: boolean + - description: If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags. + in: query + name: revision + required: false + schema: + type: number responses: '200': content: application/json: examples: - getAgentPolicyExample: - description: An agent policy + getDownloadAgentPolicyExample: + description: The agent policy download response value: - item: - description: A sample agent policy - id: agent-policy-id-1 - is_managed: false - is_protected: false - name: My agent policy - namespace: default - revision: 1 - status: active - updated_at: '2024-01-15T10:00:00.000Z' - updated_by: user1 + item: 'id: agent-policy-id-1\nrevision: 1\noutputs:\n default:\n type: elasticsearch\n hosts:\n - https://elasticsearch.example.com:9200\n' schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision - required: - - item - description: Successful response + type: string + description: Successful response — returns the agent policy as a YAML file download '400': content: application/json: @@ -28578,1206 +25328,369 @@ paths: error: Not Found message: Agent policy not found statusCode: 404 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes description: Not Found - summary: Get an agent policy + summary: Download an agent policy tags: - Elastic Agent policies x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - put: + /api/fleet/agent_policies/{agentPolicyId}/full: + get: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}
+
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/full
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. - operationId: put-fleet-agent-policies-agentpolicyid + Get a full agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read. + operationId: get-fleet-agent-policies-agentpolicyid-full parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - description: The ID of the agent policy in: path name: agentPolicyId required: true schema: type: string - - description: 'Format for the response: simplified or legacy' + - description: If true, returns the policy as a downloadable file in: query - name: format + name: download required: false schema: - enum: - - simplified - - legacy + type: boolean + - description: If true, returns the policy formatted for standalone agents + in: query + name: standalone + required: false + schema: + type: boolean + - description: If true, returns the policy formatted for Kubernetes deployment + in: query + name: kubernetes + required: false + schema: + type: boolean + - description: If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags. + in: query + name: revision + required: false + schema: + type: number + responses: + '200': + content: + application/json: + examples: + getFullAgentPolicyExample: + description: The full agent policy configuration + value: + item: + agent: + monitoring: + logs: true + metrics: true + id: agent-policy-id-1 + inputs: [] + outputs: + default: + hosts: + - https://elasticsearch.example.com:9200 + type: elasticsearch + revision: 1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_full_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent policy was found with the given ID + value: + error: Not Found + message: Agent policy not found + statusCode: 404 + description: Not Found + summary: Get a full agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agent_policies/{agentPolicyId}/outputs: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/outputs
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get a list of outputs associated with agent policy by policy id.

[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read. + operationId: get-fleet-agent-policies-agentpolicyid-outputs + parameters: + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string + responses: + '200': + content: + application/json: + examples: + getAgentPolicyOutputsExample: + description: Outputs associated with the agent policy + value: + item: + data_output: + id: output-id-1 + name: Default output + type: elasticsearch + monitoring_output: + id: output-id-1 + name: Default output + type: elasticsearch + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_outputs_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent policy was found with the given ID + value: + error: Not Found + message: Agent policy not found + statusCode: 404 + description: Not Found + summary: Get outputs for an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agent_policies/delete: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agent_policies/delete
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Delete an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. + operationId: post-fleet-agent-policies-delete + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' type: string requestBody: content: application/json: examples: - putAgentPolicyRequestExample: - description: Update an agent policy + postDeleteAgentPolicyRequestExample: + description: Delete an agent policy by ID value: - description: An updated agent policy description - monitoring_enabled: - - logs - name: Updated agent policy - namespace: default + agentPolicyId: agent-policy-id-1 schema: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - bumpRevision: - type: boolean - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fleet_server_host_id: - nullable: true - type: string - force: - type: boolean - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_protected: - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_agent_policy_request' + responses: + '200': + content: + application/json: + examples: + postDeleteAgentPolicyExample: + description: The agent policy was successfully deleted + value: + id: agent-policy-id-1 + name: My agent policy + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - space_ids: - items: + error: type: string - maxItems: 100 - type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - required: - - name - - namespace + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Delete an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agent_policies/outputs: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agent_policies/outputs
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get a list of outputs associated with agent policies.

[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read. + operationId: post-fleet-agent-policies-outputs + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + requestBody: + content: + application/json: + examples: + postListAgentPolicyOutputsRequestExample: + description: Get outputs for multiple agent policies + value: + ids: + - agent-policy-id-1 + - agent-policy-id-2 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_list_agent_policy_outputs_request' responses: '200': content: application/json: examples: - putAgentPolicyExample: - description: The updated agent policy + postListAgentPolicyOutputsExample: + description: Outputs associated with the requested agent policies value: - item: - description: An updated agent policy description - id: agent-policy-id-1 - is_managed: false - is_protected: false - name: Updated agent policy - namespace: default - revision: 2 - status: active - updated_at: '2024-01-15T11:00:00.000Z' - updated_by: user1 + items: + - agent_policy_id: agent-policy-id-1 + data_output: + id: output-id-1 + name: Default output + type: elasticsearch + monitoring_output: + id: output-id-1 + name: Default output + type: elasticsearch + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_list_agent_policy_outputs_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error + description: Generic Error type: object properties: attributes: @@ -29794,28 +25707,43 @@ paths: - message - attributes description: Bad Request - summary: Update an agent policy + summary: Get outputs for agent policies tags: - Elastic Agent policies x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status: + /api/fleet/agent_status: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status
+
get /s/{space_id}/api/fleet/agent_status
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the auto-upgrade status for agents assigned to an agent policy.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agent-policies-agentpolicyid-auto-upgrade-agents-status + Get a summary of agent statuses for a given agent policy. + operationId: get-fleet-agent-status parameters: - - description: The ID of the agent policy - in: path - name: agentPolicyId - required: true + - description: Filter by agent policy ID + in: query + name: policyId + required: false + schema: + type: string + - description: Filter by one or more agent policy IDs + in: query + name: policyIds + required: false + schema: + items: + type: string + maxItems: 1000 + type: array + - description: A KQL query string to filter results + in: query + name: kuery + required: false schema: type: string responses: @@ -29823,59 +25751,177 @@ paths: content: application/json: examples: - getAutoUpgradeAgentsStatusExample: - description: Auto-upgrade status for agents in the policy + getAgentStatusExample: + description: Agent status summary for an agent policy value: - agentsCount: 5 - currentVersion: 8.16.0 - failedAgentsCount: 0 - upgradedAgentsCount: 3 - upgradingAgentsCount: 1 + results: + error: 1 + offline: 2 + online: 5 + other: 0 + updating: 0 + totalInactive: 0 schema: additionalProperties: false type: object properties: - currentVersions: - items: - additionalProperties: false - type: object - properties: - agents: - description: Number of agents that upgraded to this version - type: number - failedUpgradeActionIds: - description: List of action IDs related to failed upgrades - items: - type: string - maxItems: 1000 - type: array - failedUpgradeAgents: - description: Number of agents that failed to upgrade to this version - type: number - inProgressUpgradeActionIds: - description: List of action IDs related to in-progress upgrades - items: - type: string - maxItems: 1000 - type: array - inProgressUpgradeAgents: - description: Number of agents that are upgrading to this version - type: number - version: - description: Agent version - type: string - required: - - version - - agents - - failedUpgradeAgents - - inProgressUpgradeAgents + results: + additionalProperties: false + type: object + properties: + active: + type: number + all: + type: number + error: + type: number + events: + type: number + inactive: + type: number + offline: + type: number + online: + type: number + orphaned: + type: number + other: + type: number + unenrolled: + type: number + uninstalled: + type: number + updating: + type: number + required: + - events + - online + - error + - offline + - other + - updating + - inactive + - unenrolled + - all + - active + required: + - results + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Get an agent status summary + tags: + - Elastic Agent status + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agent_status/data: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/agent_status/data
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get the data streams that an agent is actively sending data to.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agent-status-data + parameters: + - description: Agent IDs to check data for, as an array or comma-separated string + in: query + name: agentsIds + required: true + schema: + items: + type: string + maxItems: 10000 + type: array + - description: Filter by integration package name + in: query + name: pkgName + required: false + schema: + type: string + - description: Filter by integration package version + in: query + name: pkgVersion + required: false + schema: + type: string + - description: When true, return a preview of the ingested data + in: query + name: previewData + required: false + schema: + default: false + type: boolean + responses: + '200': + content: + application/json: + examples: + getAgentDataExample: + description: Data streams the agent is actively sending data to + value: + items: + - data: + logs-nginx.access-default: + - id: agent-id-1 + name: my-host + total: 1 + totalMonitoring: 0 + schema: + additionalProperties: false + type: object + properties: + dataPreview: + items: + nullable: true + maxItems: 10000 + type: array + items: + items: + additionalProperties: + additionalProperties: false + type: object + properties: + data: + type: boolean + required: + - data + type: object maxItems: 10000 type: array - totalAgents: - type: number required: - - currentVersions - - totalAgents + - items + - dataPreview description: Successful response '400': content: @@ -29906,23 +25952,23 @@ paths: - message - attributes description: Bad Request - summary: Get auto upgrade agent status + summary: Get incoming agent data tags: - - Elastic Agent policies + - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agent_policies/{agentPolicyId}/copy: + /api/fleet/agentless_policies: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/copy
+
post /s/{space_id}/api/fleet/agentless_policies
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Copy an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. - operationId: post-fleet-agent-policies-agentpolicyid-copy + Create an agentless policy + operationId: post-fleet-agentless-policies parameters: - description: A required header to protect against CSRF attacks in: header @@ -29931,792 +25977,506 @@ paths: schema: example: 'true' type: string - - description: The ID of the agent policy - in: path - name: agentPolicyId - required: true - schema: - type: string - - description: 'Format for the response: simplified or legacy' + - description: The format of the response package policy. in: query name: format required: false schema: + default: simplified enum: - - simplified - legacy + - simplified type: string requestBody: content: application/json: examples: - postCopyAgentPolicyRequestExample: - description: Copy an agent policy with a new name + createAgentlessPoliciesRequestExample: + description: Example request to create agentless policies value: - description: A copy of the original agent policy - name: Copy of my agent policy + description: test + inputs: + ESS Billing-cel: + enabled: true + streams: + ess_billing.billing: + enabled: true + vars: + hide_sensitive: true + http_client_timeout: 30s + lookbehind: 365 + tags: + - forwarded + - billing + ess_billing.credits: + enabled: false + vars: + api_key: + organization_id: '1234' + name: ess_billing-1 + namespace: default + package: + name: ess_billing + version: 1.6.0 + createAgentlessPoliciesReuseAWSCloudConnectorExample: + description: Example request to create agentless policy reusing an existing AWS cloud connector + value: + cloud_connector: + cloud_connector_id: existing-aws-connector-id + target_csp: aws + description: CSPM integration for AWS reusing existing cloud connector + inputs: + cspm-cloudbeat/cis_aws: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + aws.account_type: organization-account + aws.credentials.type: cloud_connector + aws.supports_cloud_connectors: true + external_id: + id: ABCDEFGHIJKLMNOPQRST + isSecretRef: true + role_arn: arn:aws:iam::123456789012:role/TestRole + vars: + cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml + cspm-cloudbeat/cis_azure: + enabled: false + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-aws-reuse-policy + namespace: default + package: + name: cloud_security_posture + version: 3.1.1 + vars: + deployment: aws + posture: cspm + createAgentlessPoliciesWithAWSCloudConnectorExample: + description: Example request to create agentless policy with AWS cloud connector + value: + cloud_connector: + target_csp: aws + description: CSPM integration for AWS with cloud connector + inputs: + cspm-cloudbeat/cis_aws: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + aws.account_type: organization-account + aws.credentials.type: cloud_connector + aws.supports_cloud_connectors: true + external_id: + id: ABCDEFGHIJKLMNOPQRST + isSecretRef: true + role_arn: arn:aws:iam::123456789012:role/TestRole + vars: + cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml + cspm-cloudbeat/cis_azure: + enabled: false + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-aws-policy + namespace: default + package: + name: cloud_security_posture + version: 3.1.1 + vars: + deployment: aws + posture: cspm + createAgentlessPoliciesWithAzureCloudConnectorExample: + description: Example request to create agentless policy with Azure cloud connector + value: + cloud_connector: + target_csp: azure + description: CSPM integration for Azure with cloud connector + inputs: + cspm-cloudbeat/cis_aws: + enabled: false + cspm-cloudbeat/cis_azure: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + azure_credentials_cloud_connector_id: + type: text + value: existing-azure-credentials-connector-id + azure.account_type: organization-account + client_id: + id: client-secret-id + isSecretRef: true + tenant_id: + id: tenant-secret-id + isSecretRef: true + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-azure-policy + namespace: default + package: + name: cloud_security_posture + version: 3.1.1 + vars: + deployment: azure + posture: cspm schema: - additionalProperties: false - type: object - properties: - description: - type: string - name: - minLength: 1 - type: string - required: - - name + $ref: '#/components/schemas/Kibana_HTTP_APIs_simplified_create_package_policy_request' responses: '200': content: application/json: examples: - postCopyAgentPolicyExample: - description: The copied agent policy + createAgentlessPoliciesResponseExample: + description: Example response showing the successful result of communication initialisation over MCP protocol value: item: - description: A copy of the original agent policy - id: agent-policy-id-copy-1 - is_managed: false - is_protected: false - name: Copy of my agent policy + created_at: '2025-11-06T18:27:43.541Z' + created_by: test_user + description: test + enabled: true + id: d52a7812-5736-4fdc-aed8-72152afa1ffa + inputs: + ESS Billing-cel: + enabled: true + streams: + ess_billing.billing: + enabled: true + vars: + hide_sensitive: true + http_client_timeout: 30s + lookbehind: 365 + tags: + - forwarded + - billing + ess_billing.credits: + enabled: false + vars: + api_key: + id: QY1sWpoBbWcMW-edr0Ee + isSecretRef: true + organization_id: '1234' + url: https://billing.elastic-cloud.com + name: ess_billing-1 namespace: default + package: + name: ess_billing + title: Elasticsearch Service Billing + version: 1.6.0 revision: 1 - status: active - updated_at: '2024-01-15T11:00:00.000Z' - updated_by: user1 + secret_references: + - id: QY1sWpoBbWcMW-edr0Ee + supports_agentless: true + updated_at: '2025-11-06T18:27:43.541Z' + updated_by: test_user + version: WzE0OTgsMV0= + createAgentlessPoliciesWithAWSCloudConnectorResponseExample: + description: Example response for AWS cloud connector integration + value: + item: + cloud_connector_id: aws-connector-67890 + created_at: '2025-11-06T18:27:43.541Z' + created_by: test_user + description: CSPM integration for AWS with cloud connector + enabled: true + id: aws-policy-12345 + inputs: + cspm-cloudbeat/cis_aws: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + aws.account_type: organization-account + aws.credentials.type: cloud_connector + external_id: + id: secret-external-id-123 + isSecretRef: true + role_arn: arn:aws:iam::123456789012:role/TestRole + vars: + cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml + cspm-cloudbeat/cis_azure: + enabled: false + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-aws-policy + namespace: default + package: + name: cloud_security_posture + title: Cloud Security Posture Management + version: 3.1.1 + revision: 1 + secret_references: + - id: secret-external-id-123 + supports_agentless: true + supports_cloud_connector: true + updated_at: '2025-11-06T18:27:43.541Z' + updated_by: test_user + vars: + deployment: aws + posture: cspm + version: WzE0OTgsMV0= + createAgentlessPoliciesWithAzureCloudConnectorResponseExample: + description: Example response for Azure cloud connector integration + value: + item: + cloud_connector_id: azure-connector-67890 + created_at: '2025-11-06T18:27:43.541Z' + created_by: test_user + description: CSPM integration for Azure with cloud connector + enabled: true + id: azure-policy-12345 + inputs: + cspm-cloudbeat/cis_aws: + enabled: false + cspm-cloudbeat/cis_azure: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + azure_credentials_cloud_connector_id: + type: text + value: existing-azure-credentials-connector-id + azure.account_type: organization-account + client_id: + id: client-secret-id-456 + isSecretRef: true + tenant_id: + id: tenant-secret-id-123 + isSecretRef: true + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-azure-policy + namespace: default + package: + name: cloud_security_posture + title: Cloud Security Posture Management + version: 3.1.1 + revision: 1 + secret_references: + - id: tenant-secret-id-123 + - id: client-secret-id-456 + supports_agentless: true + supports_cloud_connector: true + updated_at: '2025-11-06T18:27:43.541Z' + updated_by: test_user + vars: + deployment: azure + posture: cspm + version: WzE0OTgsMV0= schema: additionalProperties: false type: object properties: item: additionalProperties: false + description: The created agentless package policy. type: object properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 + type: string + maxItems: 1000 + nullable: true type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string agents: type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. + nullable: true type: string - data_output_id: + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 nullable: true type: string - description: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' type: string - download_source_id: - nullable: true + created_at: type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true + created_by: + type: string + description: + description: Package policy description type: string + elasticsearch: + additionalProperties: true + type: object + properties: + privileges: + additionalProperties: true + type: object + properties: + cluster: + items: + type: string + maxItems: 100 + type: array + enabled: + type: boolean global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. items: additionalProperties: false type: object properties: name: + description: The name of the custom field. Cannot contain spaces. type: string value: anyOf: - type: string - type: number + description: The value of the custom field. required: - name - value maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 + id: + description: Package policy unique identifier. type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: + inputs: anyOf: - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: additionalProperties: false type: object properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 + compiled_input: nullable: true - type: string condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: + config: + additionalProperties: additionalProperties: false type: object properties: - name: - description: The name of the custom field. Cannot contain spaces. + frozen: + type: boolean + type: type: string value: - anyOf: - - type: string - - type: number - description: The value of the custom field. + nullable: true required: - - name - value - maxItems: 100 - nullable: true - type: array + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean id: - description: Package policy unique identifier. type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: + keep_enabled: type: boolean - name: - description: Unique name for the package policy. + migrate_from: type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + name: type: string - output_id: - nullable: true + policy_template: type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: additionalProperties: false type: object properties: - data_stream: + dataset: type: string - features: + elasticsearch: additionalProperties: false type: object properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: + dynamic_dataset: type: boolean - tsdb: + dynamic_namespace: type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean id: type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object required: - - id + - enabled + - data_stream + - compiled_stream maxItems: 1000 type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: + type: type: string var_group_selections: additionalProperties: @@ -30724,124 +26484,249 @@ paths: description: Variable group selections. Maps var_group name to the selected option name within that group. type: object vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string + required: + - value + description: Package variable (see integration documentation for more information) + type: object required: - - name + - type - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 + - streams + - compiled_input + maxItems: 100 type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by + - additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that input. Defaults to `true` (enabled). + type: boolean + streams: + additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that stream. Defaults to `true` (enabled). + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Input streams. Refer to the integration documentation to know which streams are available. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package policy inputs. Refer to the integration documentation to know which inputs are available. + type: object + description: Package policy inputs. + is_managed: + type: boolean + name: + description: Unique name for the package policy. + type: string + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: + nullable: true + type: string + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. + nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + revision: + description: Package policy revision. + type: number + secret_references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 1000 + type: array + spaceIds: + items: + type: string + maxItems: 100 + type: array + supports_agentless: + default: false + description: Indicates whether the package policy belongs to an agentless agent policy. + nullable: true + type: boolean + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. + nullable: true + type: boolean + updated_at: + type: string + updated_by: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + anyOf: + - additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package level variable. + version: + description: Package policy ES version. + type: string + required: + - name + - enabled + - inputs + - id - revision + - updated_at + - updated_by + - created_at + - created_by required: - item - description: Successful response + description: Indicates a successful response '400': content: application/json: @@ -30871,66 +26756,94 @@ paths: - message - attributes description: Bad Request - summary: Copy an agent policy + '409': + content: + application/json: + examples: + conflictErrorResponseExample: + description: Example of a conflict error response + value: + error: Conflict + message: An error message describing what went wrong + statusCode: 409 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Conflict + summary: Create an agentless policy tags: - - Elastic Agent policies + - Fleet agentless policies + x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agent_policies/{agentPolicyId}/download: - get: + /api/fleet/agentless_policies/{policyId}: + delete: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/download
+
delete /s/{space_id}/api/fleet/agentless_policies/{policyId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Download an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. - operationId: get-fleet-agent-policies-agentpolicyid-download + Delete an agentless policy + operationId: delete-fleet-agentless-policies-policyid parameters: - - description: The ID of the agent policy - in: path - name: agentPolicyId + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf required: true schema: + example: 'true' type: string - - description: If true, returns the policy as a downloadable file - in: query - name: download - required: false - schema: - type: boolean - - description: If true, returns the policy formatted for standalone agents - in: query - name: standalone - required: false + - description: The ID of the policy to delete. + in: path + name: policyId + required: true schema: - type: boolean - - description: If true, returns the policy formatted for Kubernetes deployment + type: string + - description: Force delete the policy even if the policy is managed. in: query - name: kubernetes + name: force required: false schema: type: boolean - - description: If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags. - in: query - name: revision - required: false - schema: - type: number responses: '200': content: application/json: examples: - getDownloadAgentPolicyExample: - description: The agent policy download response + createAgentlessPoliciesResponseExample: + description: Example response showing the successful result of communication initialisation over MCP protocol value: - item: 'id: agent-policy-id-1\nrevision: 1\noutputs:\n default:\n type: elasticsearch\n hosts:\n - https://elasticsearch.example.com:9200\n' + item: + id: d52a7812-5736-4fdc-aed8-72152afa1ffa schema: - type: string - description: Successful response — returns the agent policy as a YAML file download + additionalProperties: false + description: Response for deleting an agentless package policy. + type: object + properties: + id: + description: The ID of the deleted agentless package policy. + type: string + required: + - id + description: Indicates a successful response '400': content: application/json: @@ -30960,16 +26873,16 @@ paths: - message - attributes description: Bad Request - '404': + '409': content: application/json: examples: - notFoundExample: - description: No agent policy was found with the given ID + conflictErrorResponseExample: + description: Example of a conflict error response value: - error: Not Found - message: Agent policy not found - statusCode: 404 + error: Conflict + message: An error message describing what went wrong + statusCode: 409 schema: additionalProperties: false description: Generic Error @@ -30988,735 +26901,523 @@ paths: required: - message - attributes - description: Not Found - summary: Download an agent policy + description: Conflict + summary: Delete an agentless policy tags: - - Elastic Agent policies + - Fleet agentless policies + x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agent_policies/{agentPolicyId}/full: + /api/fleet/agents: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/full
+
get /s/{space_id}/api/fleet/agents
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a full agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read. - operationId: get-fleet-agent-policies-agentpolicyid-full + List agents, with optional filtering and pagination.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents parameters: - - description: The ID of the agent policy - in: path - name: agentPolicyId - required: true + - description: Page number + in: query + name: page + required: false + schema: + type: number + - description: Number of results per page + in: query + name: perPage + required: false + schema: + default: 20 + type: number + - description: A KQL query string to filter results + in: query + name: kuery + required: false schema: type: string - - description: If true, returns the policy as a downloadable file + - description: When true, include agentless agents in the results in: query - name: download + name: showAgentless required: false schema: + default: true type: boolean - - description: If true, returns the policy formatted for standalone agents + - description: When true, include inactive agents in the results in: query - name: standalone + name: showInactive required: false schema: + default: false type: boolean - - description: If true, returns the policy formatted for Kubernetes deployment + - description: When true, include CPU and memory metrics in the response in: query - name: kubernetes + name: withMetrics required: false schema: + default: false type: boolean - - description: If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags. + - description: When true, only return agents that are upgradeable in: query - name: revision + name: showUpgradeable required: false schema: - type: number + default: false + type: boolean + - description: When true, return a summary of agent statuses in the response + in: query + name: getStatusSummary + required: false + schema: + default: false + type: boolean + - description: Field to sort results by + in: query + name: sortField + required: false + schema: + type: string + - description: Sort order, ascending or descending + in: query + name: sortOrder + required: false + schema: + enum: + - asc + - desc + type: string + - description: JSON-encoded array of sort values for `search_after` pagination + in: query + name: searchAfter + required: false + schema: + type: string + - description: When true, opens a new point-in-time for pagination + in: query + name: openPit + required: false + schema: + type: boolean + - description: Point-in-time ID for pagination + in: query + name: pitId + required: false + schema: + type: string + - description: Duration to keep the point-in-time alive, for example, `1m` + in: query + name: pitKeepAlive + required: false + schema: + type: string responses: '200': content: application/json: examples: - getFullAgentPolicyExample: - description: The full agent policy configuration + getAgentsExample: + description: List of agents value: - item: - agent: - monitoring: - logs: true - metrics: true - id: agent-policy-id-1 - inputs: [] - outputs: - default: - hosts: - - https://elasticsearch.example.com:9200 - type: elasticsearch - revision: 1 + items: + - active: true + enrolled_at: '2024-01-01T00:00:00.000Z' + id: agent-id-1 + policy_id: agent-policy-id-1 + policy_revision: 1 + status: online + type: PERMANENT + updated_at: '2024-01-01T00:00:00.000Z' + page: 1 + perPage: 20 + total: 1 schema: additionalProperties: false type: object properties: - item: - anyOf: - - type: string - - additionalProperties: false - type: object - properties: - agent: + items: + items: + additionalProperties: false + type: object + properties: + access_api_key: + type: string + access_api_key_id: + type: string + active: + type: boolean + agent: + additionalProperties: true + type: object + properties: + id: + type: string + type: + type: string + version: + type: string + required: + - id + - version + audit_unenrolled_reason: + type: string + capabilities: + items: + type: string + maxItems: 100 + type: array + components: + items: additionalProperties: false type: object properties: - download: - additionalProperties: false - type: object - properties: - auth: - additionalProperties: false - type: object - properties: - api_key: - type: string - headers: - items: - additionalProperties: false - type: object - properties: - key: - type: string - value: - type: string - required: - - key - - value - maxItems: 100 - type: array - password: - type: string - username: - type: string - proxy_headers: - additionalProperties: - anyOf: - - type: string - - type: boolean - - type: number - nullable: true - type: object - proxy_url: - type: string - secrets: - additionalProperties: true - type: object - properties: - ssl: - additionalProperties: true - type: object - properties: - key: - additionalProperties: true - type: object - properties: - id: - type: string - required: - - key - sourceURI: - type: string - ssl: - additionalProperties: false - type: object - properties: - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - key: - type: string - renegotiation: - type: string - verification_mode: - type: string - target_directory: - type: string - timeout: - type: string - required: - - sourceURI - features: - additionalProperties: + id: + type: string + message: + type: string + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + type: string + units: + items: additionalProperties: false type: object properties: - enabled: - type: boolean + id: + type: string + message: + type: string + payload: + additionalProperties: + nullable: true + type: object + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + enum: + - input + - output + - '' + type: string required: - - enabled - type: object - internal: - nullable: true - limits: - additionalProperties: false - type: object - properties: - go_max_procs: - type: number - logging: - additionalProperties: false - type: object - properties: - files: - additionalProperties: false - type: object - properties: - interval: - type: string - keepfiles: - type: number - rotateeverybytes: - type: number - level: - type: string - metrics: - additionalProperties: false - type: object - properties: - period: - type: string - to_files: - type: boolean - monitoring: - additionalProperties: false - type: object - properties: - _runtime_experimental: - type: string - apm: - nullable: true - diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - enabled: - type: boolean - http: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - host: - type: string - port: - type: number - logs: - type: boolean - metrics: - type: boolean - namespace: - type: string - pprof: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - required: - - enabled - traces: - type: boolean - use_output: - type: string - required: - - enabled - - metrics - - logs - - traces - - apm - protection: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - signing_key: - type: string - uninstall_token_hash: - type: string - required: - - enabled - - uninstall_token_hash - - signing_key + - id + - type + - status + - message + maxItems: 10000 + type: array required: - - monitoring - - download - - features - - internal - connectors: - additionalProperties: - nullable: true - type: object - exporters: - additionalProperties: - nullable: true + - id + - type + - status + - message + maxItems: 10000 + type: array + default_api_key: + type: string + default_api_key_history: + items: + additionalProperties: false + deprecated: true type: object - extensions: - additionalProperties: - nullable: true + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + default_api_key_id: + type: string + effective_config: + nullable: true + enrolled_at: + type: string + health: + additionalProperties: + nullable: true + type: object + id: + type: string + identifying_attributes: + additionalProperties: + type: string + type: object + last_checkin: + type: string + last_checkin_message: + type: string + last_checkin_status: + enum: + - error + - online + - degraded + - updating + - starting + - disconnected + type: string + last_known_status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + local_metadata: + additionalProperties: + nullable: true + type: object + metrics: + additionalProperties: false + type: object + properties: + cpu_avg: + type: number + memory_size_byte_avg: + type: number + namespaces: + items: + type: string + maxItems: 100 + type: array + non_identifying_attributes: + additionalProperties: + type: string + type: object + outputs: + additionalProperties: + additionalProperties: false type: object - fleet: - anyOf: - - additionalProperties: false - type: object - properties: - hosts: - items: + properties: + api_key_id: + type: string + to_retire_api_key_ids: + items: + additionalProperties: false + type: object + properties: + id: type: string - maxItems: 100 - type: array - proxy_headers: - additionalProperties: - anyOf: - - type: string - - type: boolean - - type: number - nullable: true - type: object - proxy_url: - type: string - secrets: - additionalProperties: true - type: object - properties: - ssl: - additionalProperties: true - type: object - properties: - key: - additionalProperties: true - type: object - properties: - id: - type: string - required: - - key - ssl: - additionalProperties: false - type: object - properties: - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - key: - type: string - renegotiation: - type: string - verification_mode: - type: string - required: - - hosts - - additionalProperties: false + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + type: + type: string + type: object + packages: + items: + type: string + maxItems: 10000 + type: array + policy_id: + type: string + policy_revision: + nullable: true + type: number + sequence_num: + type: number + signals: + items: + type: string + maxItems: 50 + type: array + sort: + items: + nullable: true + maxItems: 10 + type: array + status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + tags: + items: + type: string + maxItems: 100 + type: array + type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + - OPAMP + type: string + unenrolled_at: + type: string + unenrollment_started_at: + type: string + unhealthy_reason: + items: + enum: + - input + - output + - other + type: string + maxItems: 3 + nullable: true + type: array + upgrade: + additionalProperties: false + type: object + properties: + rollbacks: + items: + additionalProperties: false type: object properties: - kibana: - additionalProperties: false - type: object - properties: - hosts: - items: - type: string - maxItems: 100 - type: array - path: - type: string - protocol: - type: string - required: - - hosts - - protocol + valid_until: + type: string + version: + type: string required: - - kibana - id: + - valid_until + - version + maxItems: 100 + type: array + upgrade_attempts: + items: type: string - inputs: - items: - additionalProperties: true + maxItems: 10000 + nullable: true + type: array + upgrade_details: + additionalProperties: false + nullable: true + type: object + properties: + action_id: + type: string + metadata: + additionalProperties: false type: object properties: - data_stream: - additionalProperties: true - type: object - properties: - namespace: - type: string - required: - - namespace - id: - type: string - meta: - additionalProperties: true - type: object - properties: - package: - additionalProperties: true - type: object - properties: - name: - type: string - version: - type: string - required: - - name - - version - name: - type: string - package_policy_id: - type: string - processors: - items: - additionalProperties: true - type: object - properties: - add_fields: - additionalProperties: true - type: object - properties: - fields: - additionalProperties: - anyOf: - - type: string - - type: number - type: object - target: - type: string - required: - - target - - fields - required: - - add_fields - maxItems: 10000 - type: array - revision: + download_percent: type: number - streams: - items: - additionalProperties: true - type: object - properties: - data_stream: - additionalProperties: true - type: object - properties: - dataset: - type: string - type: - type: string - required: - - dataset - id: - type: string - required: - - id - - data_stream - maxItems: 10000 - type: array - type: + download_rate: + type: number + error_msg: type: string - use_output: + failed_state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK type: string - required: - - id - - name - - revision - - type - - data_stream - - use_output - - package_policy_id - maxItems: 10000 - type: array - namespaces: - items: - type: string - maxItems: 100 - type: array - output_permissions: - additionalProperties: - additionalProperties: - nullable: true - type: object - type: object - outputs: - additionalProperties: - additionalProperties: true - type: object - properties: - ca_sha256: - nullable: true + reason: type: string - hosts: - items: - type: string - maxItems: 100 - type: array - proxy_headers: - additionalProperties: - anyOf: - - type: string - - type: boolean - - type: number - nullable: true - type: object - proxy_url: + retry_error_msg: type: string - type: + retry_until: type: string - required: - - type - type: object - processors: - additionalProperties: - nullable: true - type: object - receivers: - additionalProperties: - nullable: true - type: object - revision: - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 10000 - type: array - service: - additionalProperties: false - type: object - properties: - extensions: - items: + scheduled_at: type: string - maxItems: 1000 - type: array - pipelines: - additionalProperties: - additionalProperties: false - type: object - properties: - exporters: - items: - type: string - maxItems: 1000 - type: array - processors: - items: - type: string - maxItems: 1000 - type: array - receivers: - items: - type: string - maxItems: 1000 - type: array - type: object - signed: - additionalProperties: false - type: object - properties: - data: - type: string - signature: - type: string - required: - - data - - signature - required: - - id - - outputs - - inputs - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: + state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + target_version: + type: string + required: + - target_version + - action_id + - state + upgrade_started_at: + nullable: true + type: string + upgraded_at: + nullable: true + type: string + user_provided_metadata: + additionalProperties: + nullable: true + type: object + required: + - id + - packages + - type + - active + - enrolled_at + - local_metadata + - effective_config + maxItems: 10000 + type: array + nextSearchAfter: type: string - statusCode: + page: type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent policy was found with the given ID - value: - error: Not Found - message: Agent policy not found - statusCode: 404 - description: Not Found - summary: Get a full agent policy - tags: - - Elastic Agent policies - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/agent_policies/{agentPolicyId}/outputs: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/outputs
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get a list of outputs associated with agent policy by policy id.

[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read. - operationId: get-fleet-agent-policies-agentpolicyid-outputs - parameters: - - description: The ID of the agent policy - in: path - name: agentPolicyId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getAgentPolicyOutputsExample: - description: Outputs associated with the agent policy - value: - item: - data_output: - id: output-id-1 - name: Default output - type: elasticsearch - monitoring_output: - id: output-id-1 - name: Default output - type: elasticsearch - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false + perPage: + type: number + pit: + type: string + statusSummary: + additionalProperties: + type: number type: object - properties: - agentPolicyId: - type: string - data: - additionalProperties: false - type: object - properties: - integrations: - items: - additionalProperties: false - type: object - properties: - id: - type: string - integrationPolicyName: - type: string - name: - type: string - pkgName: - type: string - maxItems: 1000 - type: array - output: - additionalProperties: false - type: object - properties: - id: - type: string - name: - type: string - required: - - id - - name - required: - - output - monitoring: - additionalProperties: false - type: object - properties: - output: - additionalProperties: false - type: object - properties: - id: - type: string - name: - type: string - required: - - id - - name - required: - - output - required: - - monitoring - - data + total: + type: number required: - - item + - items + - total + - page + - perPage description: Successful response '400': content: @@ -31747,34 +27448,22 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent policy was found with the given ID - value: - error: Not Found - message: Agent policy not found - statusCode: 404 - description: Not Found - summary: Get outputs for an agent policy + summary: Get agents tags: - - Elastic Agent policies + - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agent_policies/delete: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agent_policies/delete
+
post /s/{space_id}/api/fleet/agents
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. - operationId: post-fleet-agent-policies-delete + Retrieve agents associated with specific action IDs.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: post-fleet-agents parameters: - description: A required header to protect against CSRF attacks in: header @@ -31787,43 +27476,48 @@ paths: content: application/json: examples: - postDeleteAgentPolicyRequestExample: - description: Delete an agent policy by ID + postGetAgentsByActionsRequestExample: + description: Retrieve agents associated with specific action IDs value: - agentPolicyId: agent-policy-id-1 + actionIds: + - action-id-1 + - action-id-2 schema: additionalProperties: false type: object properties: - agentPolicyId: - description: The ID of the agent policy - type: string - force: - description: bypass validation checks that can prevent agent policy deletion - type: boolean + actionIds: + items: + type: string + maxItems: 1000 + type: array required: - - agentPolicyId + - actionIds responses: '200': content: application/json: examples: - postDeleteAgentPolicyExample: - description: The agent policy was successfully deleted + postGetAgentsByActionsExample: + description: Agents associated with the given actions value: - id: agent-policy-id-1 - name: My agent policy + items: + - active: true + id: agent-id-1 + policy_id: agent-policy-id-1 + status: online + total: 1 schema: additionalProperties: false type: object properties: - id: - type: string - name: - type: string + items: + items: + type: string + maxItems: 10000 + type: array required: - - id - - name + - items description: Successful response '400': content: @@ -31854,23 +27548,23 @@ paths: - message - attributes description: Bad Request - summary: Delete an agent policy + summary: Get agents by action ids tags: - - Elastic Agent policies + - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agent_policies/outputs: - post: + /api/fleet/agents/{agentId}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agent_policies/outputs
+
delete /s/{space_id}/api/fleet/agents/{agentId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of outputs associated with agent policies.

[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read. - operationId: post-fleet-agent-policies-outputs + Delete an agent by ID.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: delete-fleet-agents-agentid parameters: - description: A required header to protect against CSRF attacks in: header @@ -31879,113 +27573,32 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - postListAgentPolicyOutputsRequestExample: - description: Get outputs for multiple agent policies - value: - ids: - - agent-policy-id-1 - - agent-policy-id-2 - schema: - additionalProperties: false - type: object - properties: - ids: - description: list of package policy ids - items: - type: string - maxItems: 1000 - type: array - required: - - ids + - description: The agent ID + in: path + name: agentId + required: true + schema: + type: string responses: '200': content: application/json: examples: - postListAgentPolicyOutputsExample: - description: Outputs associated with the requested agent policies + deleteAgentExample: + description: Agent successfully deleted value: - items: - - agent_policy_id: agent-policy-id-1 - data_output: - id: output-id-1 - name: Default output - type: elasticsearch - monitoring_output: - id: output-id-1 - name: Default output - type: elasticsearch + id: agent-id-1 + success: true schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - agentPolicyId: - type: string - data: - additionalProperties: false - type: object - properties: - integrations: - items: - additionalProperties: false - type: object - properties: - id: - type: string - integrationPolicyName: - type: string - name: - type: string - pkgName: - type: string - maxItems: 1000 - type: array - output: - additionalProperties: false - type: object - properties: - id: - type: string - name: - type: string - required: - - id - - name - required: - - output - monitoring: - additionalProperties: false - type: object - properties: - output: - additionalProperties: false - type: object - properties: - id: - type: string - name: - type: string - required: - - id - - name - required: - - output - required: - - monitoring - - data - maxItems: 10000 - type: array + action: + enum: + - deleted + type: string required: - - items + - action description: Successful response '400': content: @@ -32016,105 +27629,437 @@ paths: - message - attributes description: Bad Request - summary: Get outputs for agent policies + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent was found with the given ID + value: + error: Not Found + message: Agent agent-id-1 not found + statusCode: 404 + description: Not Found + summary: Delete an agent tags: - - Elastic Agent policies + - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agent_status: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_status
+
get /s/{space_id}/api/fleet/agents/{agentId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a summary of agent statuses for a given agent policy. - operationId: get-fleet-agent-status + Get an agent by ID.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-agentid parameters: - - description: Filter by agent policy ID - in: query - name: policyId - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: type: string - - description: Filter by one or more agent policy IDs - in: query - name: policyIds - required: false - schema: - items: - type: string - maxItems: 1000 - type: array - - description: A KQL query string to filter results + - description: When true, include CPU and memory metrics in the response in: query - name: kuery + name: withMetrics required: false schema: - type: string + default: false + type: boolean responses: '200': content: application/json: examples: - getAgentStatusExample: - description: Agent status summary for an agent policy + getAgentExample: + description: Agent details value: - results: - error: 1 - offline: 2 - online: 5 - other: 0 - updating: 0 - totalInactive: 0 + item: + active: true + agent_id: agent-id-1 + enrolled_at: '2024-01-01T00:00:00.000Z' + id: agent-id-1 + local_metadata: + elastic: + agent: + version: 8.17.0 + host: + hostname: my-host + os: + name: linux + policy_id: agent-policy-id-1 + policy_revision: 1 + status: online + type: PERMANENT + updated_at: '2024-01-01T00:00:00.000Z' schema: additionalProperties: false type: object properties: - results: + item: additionalProperties: false type: object properties: + access_api_key: + type: string + access_api_key_id: + type: string active: - type: number - all: - type: number - error: - type: number - events: - type: number - inactive: - type: number - offline: - type: number - online: - type: number - orphaned: - type: number - other: - type: number - unenrolled: - type: number - uninstalled: - type: number - updating: - type: number - required: - - events - - online - - error - - offline - - other - - updating - - inactive - - unenrolled - - all + type: boolean + agent: + additionalProperties: true + type: object + properties: + id: + type: string + type: + type: string + version: + type: string + required: + - id + - version + audit_unenrolled_reason: + type: string + capabilities: + items: + type: string + maxItems: 100 + type: array + components: + items: + additionalProperties: false + type: object + properties: + id: + type: string + message: + type: string + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + type: string + units: + items: + additionalProperties: false + type: object + properties: + id: + type: string + message: + type: string + payload: + additionalProperties: + nullable: true + type: object + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + enum: + - input + - output + - '' + type: string + required: + - id + - type + - status + - message + maxItems: 10000 + type: array + required: + - id + - type + - status + - message + maxItems: 10000 + type: array + default_api_key: + type: string + default_api_key_history: + items: + additionalProperties: false + deprecated: true + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + default_api_key_id: + type: string + effective_config: + nullable: true + enrolled_at: + type: string + health: + additionalProperties: + nullable: true + type: object + id: + type: string + identifying_attributes: + additionalProperties: + type: string + type: object + last_checkin: + type: string + last_checkin_message: + type: string + last_checkin_status: + enum: + - error + - online + - degraded + - updating + - starting + - disconnected + type: string + last_known_status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + local_metadata: + additionalProperties: + nullable: true + type: object + metrics: + additionalProperties: false + type: object + properties: + cpu_avg: + type: number + memory_size_byte_avg: + type: number + namespaces: + items: + type: string + maxItems: 100 + type: array + non_identifying_attributes: + additionalProperties: + type: string + type: object + outputs: + additionalProperties: + additionalProperties: false + type: object + properties: + api_key_id: + type: string + to_retire_api_key_ids: + items: + additionalProperties: false + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + type: + type: string + type: object + packages: + items: + type: string + maxItems: 10000 + type: array + policy_id: + type: string + policy_revision: + nullable: true + type: number + sequence_num: + type: number + signals: + items: + type: string + maxItems: 50 + type: array + sort: + items: + nullable: true + maxItems: 10 + type: array + status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + tags: + items: + type: string + maxItems: 100 + type: array + type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + - OPAMP + type: string + unenrolled_at: + type: string + unenrollment_started_at: + type: string + unhealthy_reason: + items: + enum: + - input + - output + - other + type: string + maxItems: 3 + nullable: true + type: array + upgrade: + additionalProperties: false + type: object + properties: + rollbacks: + items: + additionalProperties: false + type: object + properties: + valid_until: + type: string + version: + type: string + required: + - valid_until + - version + maxItems: 100 + type: array + upgrade_attempts: + items: + type: string + maxItems: 10000 + nullable: true + type: array + upgrade_details: + additionalProperties: false + nullable: true + type: object + properties: + action_id: + type: string + metadata: + additionalProperties: false + type: object + properties: + download_percent: + type: number + download_rate: + type: number + error_msg: + type: string + failed_state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + reason: + type: string + retry_error_msg: + type: string + retry_until: + type: string + scheduled_at: + type: string + state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + target_version: + type: string + required: + - target_version + - action_id + - state + upgrade_started_at: + nullable: true + type: string + upgraded_at: + nullable: true + type: string + user_provided_metadata: + additionalProperties: + nullable: true + type: object + required: + - id + - packages + - type - active + - enrolled_at + - local_metadata + - effective_config required: - - results + - item description: Successful response '400': content: @@ -32145,139 +28090,33 @@ paths: - message - attributes description: Bad Request - summary: Get an agent status summary - tags: - - Elastic Agent status - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/agent_status/data: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/agent_status/data
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get the data streams that an agent is actively sending data to.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agent-status-data - parameters: - - description: Agent IDs to check data for, as an array or comma-separated string - in: query - name: agentsIds - required: true - schema: - items: - type: string - maxItems: 10000 - type: array - - description: Filter by integration package name - in: query - name: pkgName - required: false - schema: - type: string - - description: Filter by integration package version - in: query - name: pkgVersion - required: false - schema: - type: string - - description: When true, return a preview of the ingested data - in: query - name: previewData - required: false - schema: - default: false - type: boolean - responses: - '200': - content: - application/json: - examples: - getAgentDataExample: - description: Data streams the agent is actively sending data to - value: - items: - - data: - logs-nginx.access-default: - - id: agent-id-1 - name: my-host - total: 1 - totalMonitoring: 0 - schema: - additionalProperties: false - type: object - properties: - dataPreview: - items: - nullable: true - maxItems: 10000 - type: array - items: - items: - additionalProperties: - additionalProperties: false - type: object - properties: - data: - type: boolean - required: - - data - type: object - maxItems: 10000 - type: array - required: - - items - - dataPreview - description: Successful response - '400': + '404': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + notFoundExample: + description: No agent was found with the given ID value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get incoming agent data + error: Not Found + message: Agent agent-id-1 not found + statusCode: 404 + description: Not Found + summary: Get an agent tags: - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agentless_policies: - post: + put: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agentless_policies
+
put /s/{space_id}/api/fleet/agents/{agentId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create an agentless policy - operationId: post-fleet-agentless-policies + Update an agent by ID.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: put-fleet-agents-agentid parameters: - description: A required header to protect against CSRF attacks in: header @@ -32286,1107 +28125,614 @@ paths: schema: example: 'true' type: string - - description: The format of the response package policy. - in: query - name: format - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: - default: simplified - enum: - - legacy - - simplified type: string requestBody: content: application/json: examples: - createAgentlessPoliciesRequestExample: - description: Example request to create agentless policies + putAgentRequestExample: + description: Update agent tags value: - description: test - inputs: - ESS Billing-cel: - enabled: true - streams: - ess_billing.billing: - enabled: true - vars: - hide_sensitive: true - http_client_timeout: 30s - lookbehind: 365 - tags: - - forwarded - - billing - ess_billing.credits: - enabled: false - vars: - api_key: - organization_id: '1234' - name: ess_billing-1 - namespace: default - package: - name: ess_billing - version: 1.6.0 - createAgentlessPoliciesReuseAWSCloudConnectorExample: - description: Example request to create agentless policy reusing an existing AWS cloud connector - value: - cloud_connector: - cloud_connector_id: existing-aws-connector-id - target_csp: aws - description: CSPM integration for AWS reusing existing cloud connector - inputs: - cspm-cloudbeat/cis_aws: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - aws.account_type: organization-account - aws.credentials.type: cloud_connector - aws.supports_cloud_connectors: true - external_id: - id: ABCDEFGHIJKLMNOPQRST - isSecretRef: true - role_arn: arn:aws:iam::123456789012:role/TestRole - vars: - cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml - cspm-cloudbeat/cis_azure: - enabled: false - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-aws-reuse-policy - namespace: default - package: - name: cloud_security_posture - version: 3.1.1 - vars: - deployment: aws - posture: cspm - createAgentlessPoliciesWithAWSCloudConnectorExample: - description: Example request to create agentless policy with AWS cloud connector - value: - cloud_connector: - target_csp: aws - description: CSPM integration for AWS with cloud connector - inputs: - cspm-cloudbeat/cis_aws: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - aws.account_type: organization-account - aws.credentials.type: cloud_connector - aws.supports_cloud_connectors: true - external_id: - id: ABCDEFGHIJKLMNOPQRST - isSecretRef: true - role_arn: arn:aws:iam::123456789012:role/TestRole - vars: - cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml - cspm-cloudbeat/cis_azure: - enabled: false - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-aws-policy - namespace: default - package: - name: cloud_security_posture - version: 3.1.1 - vars: - deployment: aws - posture: cspm - createAgentlessPoliciesWithAzureCloudConnectorExample: - description: Example request to create agentless policy with Azure cloud connector - value: - cloud_connector: - target_csp: azure - description: CSPM integration for Azure with cloud connector - inputs: - cspm-cloudbeat/cis_aws: - enabled: false - cspm-cloudbeat/cis_azure: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - azure_credentials_cloud_connector_id: - type: text - value: existing-azure-credentials-connector-id - azure.account_type: organization-account - client_id: - id: client-secret-id - isSecretRef: true - tenant_id: - id: tenant-secret-id - isSecretRef: true - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-azure-policy - namespace: default - package: - name: cloud_security_posture - version: 3.1.1 - vars: - deployment: azure - posture: cspm + tags: + - production + - linux schema: additionalProperties: false type: object properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. + tags: items: type: string - maxItems: 100 - nullable: true + maxItems: 10 type: array - cloud_connector: - additionalProperties: false + user_provided_metadata: + additionalProperties: + nullable: true type: object - properties: - cloud_connector_id: - description: ID of an existing cloud connector to reuse. If not provided, a new connector will be created. - type: string - enabled: - default: false - description: Whether cloud connectors are enabled for this policy. - type: boolean - name: - description: Optional name for the cloud connector. If not provided, will be auto-generated from credentials. - maxLength: 255 - minLength: 1 - type: string - target_csp: - description: Target cloud service provider. If not provided, will be auto-detected from inputs. - enum: - - aws - - azure - - gcp - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Policy description. - type: string - force: - description: Force package policy creation even if the package is not verified, or if the agent policy is managed. - type: boolean - global_data_tags: - items: + responses: + '200': + content: + application/json: + examples: + putAgentExample: + description: Updated agent details + value: + item: + active: true + enrolled_at: '2024-01-01T00:00:00.000Z' + id: agent-id-1 + policy_id: agent-policy-id-1 + policy_revision: 1 + status: online + tags: + - production + - linux + type: PERMANENT + updated_at: '2024-01-01T00:00:00.000Z' + schema: + additionalProperties: false + type: object + properties: + item: additionalProperties: false type: object properties: - name: - description: The name of the custom field. Cannot contain spaces. + access_api_key: type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - type: array - id: - description: Policy unique identifier. - type: string - inputs: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + access_api_key_id: type: string - deprecated: - additionalProperties: false + active: + type: boolean + agent: + additionalProperties: true type: object properties: - description: + id: type: string - replaced_by: - additionalProperties: - type: string - type: object - since: + type: + type: string + version: type: string required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: + - id + - version + audit_unenrolled_reason: + type: string + capabilities: + items: + type: string + maxItems: 100 + type: array + components: + items: additionalProperties: false type: object properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + id: type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: + message: + type: string + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + type: string + units: + items: + additionalProperties: false + type: object + properties: + id: type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false + message: + type: string + payload: + additionalProperties: + nullable: true type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + enum: + - input + - output + - '' + type: string + required: + - id + - type + - status + - message + maxItems: 10000 + type: array + required: + - id + - type + - status + - message + maxItems: 10000 + type: array + default_api_key: + type: string + default_api_key_history: + items: + additionalProperties: false + deprecated: true + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + default_api_key_id: + type: string + effective_config: + nullable: true + enrolled_at: + type: string + health: + additionalProperties: + nullable: true type: object - vars: + id: + type: string + identifying_attributes: additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number + type: string + type: object + last_checkin: + type: string + last_checkin_message: + type: string + last_checkin_status: + enum: + - error + - online + - degraded + - updating + - starting + - disconnected + type: string + last_known_status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + local_metadata: + additionalProperties: + nullable: true + type: object + metrics: + additionalProperties: false + type: object + properties: + cpu_avg: + type: number + memory_size_byte_avg: + type: number + namespaces: + items: + type: string + maxItems: 100 + type: array + non_identifying_attributes: + additionalProperties: + type: string + type: object + outputs: + additionalProperties: + additionalProperties: false + type: object + properties: + api_key_id: + type: string + to_retire_api_key_ids: + items: + additionalProperties: false + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at maxItems: 100 type: array - - additionalProperties: false + type: + type: string + type: object + packages: + items: + type: string + maxItems: 10000 + type: array + policy_id: + type: string + policy_revision: + nullable: true + type: number + sequence_num: + type: number + signals: + items: + type: string + maxItems: 50 + type: array + sort: + items: + nullable: true + maxItems: 10 + type: array + status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + tags: + items: + type: string + maxItems: 100 + type: array + type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + - OPAMP + type: string + unenrolled_at: + type: string + unenrollment_started_at: + type: string + unhealthy_reason: + items: + enum: + - input + - output + - other + type: string + maxItems: 3 + nullable: true + type: array + upgrade: + additionalProperties: false + type: object + properties: + rollbacks: + items: + additionalProperties: false type: object properties: - id: + valid_until: + type: string + version: type: string - isSecretRef: - type: boolean required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - name: - description: Unique name for the policy. - type: string - namespace: - description: Policy namespace. When not specified, it inherits the agent policy namespace. - type: string - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: + - valid_until + - version + maxItems: 100 + type: array + upgrade_attempts: + items: + type: string + maxItems: 10000 + nullable: true + type: array + upgrade_details: additionalProperties: false + nullable: true type: object properties: - data_stream: + action_id: type: string - features: + metadata: additionalProperties: false type: object properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - policy_template: - description: The policy template to use for the agentless package policy. If not provided, the default policy template will be used. - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: + download_percent: + type: number + download_rate: + type: number + error_msg: + type: string + failed_state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + reason: + type: string + retry_error_msg: + type: string + retry_until: + type: string + scheduled_at: + type: string + state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + target_version: type: string - isSecretRef: - type: boolean required: - - id - - isSecretRef + - target_version + - action_id + - state + upgrade_started_at: + nullable: true + type: string + upgraded_at: + nullable: true + type: string + user_provided_metadata: + additionalProperties: + nullable: true + type: object + required: + - id + - packages + - type + - active + - enrolled_at + - local_metadata + - effective_config + required: + - item + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent was found with the given ID + value: + error: Not Found + message: Agent agent-id-1 not found + statusCode: 404 + description: Not Found + summary: Update an agent by ID + tags: + - Elastic Agents + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agents/{agentId}/actions: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/actions
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Create a new action for a specific agent.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-actions + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The agent ID + in: path + name: agentId + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + postAgentActionRequestExample: + description: Create a UNENROLL action for an agent + value: + action: + type: UNENROLL + schema: + additionalProperties: false + type: object + properties: + action: + anyOf: + - additionalProperties: false + type: object + properties: + ack_data: + nullable: true + data: + nullable: true + type: + enum: + - UNENROLL + - UPGRADE + - POLICY_REASSIGN + type: string + required: + - type + - data + - ack_data + - additionalProperties: false + type: object + properties: + data: + additionalProperties: false + type: object + properties: + log_level: + enum: + - debug + - info + - warning + - error + nullable: true + type: string + required: + - log_level + type: + enum: + - SETTINGS + type: string + required: + - type + - data required: - - name - - package + - action responses: '200': content: application/json: examples: - createAgentlessPoliciesResponseExample: - description: Example response showing the successful result of communication initialisation over MCP protocol - value: - item: - created_at: '2025-11-06T18:27:43.541Z' - created_by: test_user - description: test - enabled: true - id: d52a7812-5736-4fdc-aed8-72152afa1ffa - inputs: - ESS Billing-cel: - enabled: true - streams: - ess_billing.billing: - enabled: true - vars: - hide_sensitive: true - http_client_timeout: 30s - lookbehind: 365 - tags: - - forwarded - - billing - ess_billing.credits: - enabled: false - vars: - api_key: - id: QY1sWpoBbWcMW-edr0Ee - isSecretRef: true - organization_id: '1234' - url: https://billing.elastic-cloud.com - name: ess_billing-1 - namespace: default - package: - name: ess_billing - title: Elasticsearch Service Billing - version: 1.6.0 - revision: 1 - secret_references: - - id: QY1sWpoBbWcMW-edr0Ee - supports_agentless: true - updated_at: '2025-11-06T18:27:43.541Z' - updated_by: test_user - version: WzE0OTgsMV0= - createAgentlessPoliciesWithAWSCloudConnectorResponseExample: - description: Example response for AWS cloud connector integration - value: - item: - cloud_connector_id: aws-connector-67890 - created_at: '2025-11-06T18:27:43.541Z' - created_by: test_user - description: CSPM integration for AWS with cloud connector - enabled: true - id: aws-policy-12345 - inputs: - cspm-cloudbeat/cis_aws: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - aws.account_type: organization-account - aws.credentials.type: cloud_connector - external_id: - id: secret-external-id-123 - isSecretRef: true - role_arn: arn:aws:iam::123456789012:role/TestRole - vars: - cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml - cspm-cloudbeat/cis_azure: - enabled: false - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-aws-policy - namespace: default - package: - name: cloud_security_posture - title: Cloud Security Posture Management - version: 3.1.1 - revision: 1 - secret_references: - - id: secret-external-id-123 - supports_agentless: true - supports_cloud_connector: true - updated_at: '2025-11-06T18:27:43.541Z' - updated_by: test_user - vars: - deployment: aws - posture: cspm - version: WzE0OTgsMV0= - createAgentlessPoliciesWithAzureCloudConnectorResponseExample: - description: Example response for Azure cloud connector integration + postAgentActionExample: + description: Created agent action value: item: - cloud_connector_id: azure-connector-67890 - created_at: '2025-11-06T18:27:43.541Z' - created_by: test_user - description: CSPM integration for Azure with cloud connector - enabled: true - id: azure-policy-12345 - inputs: - cspm-cloudbeat/cis_aws: - enabled: false - cspm-cloudbeat/cis_azure: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - azure_credentials_cloud_connector_id: - type: text - value: existing-azure-credentials-connector-id - azure.account_type: organization-account - client_id: - id: client-secret-id-456 - isSecretRef: true - tenant_id: - id: tenant-secret-id-123 - isSecretRef: true - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-azure-policy - namespace: default - package: - name: cloud_security_posture - title: Cloud Security Posture Management - version: 3.1.1 - revision: 1 - secret_references: - - id: tenant-secret-id-123 - - id: client-secret-id-456 - supports_agentless: true - supports_cloud_connector: true - updated_at: '2025-11-06T18:27:43.541Z' - updated_by: test_user - vars: - deployment: azure - posture: cspm - version: WzE0OTgsMV0= + agents: + - agent-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: action-id-1 + type: UNENROLL schema: additionalProperties: false type: object properties: item: additionalProperties: false - description: The created agentless package policy. type: object properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. + ack_data: + nullable: true + agents: items: type: string - maxItems: 1000 - nullable: true + maxItems: 10000 type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string created_at: type: string - created_by: + data: + nullable: true + expiration: type: string - description: - description: Package policy description + id: type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: + minimum_execution_duration: + type: number + namespaces: items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value + type: string maxItems: 100 - nullable: true type: array - id: - description: Package policy unique identifier. + rollout_duration_seconds: + type: number + sent_at: type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: + source_uri: type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true + start_time: type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. + total: type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. + type: type: string required: - - name - - enabled - - inputs - id - - revision - - updated_at - - updated_by + - type + - data - created_at - - created_by + - ack_data required: - item - description: Indicates a successful response + description: Successful response '400': content: application/json: @@ -33416,133 +28762,54 @@ paths: - message - attributes description: Bad Request - '409': - content: - application/json: - examples: - conflictErrorResponseExample: - description: Example of a conflict error response - value: - error: Conflict - message: An error message describing what went wrong - statusCode: 409 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Conflict - summary: Create an agentless policy + summary: Create an agent action tags: - - Fleet agentless policies - x-state: Experimental + - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agentless_policies/{policyId}: - delete: + /api/fleet/agents/{agentId}/effective_config: + get: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/agentless_policies/{policyId}
+
get /s/{space_id}/api/fleet/agents/{agentId}/effective_config
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete an agentless policy - operationId: delete-fleet-agentless-policies-policyid + Get an agent's effective config by ID.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-agentid-effective-config parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the policy to delete. + - description: The agent ID to get effective config of in: path - name: policyId + name: agentId required: true schema: type: string - - description: Force delete the policy even if the policy is managed. - in: query - name: force - required: false - schema: - type: boolean responses: '200': content: application/json: examples: - createAgentlessPoliciesResponseExample: - description: Example response showing the successful result of communication initialisation over MCP protocol - value: - item: - id: d52a7812-5736-4fdc-aed8-72152afa1ffa - schema: - additionalProperties: false - description: Response for deleting an agentless package policy. - type: object - properties: - id: - description: The ID of the deleted agentless package policy. - type: string - required: - - id - description: Indicates a successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response + successResponse: value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 + effective_config: {} schema: additionalProperties: false - description: Generic Error type: object properties: - attributes: + effective_config: nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number required: - - message - - attributes - description: Bad Request - '409': + - effective_config + description: 'OK: A successful request.' + '400': content: application/json: examples: - conflictErrorResponseExample: - description: Example of a conflict error response + badRequestResponse: value: - error: Conflict - message: An error message describing what went wrong - statusCode: 409 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -33561,523 +28828,451 @@ paths: required: - message - attributes - description: Conflict - summary: Delete an agentless policy + description: A bad request. + summary: Get an agent's effective config tags: - - Fleet agentless policies - x-state: Experimental + - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents: - get: + /api/fleet/agents/{agentId}/migrate: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents
+
post /s/{space_id}/api/fleet/agents/{agentId}/migrate
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - List agents, with optional filtering and pagination.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents + Migrate a single agent to another cluster.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-migrate parameters: - - description: Page number - in: query - name: page - required: false - schema: - type: number - - description: Number of results per page - in: query - name: perPage - required: false - schema: - default: 20 - type: number - - description: A KQL query string to filter results - in: query - name: kuery - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: When true, include agentless agents in the results - in: query - name: showAgentless - required: false - schema: - default: true - type: boolean - - description: When true, include inactive agents in the results - in: query - name: showInactive - required: false - schema: - default: false - type: boolean - - description: When true, include CPU and memory metrics in the response - in: query - name: withMetrics - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: - default: false - type: boolean - - description: When true, only return agents that are upgradeable - in: query - name: showUpgradeable - required: false + type: string + requestBody: + content: + application/json: + examples: + postMigrateAgentRequestExample: + description: Migrate a single agent to another cluster + value: + enrollment_token: enrollment-token-value + settings: + retry_max: 5 + uri: https://fleet-server.example.com:8220 + schema: + additionalProperties: false + type: object + properties: + enrollment_token: + type: string + settings: + additionalProperties: false + type: object + properties: + ca_sha256: + type: string + certificate_authorities: + type: string + elastic_agent_cert: + type: string + elastic_agent_cert_key: + type: string + elastic_agent_cert_key_passphrase: + type: string + headers: + additionalProperties: + type: string + type: object + insecure: + type: boolean + proxy_disabled: + type: boolean + proxy_headers: + additionalProperties: + type: string + type: object + proxy_url: + type: string + replace_token: + type: string + staging: + type: string + tags: + items: + type: string + maxItems: 10 + type: array + uri: + format: uri + type: string + required: + - uri + - enrollment_token + responses: + '200': + content: + application/json: + examples: + postMigrateAgentExample: + description: Agent migration initiated + value: + actionId: action-id-1 + schema: + additionalProperties: false + type: object + properties: + actionId: + type: string + required: + - actionId + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Migrate a single agent + tags: + - Elastic Agents + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agents/{agentId}/privilege_level_change: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/privilege_level_change
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Change the privilege level of a single agent to unprivileged.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-privilege-level-change + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: - default: false - type: boolean - - description: When true, return a summary of agent statuses in the response - in: query - name: getStatusSummary - required: false + example: 'true' + type: string + - description: The agent ID to change privilege level for + in: path + name: agentId + required: true schema: - default: false - type: boolean - - description: Field to sort results by - in: query - name: sortField - required: false + type: string + requestBody: + content: + application/json: + examples: + changeAgentPrivilegeLevelRequest: + value: + user_info: + groupname: groupname + password: password + username: username + schema: + additionalProperties: false + nullable: true + type: object + properties: + user_info: + additionalProperties: false + type: object + properties: + groupname: + type: string + password: + type: string + username: + type: string + responses: + '200': + content: + application/json: + examples: + successResponse: + value: + actionId: actionId + schema: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_action_id_response' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_action_message_response' + description: 'OK: A successful request.' + '400': + content: + application/json: + examples: + badRequestResponse: + value: + message: Bad Request + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: A bad request. + summary: Change agent privilege level + tags: + - Elastic Agents + x-state: Experimental + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agents/{agentId}/reassign: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/reassign
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Reassign an agent to a different agent policy.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-reassign + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: Sort order, ascending or descending - in: query - name: sortOrder - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: - enum: - - asc - - desc type: string - - description: JSON-encoded array of sort values for `search_after` pagination - in: query - name: searchAfter - required: false + requestBody: + content: + application/json: + examples: + postReassignAgentRequestExample: + description: Reassign an agent to a different policy + value: + policy_id: agent-policy-id-2 + schema: + additionalProperties: false + type: object + properties: + policy_id: + type: string + required: + - policy_id + responses: + '200': + content: + application/json: + examples: + postReassignAgentExample: + description: Agent successfully reassigned + value: {} + schema: + additionalProperties: false + type: object + properties: {} + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Reassign an agent + tags: + - Elastic Agent actions + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agents/{agentId}/remove_collector: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/remove_collector
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Remove a specific OpAMP collector from the Fleet agents list. Marks the collector as unenrolled. This action does not invalidate API keys, so the collector can reconnect on its own.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-remove-collector + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: When true, opens a new point-in-time for pagination - in: query - name: openPit - required: false + - description: The collector agent ID + in: path + name: agentId + required: true schema: - type: boolean - - description: Point-in-time ID for pagination - in: query - name: pitId - required: false + type: string + responses: + '200': + content: + application/json: + examples: + postRemoveCollectorExample: + description: Collector successfully removed + value: {} + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + description: Bad Request + summary: Remove an OpAMP collector + tags: + - Elastic Agent actions + x-state: Experimental + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agents/{agentId}/request_diagnostics: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/request_diagnostics
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Request a diagnostics bundle from a specific agent.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: post-fleet-agents-agentid-request-diagnostics + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: Duration to keep the point-in-time alive, for example, `1m` - in: query - name: pitKeepAlive - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: type: string + requestBody: + content: + application/json: + examples: + postRequestDiagnosticsRequestExample: + description: Request a diagnostics bundle from an agent + value: + additional_metrics: + - CPU + schema: + additionalProperties: false + nullable: true + type: object + properties: + additional_metrics: + items: + enum: + - CPU + type: string + maxItems: 1 + type: array responses: '200': content: application/json: examples: - getAgentsExample: - description: List of agents + postRequestDiagnosticsExample: + description: Diagnostics action result value: - items: - - active: true - enrolled_at: '2024-01-01T00:00:00.000Z' - id: agent-id-1 - policy_id: agent-policy-id-1 - policy_revision: 1 - status: online - type: PERMANENT - updated_at: '2024-01-01T00:00:00.000Z' - page: 1 - perPage: 20 - total: 1 + actionId: action-id-1 schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - access_api_key: - type: string - access_api_key_id: - type: string - active: - type: boolean - agent: - additionalProperties: true - type: object - properties: - id: - type: string - type: - type: string - version: - type: string - required: - - id - - version - audit_unenrolled_reason: - type: string - capabilities: - items: - type: string - maxItems: 100 - type: array - components: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - type: string - units: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - payload: - additionalProperties: - nullable: true - type: object - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - enum: - - input - - output - - '' - type: string - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - default_api_key: - type: string - default_api_key_history: - items: - additionalProperties: false - deprecated: true - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - default_api_key_id: - type: string - effective_config: - nullable: true - enrolled_at: - type: string - health: - additionalProperties: - nullable: true - type: object - id: - type: string - identifying_attributes: - additionalProperties: - type: string - type: object - last_checkin: - type: string - last_checkin_message: - type: string - last_checkin_status: - enum: - - error - - online - - degraded - - updating - - starting - - disconnected - type: string - last_known_status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - local_metadata: - additionalProperties: - nullable: true - type: object - metrics: - additionalProperties: false - type: object - properties: - cpu_avg: - type: number - memory_size_byte_avg: - type: number - namespaces: - items: - type: string - maxItems: 100 - type: array - non_identifying_attributes: - additionalProperties: - type: string - type: object - outputs: - additionalProperties: - additionalProperties: false - type: object - properties: - api_key_id: - type: string - to_retire_api_key_ids: - items: - additionalProperties: false - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - type: - type: string - type: object - packages: - items: - type: string - maxItems: 10000 - type: array - policy_id: - type: string - policy_revision: - nullable: true - type: number - sequence_num: - type: number - signals: - items: - type: string - maxItems: 50 - type: array - sort: - items: - nullable: true - maxItems: 10 - type: array - status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - tags: - items: - type: string - maxItems: 100 - type: array - type: - enum: - - PERMANENT - - EPHEMERAL - - TEMPORARY - - OPAMP - type: string - unenrolled_at: - type: string - unenrollment_started_at: - type: string - unhealthy_reason: - items: - enum: - - input - - output - - other - type: string - maxItems: 3 - nullable: true - type: array - upgrade: - additionalProperties: false - type: object - properties: - rollbacks: - items: - additionalProperties: false - type: object - properties: - valid_until: - type: string - version: - type: string - required: - - valid_until - - version - maxItems: 100 - type: array - upgrade_attempts: - items: - type: string - maxItems: 10000 - nullable: true - type: array - upgrade_details: - additionalProperties: false - nullable: true - type: object - properties: - action_id: - type: string - metadata: - additionalProperties: false - type: object - properties: - download_percent: - type: number - download_rate: - type: number - error_msg: - type: string - failed_state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - reason: - type: string - retry_error_msg: - type: string - retry_until: - type: string - scheduled_at: - type: string - state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - target_version: - type: string - required: - - target_version - - action_id - - state - upgrade_started_at: - nullable: true - type: string - upgraded_at: - nullable: true - type: string - user_provided_metadata: - additionalProperties: - nullable: true - type: object - required: - - id - - packages - - type - - active - - enrolled_at - - local_metadata - - effective_config - maxItems: 10000 - type: array - nextSearchAfter: - type: string - page: - type: number - perPage: - type: number - pit: + actionId: type: string - statusSummary: - additionalProperties: - type: number - type: object - total: - type: number required: - - items - - total - - page - - perPage + - actionId description: Successful response '400': content: @@ -34087,7 +29282,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: An error message describing what went wrong + message: Agent agent-id-1 does not support request diagnostics action. statusCode: 400 schema: additionalProperties: false @@ -34108,22 +29303,23 @@ paths: - message - attributes description: Bad Request - summary: Get agents + summary: Request agent diagnostics tags: - - Elastic Agents + - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name + /api/fleet/agents/{agentId}/rollback: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents
+
post /s/{space_id}/api/fleet/agents/{agentId}/rollback
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Retrieve agents associated with specific action IDs.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: post-fleet-agents + Rollback an agent to the previous version.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-rollback parameters: - description: A required header to protect against CSRF attacks in: header @@ -34132,63 +29328,32 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - postGetAgentsByActionsRequestExample: - description: Retrieve agents associated with specific action IDs - value: - actionIds: - - action-id-1 - - action-id-2 - schema: - additionalProperties: false - type: object - properties: - actionIds: - items: - type: string - maxItems: 1000 - type: array - required: - - actionIds + - description: The agent ID to rollback + in: path + name: agentId + required: true + schema: + type: string responses: '200': content: application/json: examples: - postGetAgentsByActionsExample: - description: Agents associated with the given actions + successResponse: value: - items: - - active: true - id: agent-id-1 - policy_id: agent-policy-id-1 - status: online - total: 1 + actionId: actionId schema: - additionalProperties: false - type: object - properties: - items: - items: - type: string - maxItems: 10000 - type: array - required: - - items - description: Successful response + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_action_id_response' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_action_message_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -34207,24 +29372,25 @@ paths: required: - message - attributes - description: Bad Request - summary: Get agents by action ids + description: A bad request. + summary: Rollback an agent tags: - - Elastic Agents + - Elastic Agent actions + x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}: - delete: + /api/fleet/agents/{agentId}/unenroll: + post: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/agents/{agentId}
+
post /s/{space_id}/api/fleet/agents/{agentId}/unenroll
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete an agent by ID.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: delete-fleet-agents-agentid + Unenroll a specific agent, optionally revoking its enrollment API key.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-unenroll parameters: - description: A required header to protect against CSRF attacks in: header @@ -34239,26 +29405,31 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + examples: + postUnenrollAgentRequestExample: + description: Unenroll an agent, optionally revoking the enrollment API key + value: + revoke: false + schema: + additionalProperties: false + nullable: true + type: object + properties: + force: + type: boolean + revoke: + type: boolean responses: '200': content: application/json: examples: - deleteAgentExample: - description: Agent successfully deleted - value: - id: agent-id-1 - success: true - schema: - additionalProperties: false - type: object - properties: - action: - enum: - - deleted - type: string - required: - - action + postUnenrollAgentExample: + description: Agent successfully unenrolled + value: {} description: Successful response '400': content: @@ -34270,456 +29441,72 @@ paths: error: Bad Request message: An error message describing what went wrong statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent was found with the given ID - value: - error: Not Found - message: Agent agent-id-1 not found - statusCode: 404 - description: Not Found - summary: Delete an agent + summary: Unenroll an agent tags: - - Elastic Agents + - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - get: + /api/fleet/agents/{agentId}/upgrade: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/{agentId}
+
post /s/{space_id}/api/fleet/agents/{agentId}/upgrade
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an agent by ID.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-agentid + Upgrade a specific agent to a newer version.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-upgrade parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string - description: The agent ID in: path name: agentId required: true schema: type: string - - description: When true, include CPU and memory metrics in the response - in: query - name: withMetrics - required: false - schema: - default: false - type: boolean + requestBody: + content: + application/json: + examples: + postUpgradeAgentRequestExample: + description: Upgrade an agent to a specific version + value: + version: 8.17.0 + schema: + additionalProperties: false + type: object + properties: + force: + type: boolean + skipRateLimitCheck: + type: boolean + source_uri: + type: string + version: + type: string + required: + - version responses: '200': content: application/json: examples: - getAgentExample: - description: Agent details - value: - item: - active: true - agent_id: agent-id-1 - enrolled_at: '2024-01-01T00:00:00.000Z' - id: agent-id-1 - local_metadata: - elastic: - agent: - version: 8.17.0 - host: - hostname: my-host - os: - name: linux - policy_id: agent-policy-id-1 - policy_revision: 1 - status: online - type: PERMANENT - updated_at: '2024-01-01T00:00:00.000Z' + postUpgradeAgentExample: + description: Agent upgrade initiated + value: {} schema: additionalProperties: false type: object - properties: - item: - additionalProperties: false - type: object - properties: - access_api_key: - type: string - access_api_key_id: - type: string - active: - type: boolean - agent: - additionalProperties: true - type: object - properties: - id: - type: string - type: - type: string - version: - type: string - required: - - id - - version - audit_unenrolled_reason: - type: string - capabilities: - items: - type: string - maxItems: 100 - type: array - components: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - type: string - units: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - payload: - additionalProperties: - nullable: true - type: object - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - enum: - - input - - output - - '' - type: string - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - default_api_key: - type: string - default_api_key_history: - items: - additionalProperties: false - deprecated: true - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - default_api_key_id: - type: string - effective_config: - nullable: true - enrolled_at: - type: string - health: - additionalProperties: - nullable: true - type: object - id: - type: string - identifying_attributes: - additionalProperties: - type: string - type: object - last_checkin: - type: string - last_checkin_message: - type: string - last_checkin_status: - enum: - - error - - online - - degraded - - updating - - starting - - disconnected - type: string - last_known_status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - local_metadata: - additionalProperties: - nullable: true - type: object - metrics: - additionalProperties: false - type: object - properties: - cpu_avg: - type: number - memory_size_byte_avg: - type: number - namespaces: - items: - type: string - maxItems: 100 - type: array - non_identifying_attributes: - additionalProperties: - type: string - type: object - outputs: - additionalProperties: - additionalProperties: false - type: object - properties: - api_key_id: - type: string - to_retire_api_key_ids: - items: - additionalProperties: false - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - type: - type: string - type: object - packages: - items: - type: string - maxItems: 10000 - type: array - policy_id: - type: string - policy_revision: - nullable: true - type: number - sequence_num: - type: number - signals: - items: - type: string - maxItems: 50 - type: array - sort: - items: - nullable: true - maxItems: 10 - type: array - status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - tags: - items: - type: string - maxItems: 100 - type: array - type: - enum: - - PERMANENT - - EPHEMERAL - - TEMPORARY - - OPAMP - type: string - unenrolled_at: - type: string - unenrollment_started_at: - type: string - unhealthy_reason: - items: - enum: - - input - - output - - other - type: string - maxItems: 3 - nullable: true - type: array - upgrade: - additionalProperties: false - type: object - properties: - rollbacks: - items: - additionalProperties: false - type: object - properties: - valid_until: - type: string - version: - type: string - required: - - valid_until - - version - maxItems: 100 - type: array - upgrade_attempts: - items: - type: string - maxItems: 10000 - nullable: true - type: array - upgrade_details: - additionalProperties: false - nullable: true - type: object - properties: - action_id: - type: string - metadata: - additionalProperties: false - type: object - properties: - download_percent: - type: number - download_rate: - type: number - error_msg: - type: string - failed_state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - reason: - type: string - retry_error_msg: - type: string - retry_until: - type: string - scheduled_at: - type: string - state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - target_version: - type: string - required: - - target_version - - action_id - - state - upgrade_started_at: - nullable: true - type: string - upgraded_at: - nullable: true - type: string - user_provided_metadata: - additionalProperties: - nullable: true - type: object - required: - - id - - packages - - type - - active - - enrolled_at - - local_metadata - - effective_config - required: - - item + properties: {} description: Successful response '400': content: @@ -34750,454 +29537,86 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent was found with the given ID - value: - error: Not Found - message: Agent agent-id-1 not found - statusCode: 404 - description: Not Found - summary: Get an agent + summary: Upgrade an agent tags: - - Elastic Agents + - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - put: + /api/fleet/agents/{agentId}/uploads: + get: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/agents/{agentId}
+
get /s/{space_id}/api/fleet/agents/{agentId}/uploads
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update an agent by ID.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: put-fleet-agents-agentid + Get a list of files uploaded by a specific agent.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-agentid-uploads parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - description: The agent ID in: path name: agentId required: true schema: type: string - requestBody: - content: - application/json: - examples: - putAgentRequestExample: - description: Update agent tags - value: - tags: - - production - - linux - schema: - additionalProperties: false - type: object - properties: - tags: - items: - type: string - maxItems: 10 - type: array - user_provided_metadata: - additionalProperties: - nullable: true - type: object responses: '200': content: application/json: examples: - putAgentExample: - description: Updated agent details + getAgentUploadsExample: + description: List of files uploaded by the agent value: - item: - active: true - enrolled_at: '2024-01-01T00:00:00.000Z' - id: agent-id-1 - policy_id: agent-policy-id-1 - policy_revision: 1 - status: online - tags: - - production - - linux - type: PERMANENT - updated_at: '2024-01-01T00:00:00.000Z' + items: + - actionId: action-id-1 + createTime: '2024-01-01T00:00:00.000Z' + filePath: /tmp/diagnostics-2024-01-01.zip + id: file-id-1 + name: diagnostics-2024-01-01.zip + status: READY schema: additionalProperties: false type: object properties: - item: - additionalProperties: false - type: object - properties: - access_api_key: - type: string - access_api_key_id: - type: string - active: - type: boolean - agent: - additionalProperties: true - type: object - properties: - id: - type: string - type: - type: string - version: - type: string - required: - - id - - version - audit_unenrolled_reason: - type: string - capabilities: - items: - type: string - maxItems: 100 - type: array - components: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - type: string - units: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - payload: - additionalProperties: - nullable: true - type: object - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - enum: - - input - - output - - '' - type: string - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - default_api_key: - type: string - default_api_key_history: - items: - additionalProperties: false - deprecated: true - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - default_api_key_id: - type: string - effective_config: - nullable: true - enrolled_at: - type: string - health: - additionalProperties: - nullable: true - type: object - id: - type: string - identifying_attributes: - additionalProperties: + items: + items: + additionalProperties: false + type: object + properties: + actionId: type: string - type: object - last_checkin: - type: string - last_checkin_message: - type: string - last_checkin_status: - enum: - - error - - online - - degraded - - updating - - starting - - disconnected - type: string - last_known_status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - local_metadata: - additionalProperties: - nullable: true - type: object - metrics: - additionalProperties: false - type: object - properties: - cpu_avg: - type: number - memory_size_byte_avg: - type: number - namespaces: - items: + createTime: type: string - maxItems: 100 - type: array - non_identifying_attributes: - additionalProperties: + error: type: string - type: object - outputs: - additionalProperties: - additionalProperties: false - type: object - properties: - api_key_id: - type: string - to_retire_api_key_ids: - items: - additionalProperties: false - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - type: - type: string - type: object - packages: - items: + filePath: type: string - maxItems: 10000 - type: array - policy_id: - type: string - policy_revision: - nullable: true - type: number - sequence_num: - type: number - signals: - items: + id: type: string - maxItems: 50 - type: array - sort: - items: - nullable: true - maxItems: 10 - type: array - status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - tags: - items: + name: type: string - maxItems: 100 - type: array - type: - enum: - - PERMANENT - - EPHEMERAL - - TEMPORARY - - OPAMP - type: string - unenrolled_at: - type: string - unenrollment_started_at: - type: string - unhealthy_reason: - items: + status: enum: - - input - - output - - other - type: string - maxItems: 3 - nullable: true - type: array - upgrade: - additionalProperties: false - type: object - properties: - rollbacks: - items: - additionalProperties: false - type: object - properties: - valid_until: - type: string - version: - type: string - required: - - valid_until - - version - maxItems: 100 - type: array - upgrade_attempts: - items: + - READY + - AWAITING_UPLOAD + - DELETED + - EXPIRED + - IN_PROGRESS + - FAILED type: string - maxItems: 10000 - nullable: true - type: array - upgrade_details: - additionalProperties: false - nullable: true - type: object - properties: - action_id: - type: string - metadata: - additionalProperties: false - type: object - properties: - download_percent: - type: number - download_rate: - type: number - error_msg: - type: string - failed_state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - reason: - type: string - retry_error_msg: - type: string - retry_until: - type: string - scheduled_at: - type: string - state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - target_version: - type: string - required: - - target_version - - action_id - - state - upgrade_started_at: - nullable: true - type: string - upgraded_at: - nullable: true - type: string - user_provided_metadata: - additionalProperties: - nullable: true - type: object - required: - - id - - packages - - type - - active - - enrolled_at - - local_metadata - - effective_config + required: + - id + - name + - filePath + - createTime + - status + - actionId + maxItems: 10000 + type: array required: - - item + - items description: Successful response '400': content: @@ -35228,132 +29647,277 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent was found with the given ID - value: - error: Not Found - message: Agent agent-id-1 not found - statusCode: 404 - description: Not Found - summary: Update an agent by ID + summary: Get agent uploads tags: - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/actions: - post: + /api/fleet/agents/action_status: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/actions
+
get /s/{space_id}/api/fleet/agents/action_status
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create a new action for a specific agent.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-actions + Get the current status of recent agent actions.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-action-status parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: Page number + in: query + name: page + required: false schema: - example: 'true' - type: string - - description: The agent ID - in: path - name: agentId - required: true + default: 0 + type: number + - description: Number of results per page + in: query + name: perPage + required: false + schema: + default: 20 + type: number + - description: Return actions created before this date + in: query + name: date + required: false schema: type: string - requestBody: - content: - application/json: - examples: - postAgentActionRequestExample: - description: Create a UNENROLL action for an agent - value: - action: - type: UNENROLL - schema: - additionalProperties: false - type: object - properties: - action: - anyOf: - - additionalProperties: false - type: object - properties: - ack_data: - nullable: true - data: - nullable: true - type: - enum: - - UNENROLL - - UPGRADE - - POLICY_REASSIGN - type: string - required: - - type - - data - - ack_data - - additionalProperties: false - type: object - properties: - data: - additionalProperties: false - type: object - properties: - log_level: - enum: - - debug - - info - - warning - - error - nullable: true - type: string - required: - - log_level - type: - enum: - - SETTINGS - type: string - required: - - type - - data - required: - - action + - description: Return only the latest N actions + in: query + name: latest + required: false + schema: + type: number + - description: Number of error details to include per action + in: query + name: errorSize + required: false + schema: + default: 5 + type: number responses: '200': content: application/json: examples: - postAgentActionExample: - description: Created agent action + getActionStatusExample: + description: Status of recent agent actions value: - item: - agents: - - agent-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: action-id-1 - type: UNENROLL + items: + - actionId: action-id-1 + completionTime: '2024-01-01T00:05:00.000Z' + creationTime: '2024-01-01T00:00:00.000Z' + nbAgentsAck: 2 + nbAgentsActioned: 2 + nbAgentsFailed: 0 + status: COMPLETE + type: UPGRADE schema: additionalProperties: false type: object properties: - item: - additionalProperties: false - type: object - properties: - ack_data: - nullable: true - agents: - items: + items: + items: + additionalProperties: false + type: object + properties: + actionId: + type: string + cancellationTime: + type: string + completionTime: + type: string + creationTime: + description: creation time of action + type: string + expiration: + type: string + hasRolloutPeriod: + type: boolean + is_automatic: + type: boolean + latestErrors: + items: + additionalProperties: false + description: latest errors that happened when the agents executed the action + type: object + properties: + agentId: + type: string + error: + type: string + hostname: + type: string + timestamp: + type: string + required: + - agentId + - error + - timestamp + maxItems: 10 + type: array + nbAgentsAck: + description: number of agents that acknowledged the action + type: number + nbAgentsActionCreated: + description: number of agents included in action from kibana + type: number + nbAgentsActioned: + description: number of agents actioned + type: number + nbAgentsFailed: + description: number of agents that failed to execute the action + type: number + newPolicyId: + description: new policy id (POLICY_REASSIGN action) + type: string + policyId: + description: policy id (POLICY_CHANGE action) + type: string + revision: + description: new policy revision (POLICY_CHANGE action) + type: number + startTime: + description: start time of action (scheduled actions) + type: string + status: + enum: + - COMPLETE + - EXPIRED + - CANCELLED + - FAILED + - IN_PROGRESS + - ROLLOUT_PASSED + type: string + type: + enum: + - UPGRADE + - UNENROLL + - SETTINGS + - POLICY_REASSIGN + - CANCEL + - FORCE_UNENROLL + - REQUEST_DIAGNOSTICS + - UPDATE_TAGS + - POLICY_CHANGE + - INPUT_ACTION + - MIGRATE + - PRIVILEGE_LEVEL_CHANGE + - ROLLBACK + type: string + version: + description: agent version number (UPGRADE action) + type: string + required: + - actionId + - nbAgentsActionCreated + - nbAgentsAck + - nbAgentsFailed + - type + - nbAgentsActioned + - status + - creationTime + maxItems: 10000 + type: array + required: + - items + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Get an agent action status + tags: + - Elastic Agent actions + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/agents/actions/{actionId}/cancel: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/actions/{actionId}/cancel
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Cancel a pending action for a specific agent.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-actions-actionid-cancel + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The ID of the action to cancel + in: path + name: actionId + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + postCancelActionRequestExample: + description: Cancel an agent action + value: {} + responses: + '200': + content: + application/json: + examples: + postCancelActionExample: + description: Cancellation action created + value: + item: + agents: + - agent-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: cancel-action-id-1 + type: CANCEL + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: false + type: object + properties: + ack_data: + nullable: true + agents: + items: type: string maxItems: 10000 type: array @@ -35422,54 +29986,58 @@ paths: - message - attributes description: Bad Request - summary: Create an agent action + summary: Cancel an agent action tags: - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/effective_config: + /api/fleet/agents/available_versions: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/{agentId}/effective_config
+
get /s/{space_id}/api/fleet/agents/available_versions
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an agent's effective config by ID.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-agentid-effective-config - parameters: - - description: The agent ID to get effective config of - in: path - name: agentId - required: true - schema: - type: string + Get a list of Elastic Agent versions available for upgrade.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-available-versions + parameters: [] responses: '200': content: application/json: examples: - successResponse: + getAvailableVersionsExample: + description: List of available agent versions for upgrade value: - effective_config: {} + items: + - 8.17.0 + - 8.16.3 + - 8.16.2 schema: additionalProperties: false type: object properties: - effective_config: - nullable: true + items: + items: + type: string + maxItems: 10000 + type: array required: - - effective_config - description: 'OK: A successful request.' + - items + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -35488,24 +30056,24 @@ paths: required: - message - attributes - description: A bad request. - summary: Get an agent's effective config + description: Bad Request + summary: Get available agent versions tags: - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/migrate: + /api/fleet/agents/bulk_migrate: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/migrate
+
post /s/{space_id}/api/fleet/agents/bulk_migrate
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Migrate a single agent to another cluster.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-migrate + Bulk migrate agents to another cluster.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-migrate parameters: - description: A required header to protect against CSRF attacks in: header @@ -35514,19 +30082,16 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postMigrateAgentRequestExample: - description: Migrate a single agent to another cluster + postBulkMigrateAgentsRequestExample: + description: Migrate multiple agents to another cluster value: + agents: + - agent-id-1 + - agent-id-2 enrollment_token: enrollment-token-value settings: retry_max: 5 @@ -35535,6 +30100,15 @@ paths: additionalProperties: false type: object properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number enrollment_token: type: string settings: @@ -35565,8 +30139,6 @@ paths: type: object proxy_url: type: string - replace_token: - type: string staging: type: string tags: @@ -35578,6 +30150,7 @@ paths: format: uri type: string required: + - agents - uri - enrollment_token responses: @@ -35585,8 +30158,8 @@ paths: content: application/json: examples: - postMigrateAgentExample: - description: Agent migration initiated + postBulkMigrateAgentsExample: + description: Bulk agent migration initiated value: actionId: action-id-1 schema: @@ -35627,23 +30200,23 @@ paths: - message - attributes description: Bad Request - summary: Migrate a single agent + summary: Migrate multiple agents tags: - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/privilege_level_change: + /api/fleet/agents/bulk_privilege_level_change: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/privilege_level_change
+
post /s/{space_id}/api/fleet/agents/bulk_privilege_level_change
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Change the privilege level of a single agent to unprivileged.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-privilege-level-change + Change multiple agents' privilege level to unprivileged.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-privilege-level-change parameters: - description: A required header to protect against CSRF attacks in: header @@ -35652,27 +30225,30 @@ paths: schema: example: 'true' type: string - - description: The agent ID to change privilege level for - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - changeAgentPrivilegeLevelRequest: + bulkChangeAgentPrivilegeLevelRequest: value: + agents: agent user_info: groupname: groupname password: password username: username schema: additionalProperties: false - nullable: true type: object properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number user_info: additionalProperties: false type: object @@ -35683,6 +30259,8 @@ paths: type: string username: type: string + required: + - agents responses: '200': content: @@ -35692,21 +30270,13 @@ paths: value: actionId: actionId schema: - anyOf: - - additionalProperties: false - type: object - properties: - actionId: - type: string - required: - - actionId - - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message + additionalProperties: false + type: object + properties: + actionId: + type: string + required: + - actionId description: 'OK: A successful request.' '400': content: @@ -35734,24 +30304,24 @@ paths: - message - attributes description: A bad request. - summary: Change agent privilege level + summary: Bulk change agent privilege level tags: - Elastic Agents x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/reassign: + /api/fleet/agents/bulk_reassign: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/reassign
+
post /s/{space_id}/api/fleet/agents/bulk_reassign
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Reassign an agent to a different agent policy.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-reassign + Reassign multiple agents to a different agent policy.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-reassign parameters: - description: A required header to protect against CSRF attacks in: header @@ -35760,40 +30330,55 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postReassignAgentRequestExample: - description: Reassign an agent to a different policy + postBulkReassignAgentsRequestExample: + description: Reassign multiple agents to a different policy value: + agents: + - agent-id-1 + - agent-id-2 policy_id: agent-policy-id-2 schema: additionalProperties: false type: object properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + includeInactive: + default: false + type: boolean policy_id: type: string required: - policy_id + - agents responses: '200': content: application/json: examples: - postReassignAgentExample: - description: Agent successfully reassigned - value: {} + postBulkReassignAgentsExample: + description: Bulk reassign action result + value: + actionId: action-id-1 schema: additionalProperties: false type: object - properties: {} + properties: + actionId: + type: string + required: + - actionId description: Successful response '400': content: @@ -35824,23 +30409,23 @@ paths: - message - attributes description: Bad Request - summary: Reassign an agent + summary: Bulk reassign agents tags: - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/remove_collector: + /api/fleet/agents/bulk_remove_collectors: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/remove_collector
+
post /s/{space_id}/api/fleet/agents/bulk_remove_collectors
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Remove a specific OpAMP collector from the Fleet agents list. Marks the collector as unenrolled. This action does not invalidate API keys, so the collector can reconnect on its own.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-remove-collector + Remove multiple OpAMP collectors from the Fleet agents list. Marks the collectors as unenrolled. This action does not invalidate API keys, so collectors can reconnect on their own.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-remove-collectors parameters: - description: A required header to protect against CSRF attacks in: header @@ -35849,20 +30434,51 @@ paths: schema: example: 'true' type: string - - description: The collector agent ID - in: path - name: agentId - required: true - schema: - type: string + requestBody: + content: + application/json: + examples: + postBulkRemoveCollectorsRequestExample: + description: Remove multiple OpAMP collectors + value: + agents: + - collector-id-1 + - collector-id-2 + schema: + additionalProperties: false + type: object + properties: + agents: + anyOf: + - items: + description: List of collector agent IDs + type: string + maxItems: 10000 + type: array + - description: KQL query string. Leave empty to target all collectors + type: string + includeInactive: + description: When passing collectors by KQL query, also removes inactive collectors + type: boolean + required: + - agents responses: '200': content: application/json: examples: - postRemoveCollectorExample: - description: Collector successfully removed - value: {} + postBulkRemoveCollectorsExample: + description: Bulk remove collectors action result + value: + actionId: action-id-1 + schema: + additionalProperties: false + type: object + properties: + actionId: + type: string + required: + - actionId description: Successful response '400': content: @@ -35874,25 +30490,43 @@ paths: error: Bad Request message: An error message describing what went wrong statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes description: Bad Request - summary: Remove an OpAMP collector + summary: Bulk remove OpAMP collectors tags: - Elastic Agent actions x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/request_diagnostics: + /api/fleet/agents/bulk_request_diagnostics: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/request_diagnostics
+
post /s/{space_id}/api/fleet/agents/bulk_request_diagnostics
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Request a diagnostics bundle from a specific agent.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: post-fleet-agents-agentid-request-diagnostics + Request diagnostics bundles from multiple agents.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: post-fleet-agents-bulk-request-diagnostics parameters: - description: A required header to protect against CSRF attacks in: header @@ -35901,24 +30535,20 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postRequestDiagnosticsRequestExample: - description: Request a diagnostics bundle from an agent + postBulkRequestDiagnosticsRequestExample: + description: Request diagnostics bundles from multiple agents value: additional_metrics: - CPU + agents: + - agent-id-1 + - agent-id-2 schema: additionalProperties: false - nullable: true type: object properties: additional_metrics: @@ -35928,13 +30558,24 @@ paths: type: string maxItems: 1 type: array + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + required: + - agents responses: '200': content: application/json: examples: - postRequestDiagnosticsExample: - description: Diagnostics action result + postBulkRequestDiagnosticsExample: + description: Bulk diagnostics action result value: actionId: action-id-1 schema: @@ -35954,7 +30595,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: Agent agent-id-1 does not support request diagnostics action. + message: An error message describing what went wrong statusCode: 400 schema: additionalProperties: false @@ -35975,23 +30616,23 @@ paths: - message - attributes description: Bad Request - summary: Request agent diagnostics + summary: Bulk request diagnostics from agents tags: - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/rollback: + /api/fleet/agents/bulk_rollback: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/rollback
+
post /s/{space_id}/api/fleet/agents/bulk_rollback
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Rollback an agent to the previous version.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-rollback + Rollback multiple agents to the previous version.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-rollback parameters: - description: A required header to protect against CSRF attacks in: header @@ -36000,12 +30641,35 @@ paths: schema: example: 'true' type: string - - description: The agent ID to rollback - in: path - name: agentId - required: true - schema: - type: string + requestBody: + content: + application/json: + examples: + bulkRollbackAgentsRequest: + value: + agents: + - agent-1 + - agent-2 + batchSize: 100 + includeInactive: false + schema: + additionalProperties: false + type: object + properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + includeInactive: + default: false + type: boolean + required: + - agents responses: '200': content: @@ -36013,23 +30677,20 @@ paths: examples: successResponse: value: - actionId: actionId + actionIds: + - actionId1 + - actionId2 schema: - anyOf: - - additionalProperties: false - type: object - properties: - actionId: - type: string - required: - - actionId - - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message + additionalProperties: false + type: object + properties: + actionIds: + items: + type: string + maxItems: 10000 + type: array + required: + - actionIds description: 'OK: A successful request.' '400': content: @@ -36057,24 +30718,24 @@ paths: - message - attributes description: A bad request. - summary: Rollback an agent + summary: Bulk rollback agents tags: - Elastic Agent actions x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/unenroll: + /api/fleet/agents/bulk_unenroll: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/unenroll
+
post /s/{space_id}/api/fleet/agents/bulk_unenroll
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Unenroll a specific agent, optionally revoking its enrollment API key.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-unenroll + Unenroll multiple agents, optionally revoking their enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-unenroll parameters: - description: A required header to protect against CSRF attacks in: header @@ -36083,37 +30744,60 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postUnenrollAgentRequestExample: - description: Unenroll an agent, optionally revoking the enrollment API key + postBulkUnenrollAgentsRequestExample: + description: Unenroll multiple agents value: + agents: + - agent-id-1 + - agent-id-2 revoke: false schema: additionalProperties: false - nullable: true type: object properties: + agents: + anyOf: + - items: + description: list of agent IDs + type: string + maxItems: 10000 + type: array + - description: KQL query string, leave empty to action all agents + type: string + batchSize: + type: number force: + description: Unenrolls hosted agents too + type: boolean + includeInactive: + description: When passing agents by KQL query, unenrolls inactive agents too type: boolean revoke: + description: Revokes API keys of agents type: boolean + required: + - agents responses: '200': content: application/json: examples: - postUnenrollAgentExample: - description: Agent successfully unenrolled - value: {} + postBulkUnenrollAgentsExample: + description: Bulk unenroll action result + value: + actionId: action-id-1 + schema: + additionalProperties: false + type: object + properties: + actionId: + type: string + required: + - actionId description: Successful response '400': content: @@ -36125,24 +30809,42 @@ paths: error: Bad Request message: An error message describing what went wrong statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes description: Bad Request - summary: Unenroll an agent + summary: Bulk unenroll agents tags: - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/upgrade: + /api/fleet/agents/bulk_update_agent_tags: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/upgrade
+
post /s/{space_id}/api/fleet/agents/bulk_update_agent_tags
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Upgrade a specific agent to a newer version.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-upgrade + Add or remove tags across multiple agents.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-update-agent-tags parameters: - description: A required header to protect against CSRF attacks in: header @@ -36151,46 +30853,65 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postUpgradeAgentRequestExample: - description: Upgrade an agent to a specific version + postBulkUpdateAgentTagsRequestExample: + description: Add and remove tags across multiple agents value: - version: 8.17.0 + agents: + - agent-id-1 + - agent-id-2 + tagsToAdd: + - production + tagsToRemove: + - staging schema: additionalProperties: false type: object properties: - force: - type: boolean - skipRateLimitCheck: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + includeInactive: + default: false type: boolean - source_uri: - type: string - version: - type: string + tagsToAdd: + items: + type: string + maxItems: 10 + type: array + tagsToRemove: + items: + type: string + maxItems: 10 + type: array required: - - version + - agents responses: '200': content: application/json: examples: - postUpgradeAgentExample: - description: Agent upgrade initiated - value: {} + postBulkUpdateAgentTagsExample: + description: Bulk action result + value: + actionId: action-id-1 schema: additionalProperties: false type: object - properties: {} + properties: + actionId: + type: string + required: + - actionId description: Successful response '400': content: @@ -36221,86 +30942,92 @@ paths: - message - attributes description: Bad Request - summary: Upgrade an agent + summary: Bulk update agent tags tags: - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/{agentId}/uploads: - get: + /api/fleet/agents/bulk_upgrade: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/{agentId}/uploads
+
post /s/{space_id}/api/fleet/agents/bulk_upgrade
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of files uploaded by a specific agent.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-agentid-uploads + Upgrade multiple agents to a newer version, with optional rollout controls.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-upgrade parameters: - - description: The agent ID - in: path - name: agentId + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf required: true schema: + example: 'true' type: string + requestBody: + content: + application/json: + examples: + postBulkUpgradeAgentsRequestExample: + description: Upgrade multiple agents to a specific version + value: + agents: + - agent-id-1 + - agent-id-2 + rollout_duration_seconds: 3600 + version: 8.17.0 + schema: + additionalProperties: false + type: object + properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + force: + type: boolean + includeInactive: + default: false + type: boolean + rollout_duration_seconds: + minimum: 600 + type: number + skipRateLimitCheck: + type: boolean + source_uri: + type: string + start_time: + type: string + version: + type: string + required: + - agents + - version responses: '200': content: application/json: examples: - getAgentUploadsExample: - description: List of files uploaded by the agent + postBulkUpgradeAgentsExample: + description: Bulk upgrade action result value: - items: - - actionId: action-id-1 - createTime: '2024-01-01T00:00:00.000Z' - filePath: /tmp/diagnostics-2024-01-01.zip - id: file-id-1 - name: diagnostics-2024-01-01.zip - status: READY + actionId: action-id-1 schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - actionId: - type: string - createTime: - type: string - error: - type: string - filePath: - type: string - id: - type: string - name: - type: string - status: - enum: - - READY - - AWAITING_UPLOAD - - DELETED - - EXPIRED - - IN_PROGRESS - - FAILED - type: string - required: - - id - - name - - filePath - - createTime - - status - - actionId - maxItems: 10000 - type: array + actionId: + type: string required: - - items + - actionId description: Successful response '400': content: @@ -36331,183 +31058,58 @@ paths: - message - attributes description: Bad Request - summary: Get agent uploads + summary: Bulk upgrade agents tags: - - Elastic Agents + - Elastic Agent actions x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/action_status: - get: + /api/fleet/agents/files/{fileId}: + delete: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/action_status
+
delete /s/{space_id}/api/fleet/agents/files/{fileId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the current status of recent agent actions.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-action-status + Delete a file uploaded by an agent.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: delete-fleet-agents-files-fileid parameters: - - description: Page number - in: query - name: page - required: false - schema: - default: 0 - type: number - - description: Number of results per page - in: query - name: perPage - required: false - schema: - default: 20 - type: number - - description: Return actions created before this date - in: query - name: date - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: Return only the latest N actions - in: query - name: latest - required: false - schema: - type: number - - description: Number of error details to include per action - in: query - name: errorSize - required: false + - description: The ID of the uploaded file + in: path + name: fileId + required: true schema: - default: 5 - type: number + type: string responses: '200': content: application/json: examples: - getActionStatusExample: - description: Status of recent agent actions + deleteAgentUploadFileExample: + description: Uploaded file successfully deleted value: - items: - - actionId: action-id-1 - completionTime: '2024-01-01T00:05:00.000Z' - creationTime: '2024-01-01T00:00:00.000Z' - nbAgentsAck: 2 - nbAgentsActioned: 2 - nbAgentsFailed: 0 - status: COMPLETE - type: UPGRADE + deleted: true + id: file-id-1 schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - actionId: - type: string - cancellationTime: - type: string - completionTime: - type: string - creationTime: - description: creation time of action - type: string - expiration: - type: string - hasRolloutPeriod: - type: boolean - is_automatic: - type: boolean - latestErrors: - items: - additionalProperties: false - description: latest errors that happened when the agents executed the action - type: object - properties: - agentId: - type: string - error: - type: string - hostname: - type: string - timestamp: - type: string - required: - - agentId - - error - - timestamp - maxItems: 10 - type: array - nbAgentsAck: - description: number of agents that acknowledged the action - type: number - nbAgentsActionCreated: - description: number of agents included in action from kibana - type: number - nbAgentsActioned: - description: number of agents actioned - type: number - nbAgentsFailed: - description: number of agents that failed to execute the action - type: number - newPolicyId: - description: new policy id (POLICY_REASSIGN action) - type: string - policyId: - description: policy id (POLICY_CHANGE action) - type: string - revision: - description: new policy revision (POLICY_CHANGE action) - type: number - startTime: - description: start time of action (scheduled actions) - type: string - status: - enum: - - COMPLETE - - EXPIRED - - CANCELLED - - FAILED - - IN_PROGRESS - - ROLLOUT_PASSED - type: string - type: - enum: - - UPGRADE - - UNENROLL - - SETTINGS - - POLICY_REASSIGN - - CANCEL - - FORCE_UNENROLL - - REQUEST_DIAGNOSTICS - - UPDATE_TAGS - - POLICY_CHANGE - - INPUT_ACTION - - MIGRATE - - PRIVILEGE_LEVEL_CHANGE - - ROLLBACK - type: string - version: - description: agent version number (UPGRADE action) - type: string - required: - - actionId - - nbAgentsActionCreated - - nbAgentsAck - - nbAgentsFailed - - type - - nbAgentsActioned - - status - - creationTime - maxItems: 10000 - type: array + deleted: + type: boolean + id: + type: string required: - - items + - id + - deleted description: Successful response '400': content: @@ -36538,109 +31140,47 @@ paths: - message - attributes description: Bad Request - summary: Get an agent action status + summary: Delete an uploaded file tags: - - Elastic Agent actions + - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/actions/{actionId}/cancel: - post: + /api/fleet/agents/files/{fileId}/{fileName}: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/actions/{actionId}/cancel
+
get /s/{space_id}/api/fleet/agents/files/{fileId}/{fileName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Cancel a pending action for a specific agent.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-actions-actionid-cancel + Get a file uploaded by an agent.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-files-fileid-filename parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: The ID of the uploaded file + in: path + name: fileId required: true schema: - example: 'true' type: string - - description: The ID of the action to cancel + - description: The name of the uploaded file in: path - name: actionId + name: fileName required: true schema: type: string - requestBody: - content: - application/json: - examples: - postCancelActionRequestExample: - description: Cancel an agent action - value: {} responses: '200': content: application/json: examples: - postCancelActionExample: - description: Cancellation action created - value: - item: - agents: - - agent-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: cancel-action-id-1 - type: CANCEL + getAgentUploadFileExample: + description: The uploaded file content as a stream + value: schema: - additionalProperties: false type: object - properties: - item: - additionalProperties: false - type: object - properties: - ack_data: - nullable: true - agents: - items: - type: string - maxItems: 10000 - type: array - created_at: - type: string - data: - nullable: true - expiration: - type: string - id: - type: string - minimum_execution_duration: - type: number - namespaces: - items: - type: string - maxItems: 100 - type: array - rollout_duration_seconds: - type: number - sent_at: - type: string - source_uri: - type: string - start_time: - type: string - total: - type: number - type: - type: string - required: - - id - - type - - data - - created_at - - ack_data - required: - - item - description: Successful response + description: Successful response — returns the uploaded file content '400': content: application/json: @@ -36670,48 +31210,93 @@ paths: - message - attributes description: Bad Request - summary: Cancel an agent action + summary: Get an uploaded file tags: - - Elastic Agent actions + - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/available_versions: + /api/fleet/agents/setup: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/available_versions
+
get /s/{space_id}/api/fleet/agents/setup
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of Elastic Agent versions available for upgrade.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-available-versions + Get the current Fleet setup status, including whether Fleet is ready to enroll agents and which requirements or optional features are missing.

[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup. + operationId: get-fleet-agents-setup parameters: [] responses: '200': content: application/json: examples: - getAvailableVersionsExample: - description: List of available agent versions for upgrade + agentsSetupNotReadyExample: + description: Fleet is not ready — a Fleet Server and API keys are required value: - items: - - 8.17.0 - - 8.16.3 - - 8.16.2 + is_action_secrets_storage_enabled: false + is_secrets_storage_enabled: false + is_space_awareness_enabled: false + is_ssl_secrets_storage_enabled: false + isReady: false + missing_optional_features: + - encrypted_saved_object_encryption_key_required + missing_requirements: + - fleet_server + - api_keys + agentsSetupReadyExample: + description: Fleet is ready to enroll agents — all requirements are met + value: + is_action_secrets_storage_enabled: true + is_secrets_storage_enabled: true + is_space_awareness_enabled: false + is_ssl_secrets_storage_enabled: false + isReady: true + missing_optional_features: [] + missing_requirements: [] + package_verification_key_id: D88DB4CC schema: additionalProperties: false + description: A summary of the agent setup status. `isReady` indicates whether the setup is ready. If the setup is not ready, `missing_requirements` lists which requirements are missing. type: object properties: - items: + is_action_secrets_storage_enabled: + type: boolean + is_secrets_storage_enabled: + type: boolean + is_space_awareness_enabled: + type: boolean + is_ssl_secrets_storage_enabled: + type: boolean + isReady: + type: boolean + missing_optional_features: items: + enum: + - encrypted_saved_object_encryption_key_required type: string - maxItems: 10000 + maxItems: 1 + type: array + missing_requirements: + items: + enum: + - security_required + - tls_required + - api_keys + - fleet_admin_user + - fleet_server + type: string + maxItems: 5 type: array + package_verification_key_id: + type: string required: - - items - description: Successful response + - isReady + - missing_requirements + - missing_optional_features + description: Fleet setup status '400': content: application/json: @@ -36741,23 +31326,22 @@ paths: - message - attributes description: Bad Request - summary: Get available agent versions + summary: Get agent setup info tags: - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/bulk_migrate: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_migrate
+
post /s/{space_id}/api/fleet/agents/setup
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Bulk migrate agents to another cluster.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-migrate + Initialize Fleet. This endpoint is used by Elastic Agents to trigger Fleet setup. Safe to call multiple times; subsequent calls are idempotent.

[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup. + operationId: post-fleet-agents-setup parameters: - description: A required header to protect against CSRF attacks in: header @@ -36766,95 +31350,41 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkMigrateAgentsRequestExample: - description: Migrate multiple agents to another cluster - value: - agents: - - agent-id-1 - - agent-id-2 - enrollment_token: enrollment-token-value - settings: - retry_max: 5 - uri: https://fleet-server.example.com:8220 - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - enrollment_token: - type: string - settings: - additionalProperties: false - type: object - properties: - ca_sha256: - type: string - certificate_authorities: - type: string - elastic_agent_cert: - type: string - elastic_agent_cert_key: - type: string - elastic_agent_cert_key_passphrase: - type: string - headers: - additionalProperties: - type: string - type: object - insecure: - type: boolean - proxy_disabled: - type: boolean - proxy_headers: - additionalProperties: - type: string - type: object - proxy_url: - type: string - staging: - type: string - tags: - items: - type: string - maxItems: 10 - type: array - uri: - format: uri - type: string - required: - - agents - - uri - - enrollment_token responses: '200': content: application/json: examples: - postBulkMigrateAgentsExample: - description: Bulk agent migration initiated + agentsSetupSuccessExample: + description: Fleet setup initialized successfully with no non-fatal errors value: - actionId: action-id-1 + isInitialized: true + nonFatalErrors: [] schema: additionalProperties: false + description: A summary of the result of Fleet's `setup` lifecycle. If `isInitialized` is true, Fleet is ready to accept agent enrollment. `nonFatalErrors` may include useful insight into non-blocking issues with Fleet setup. type: object properties: - actionId: - type: string + isInitialized: + type: boolean + nonFatalErrors: + items: + additionalProperties: false + type: object + properties: + message: + type: string + name: + type: string + required: + - name + - message + maxItems: 10000 + type: array required: - - actionId - description: Successful response + - isInitialized + - nonFatalErrors + description: Fleet setup completed '400': content: application/json: @@ -36884,91 +31414,71 @@ paths: - message - attributes description: Bad Request - summary: Migrate multiple agents + summary: Initiate Fleet setup tags: - Elastic Agents x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/bulk_privilege_level_change: - post: + /api/fleet/agents/tags: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_privilege_level_change
+
get /s/{space_id}/api/fleet/agents/tags
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Change multiple agents' privilege level to unprivileged.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-privilege-level-change + Get a list of all tags used across enrolled agents.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-tags parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: A KQL query string to filter results + in: query + name: kuery + required: false schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - bulkChangeAgentPrivilegeLevelRequest: - value: - agents: agent - user_info: - groupname: groupname - password: password - username: username - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - user_info: - additionalProperties: false - type: object - properties: - groupname: - type: string - password: - type: string - username: - type: string - required: - - agents + - description: When true, include tags from inactive agents + in: query + name: showInactive + required: false + schema: + default: false + type: boolean responses: '200': content: application/json: examples: - successResponse: + getAgentTagsExample: + description: List of tags used across agents value: - actionId: actionId + items: + - production + - linux + - datacenter-1 schema: additionalProperties: false type: object properties: - actionId: - type: string + items: + items: + type: string + maxItems: 10000 + type: array required: - - actionId - description: 'OK: A successful request.' + - items + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -36987,82 +31497,59 @@ paths: required: - message - attributes - description: A bad request. - summary: Bulk change agent privilege level + description: Bad Request + summary: Get agent tags tags: - Elastic Agents - x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/bulk_reassign: - post: + /api/fleet/check-permissions: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_reassign
+
get /s/{space_id}/api/fleet/check-permissions
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Reassign multiple agents to a different agent policy.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-reassign + Check whether the current user has the required permissions to use Fleet. Optionally verifies Fleet Server setup privileges. + operationId: get-fleet-check-permissions parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: When true, check Fleet Server setup privileges in addition to standard Fleet privileges + in: query + name: fleetServerSetup + required: false schema: - example: 'true' - type: string - requestBody: - content: - application/json: - examples: - postBulkReassignAgentsRequestExample: - description: Reassign multiple agents to a different policy - value: - agents: - - agent-id-1 - - agent-id-2 - policy_id: agent-policy-id-2 - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - includeInactive: - default: false - type: boolean - policy_id: - type: string - required: - - policy_id - - agents + type: boolean responses: '200': content: application/json: examples: - postBulkReassignAgentsExample: - description: Bulk reassign action result + checkPermissionsMissingPrivilegesExample: + description: The current user is missing Fleet privileges value: - actionId: action-id-1 + error: MISSING_PRIVILEGES + success: false + checkPermissionsSuccessExample: + description: The current user has all required Fleet permissions + value: + success: true schema: additionalProperties: false type: object properties: - actionId: + error: + enum: + - MISSING_SECURITY + - MISSING_PRIVILEGES + - MISSING_FLEET_SERVER_SETUP_PRIVILEGES type: string + success: + type: boolean required: - - actionId + - success description: Successful response '400': content: @@ -37093,76 +31580,106 @@ paths: - message - attributes description: Bad Request - summary: Bulk reassign agents + summary: Check permissions tags: - - Elastic Agent actions + - Fleet internals x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/bulk_remove_collectors: - post: + /api/fleet/cloud_connectors: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_remove_collectors
+
get /s/{space_id}/api/fleet/cloud_connectors
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Remove multiple OpAMP collectors from the Fleet agents list. Marks the collectors as unenrolled. This action does not invalidate API keys, so collectors can reconnect on their own.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-remove-collectors + List all Fleet cloud connectors.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. + operationId: get-fleet-cloud-connectors parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: The page number for pagination. + in: query + name: page + required: false + schema: + type: string + - description: The number of items per page. + in: query + name: perPage + required: false + schema: + type: string + - description: KQL query to filter cloud connectors. + in: query + name: kuery + required: false schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkRemoveCollectorsRequestExample: - description: Remove multiple OpAMP collectors - value: - agents: - - collector-id-1 - - collector-id-2 - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - description: List of collector agent IDs - type: string - maxItems: 10000 - type: array - - description: KQL query string. Leave empty to target all collectors - type: string - includeInactive: - description: When passing collectors by KQL query, also removes inactive collectors - type: boolean - required: - - agents responses: '200': content: application/json: examples: - postBulkRemoveCollectorsExample: - description: Bulk remove collectors action result + getCloudConnectorsExample: + description: List of Fleet cloud connectors value: - actionId: action-id-1 + items: + - accountType: single-account + cloudProvider: aws + created_at: '2024-01-15T10:00:00.000Z' + id: cloud-connector-id-1 + name: My AWS connector + packagePolicyCount: 2 + updated_at: '2024-01-15T10:00:00.000Z' + vars: {} schema: additionalProperties: false type: object properties: - actionId: - type: string + items: + items: + additionalProperties: false + type: object + properties: + accountType: + type: string + cloudProvider: + type: string + created_at: + type: string + id: + type: string + name: + type: string + namespace: + type: string + packagePolicyCount: + type: number + updated_at: + type: string + vars: + additionalProperties: + nullable: true + type: object + verification_failed_at: + type: string + verification_started_at: + type: string + verification_status: + type: string + required: + - id + - name + - cloudProvider + - vars + - packagePolicyCount + - created_at + - updated_at + maxItems: 10000 + type: array required: - - actionId + - items description: Successful response '400': content: @@ -37193,24 +31710,23 @@ paths: - message - attributes description: Bad Request - summary: Bulk remove OpAMP collectors + summary: Get cloud connectors tags: - - Elastic Agent actions + - Fleet cloud connectors x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/bulk_request_diagnostics: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_request_diagnostics
+
post /s/{space_id}/api/fleet/cloud_connectors
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Request diagnostics bundles from multiple agents.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: post-fleet-agents-bulk-request-diagnostics + Create a new Fleet cloud connector.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. + operationId: post-fleet-cloud-connectors parameters: - description: A required header to protect against CSRF attacks in: header @@ -37223,53 +31739,134 @@ paths: content: application/json: examples: - postBulkRequestDiagnosticsRequestExample: - description: Request diagnostics bundles from multiple agents + postCloudConnectorRequestExample: + description: Create a new AWS cloud connector value: - additional_metrics: - - CPU - agents: - - agent-id-1 - - agent-id-2 + accountType: single-account + cloudProvider: aws + name: My AWS connector + vars: {} schema: additionalProperties: false type: object properties: - additional_metrics: - items: - enum: - - CPU - type: string - maxItems: 1 - type: array - agents: - anyOf: - - items: + accountType: + description: 'The account type: single-account (single account/subscription) or organization-account (organization-wide).' + enum: + - single-account + - organization-account + type: string + cloudProvider: + description: 'The cloud provider type: aws, azure, or gcp.' + enum: + - aws + - azure + - gcp + type: string + name: + description: The name of the cloud connector. + maxLength: 255 + minLength: 1 + type: string + vars: + additionalProperties: + anyOf: + - maxLength: 1000 type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number + - type: number + - type: boolean + - additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + maxLength: 50 + type: string + value: + anyOf: + - maxLength: 1000 + type: string + - additionalProperties: false + type: object + properties: + id: + maxLength: 255 + type: string + isSecretRef: + type: boolean + required: + - isSecretRef + - id + required: + - type + - value + type: object required: - - agents + - name + - cloudProvider + - vars responses: '200': content: application/json: examples: - postBulkRequestDiagnosticsExample: - description: Bulk diagnostics action result + postCloudConnectorExample: + description: The created Fleet cloud connector value: - actionId: action-id-1 + item: + accountType: single-account + cloudProvider: aws + created_at: '2024-01-15T10:00:00.000Z' + id: cloud-connector-id-2 + name: My AWS connector + packagePolicyCount: 0 + updated_at: '2024-01-15T10:00:00.000Z' + vars: {} schema: additionalProperties: false type: object properties: - actionId: - type: string + item: + additionalProperties: false + type: object + properties: + accountType: + type: string + cloudProvider: + type: string + created_at: + type: string + id: + type: string + name: + type: string + namespace: + type: string + packagePolicyCount: + type: number + updated_at: + type: string + vars: + additionalProperties: + nullable: true + type: object + verification_failed_at: + type: string + verification_started_at: + type: string + verification_status: + type: string + required: + - id + - name + - cloudProvider + - vars + - packagePolicyCount + - created_at + - updated_at required: - - actionId + - item description: Successful response '400': content: @@ -37300,23 +31897,24 @@ paths: - message - attributes description: Bad Request - summary: Bulk request diagnostics from agents + summary: Create cloud connector tags: - - Elastic Agent actions + - Fleet cloud connectors + x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/bulk_rollback: - post: + /api/fleet/cloud_connectors/{cloudConnectorId}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_rollback
+
delete /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Rollback multiple agents to the previous version.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-rollback + Delete a cloud connector by ID. Use the `force` query parameter to delete even if package policies are still using it.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. + operationId: delete-fleet-cloud-connectors-cloudconnectorid parameters: - description: A required header to protect against CSRF attacks in: header @@ -37325,64 +31923,46 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - bulkRollbackAgentsRequest: - value: - agents: - - agent-1 - - agent-2 - batchSize: 100 - includeInactive: false - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - includeInactive: - default: false - type: boolean - required: - - agents + - description: The unique identifier of the cloud connector to delete. + in: path + name: cloudConnectorId + required: true + schema: + type: string + - description: If true, forces deletion even if the cloud connector is in use. + in: query + name: force + required: false + schema: + type: boolean responses: '200': content: application/json: examples: - successResponse: + deleteCloudConnectorExample: + description: The cloud connector was successfully deleted value: - actionIds: - - actionId1 - - actionId2 + id: cloud-connector-id-1 schema: additionalProperties: false type: object properties: - actionIds: - items: - type: string - maxItems: 10000 - type: array + id: + type: string required: - - actionIds - description: 'OK: A successful request.' + - id + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -37401,87 +31981,92 @@ paths: required: - message - attributes - description: A bad request. - summary: Bulk rollback agents + description: Bad Request + summary: Delete cloud connector (supports force deletion) tags: - - Elastic Agent actions + - Fleet cloud connectors x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/bulk_unenroll: - post: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_unenroll
+
get /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Unenroll multiple agents, optionally revoking their enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-unenroll + Get a cloud connector by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. + operationId: get-fleet-cloud-connectors-cloudconnectorid parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: The unique identifier of the cloud connector. + in: path + name: cloudConnectorId required: true schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkUnenrollAgentsRequestExample: - description: Unenroll multiple agents - value: - agents: - - agent-id-1 - - agent-id-2 - revoke: false - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - description: list of agent IDs - type: string - maxItems: 10000 - type: array - - description: KQL query string, leave empty to action all agents - type: string - batchSize: - type: number - force: - description: Unenrolls hosted agents too - type: boolean - includeInactive: - description: When passing agents by KQL query, unenrolls inactive agents too - type: boolean - revoke: - description: Revokes API keys of agents - type: boolean - required: - - agents responses: '200': content: application/json: examples: - postBulkUnenrollAgentsExample: - description: Bulk unenroll action result + getCloudConnectorExample: + description: A Fleet cloud connector value: - actionId: action-id-1 + item: + accountType: single-account + cloudProvider: aws + created_at: '2024-01-15T10:00:00.000Z' + id: cloud-connector-id-1 + name: My AWS connector + packagePolicyCount: 2 + updated_at: '2024-01-15T10:00:00.000Z' + vars: {} schema: additionalProperties: false type: object properties: - actionId: - type: string + item: + additionalProperties: false + type: object + properties: + accountType: + type: string + cloudProvider: + type: string + created_at: + type: string + id: + type: string + name: + type: string + namespace: + type: string + packagePolicyCount: + type: number + updated_at: + type: string + vars: + additionalProperties: + nullable: true + type: object + verification_failed_at: + type: string + verification_started_at: + type: string + verification_status: + type: string + required: + - id + - name + - cloudProvider + - vars + - packagePolicyCount + - created_at + - updated_at required: - - actionId + - item description: Successful response '400': content: @@ -37512,23 +32097,23 @@ paths: - message - attributes description: Bad Request - summary: Bulk unenroll agents + summary: Get cloud connector tags: - - Elastic Agent actions + - Fleet cloud connectors + x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/bulk_update_agent_tags: - post: + put: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_update_agent_tags
+
put /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Add or remove tags across multiple agents.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-update-agent-tags + Update a cloud connector by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. + operationId: put-fleet-cloud-connectors-cloudconnectorid parameters: - description: A required header to protect against CSRF attacks in: header @@ -37537,69 +32122,135 @@ paths: schema: example: 'true' type: string + - description: The unique identifier of the cloud connector to update. + in: path + name: cloudConnectorId + required: true + schema: + type: string requestBody: content: application/json: examples: - postBulkUpdateAgentTagsRequestExample: - description: Add and remove tags across multiple agents + putCloudConnectorRequestExample: + description: Update a Fleet cloud connector value: - agents: - - agent-id-1 - - agent-id-2 - tagsToAdd: - - production - tagsToRemove: - - staging + name: Updated AWS connector + vars: {} schema: additionalProperties: false type: object properties: - agents: - anyOf: - - items: + accountType: + description: 'The account type: single-account (single account/subscription) or organization-account (organization-wide).' + enum: + - single-account + - organization-account + type: string + name: + description: The name of the cloud connector. + maxLength: 255 + minLength: 1 + type: string + vars: + additionalProperties: + anyOf: + - maxLength: 1000 type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - includeInactive: - default: false - type: boolean - tagsToAdd: - items: - type: string - maxItems: 10 - type: array - tagsToRemove: - items: - type: string - maxItems: 10 - type: array - required: - - agents + - type: number + - type: boolean + - additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + maxLength: 50 + type: string + value: + anyOf: + - maxLength: 1000 + type: string + - additionalProperties: false + type: object + properties: + id: + maxLength: 255 + type: string + isSecretRef: + type: boolean + required: + - isSecretRef + - id + required: + - type + - value + type: object responses: '200': content: application/json: examples: - postBulkUpdateAgentTagsExample: - description: Bulk action result + putCloudConnectorExample: + description: The updated Fleet cloud connector value: - actionId: action-id-1 + item: + accountType: single-account + cloudProvider: aws + created_at: '2024-01-15T10:00:00.000Z' + id: cloud-connector-id-1 + name: Updated AWS connector + packagePolicyCount: 2 + updated_at: '2024-01-15T11:00:00.000Z' + vars: {} schema: additionalProperties: false type: object properties: - actionId: - type: string - required: - - actionId - description: Successful response - '400': - content: - application/json: + item: + additionalProperties: false + type: object + properties: + accountType: + type: string + cloudProvider: + type: string + created_at: + type: string + id: + type: string + name: + type: string + namespace: + type: string + packagePolicyCount: + type: number + updated_at: + type: string + vars: + additionalProperties: + nullable: true + type: object + verification_failed_at: + type: string + verification_started_at: + type: string + verification_status: + type: string + required: + - id + - name + - cloudProvider + - vars + - packagePolicyCount + - created_at + - updated_at + required: + - item + description: Successful response + '400': + content: + application/json: examples: genericErrorResponseExample: description: Example of a generic error response @@ -37626,93 +32277,124 @@ paths: - message - attributes description: Bad Request - summary: Bulk update agent tags + summary: Update cloud connector tags: - - Elastic Agent actions + - Fleet cloud connectors + x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/bulk_upgrade: - post: + /api/fleet/cloud_connectors/{cloudConnectorId}/usage: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_upgrade
+
get /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}/usage
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Upgrade multiple agents to a newer version, with optional rollout controls.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-upgrade + Get a list of package policies that are using a given cloud connector.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. + operationId: get-fleet-cloud-connectors-cloudconnectorid-usage parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: The unique identifier of the cloud connector. + in: path + name: cloudConnectorId required: true schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkUpgradeAgentsRequestExample: - description: Upgrade multiple agents to a specific version - value: - agents: - - agent-id-1 - - agent-id-2 - rollout_duration_seconds: 3600 - version: 8.17.0 - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - force: - type: boolean - includeInactive: - default: false - type: boolean - rollout_duration_seconds: - minimum: 600 - type: number - skipRateLimitCheck: - type: boolean - source_uri: - type: string - start_time: - type: string - version: - type: string - required: - - agents - - version + - description: The page number for pagination. + in: query + name: page + required: false + schema: + minimum: 1 + type: number + - description: The number of items per page. + in: query + name: perPage + required: false + schema: + minimum: 1 + type: number responses: '200': content: application/json: examples: - postBulkUpgradeAgentsExample: - description: Bulk upgrade action result + getCloudConnectorUsageResponseExample: + description: Example response showing package policies using the cloud connector value: - actionId: action-id-1 + items: + - created_at: '2025-01-16T09:00:00.000Z' + id: package-policy-1 + name: CSPM AWS Policy + package: + name: cloud_security_posture + title: Cloud Security Posture Management + version: 3.1.1 + policy_ids: + - policy-id-123 + - policy-id-456 + updated_at: '2025-01-16T09:00:00.000Z' + page: 1 + perPage: 20 + total: 2 schema: additionalProperties: false type: object properties: - actionId: - type: string + items: + items: + additionalProperties: false + type: object + properties: + created_at: + type: string + id: + type: string + name: + type: string + package: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + version: + type: string + required: + - name + - title + - version + policy_ids: + items: + type: string + maxItems: 10000 + type: array + updated_at: + type: string + required: + - id + - name + - policy_ids + - created_at + - updated_at + maxItems: 10000 + type: array + page: + type: number + perPage: + type: number + total: + type: number required: - - actionId - description: Successful response + - items + - total + - page + - perPage + description: 'OK: A successful request.' '400': content: application/json: @@ -37721,7 +32403,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: An error message describing what went wrong + message: Cloud connector not found statusCode: 400 schema: additionalProperties: false @@ -37741,59 +32423,130 @@ paths: required: - message - attributes - description: Bad Request - summary: Bulk upgrade agents + description: A bad request. + summary: Get cloud connector usage (package policies using the connector) tags: - - Elastic Agent actions + - Fleet cloud connectors + x-state: Experimental x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/files/{fileId}: - delete: + /api/fleet/data_streams: + get: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/agents/files/{fileId}
+
get /s/{space_id}/api/fleet/data_streams
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete a file uploaded by an agent.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: delete-fleet-agents-files-fileid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the uploaded file - in: path - name: fileId - required: true - schema: - type: string + List all Fleet-managed data streams with metadata including package, namespace, size, and last activity.

[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all. + operationId: get-fleet-data-streams + parameters: [] responses: '200': content: application/json: examples: - deleteAgentUploadFileExample: - description: Uploaded file successfully deleted + getDataStreamsExample: + description: List of Fleet-managed data streams value: - deleted: true - id: file-id-1 + data_streams: + - dashboards: + - id: nginx-overview + title: Nginx Overview + dataset: nginx.access + index: logs-nginx.access-default + last_activity_ms: 1700000000000 + namespace: default + package: nginx + package_version: 1.20.0 + serviceDetails: null + size_in_bytes: 1048576 + size_in_bytes_formatted: 1mb + type: logs + - dashboards: [] + dataset: system.cpu + index: metrics-system.cpu-default + last_activity_ms: 1699999000000 + namespace: default + package: system + package_version: 1.38.0 + serviceDetails: null + size_in_bytes: 524288 + size_in_bytes_formatted: 512kb + type: metrics schema: additionalProperties: false type: object properties: - deleted: - type: boolean - id: - type: string + data_streams: + items: + additionalProperties: false + type: object + properties: + dashboards: + items: + additionalProperties: false + type: object + properties: + id: + type: string + title: + type: string + required: + - id + - title + maxItems: 10000 + type: array + dataset: + type: string + index: + type: string + last_activity_ms: + type: number + namespace: + type: string + package: + type: string + package_version: + type: string + serviceDetails: + additionalProperties: false + nullable: true + type: object + properties: + environment: + type: string + serviceName: + type: string + required: + - environment + - serviceName + size_in_bytes: + type: number + size_in_bytes_formatted: + anyOf: + - type: number + - type: string + type: + type: string + required: + - index + - dataset + - namespace + - type + - package + - package_version + - last_activity_ms + - size_in_bytes + - size_in_bytes_formatted + - dashboards + - serviceDetails + maxItems: 10000 + type: array required: - - id - - deleted + - data_streams description: Successful response '400': content: @@ -37824,34 +32577,42 @@ paths: - message - attributes description: Bad Request - summary: Delete an uploaded file + summary: Get data streams tags: - - Elastic Agents + - Data streams x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/files/{fileId}/{fileName}: + /api/fleet/enrollment_api_keys: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/files/{fileId}/{fileName}
+
get /s/{space_id}/api/fleet/enrollment_api_keys
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a file uploaded by an agent.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-files-fileid-filename + List all enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup. + operationId: get-fleet-enrollment-api-keys parameters: - - description: The ID of the uploaded file - in: path - name: fileId - required: true + - description: Page number + in: query + name: page + required: false schema: - type: string - - description: The name of the uploaded file - in: path - name: fileName - required: true + default: 1 + type: number + - description: Number of results per page + in: query + name: perPage + required: false + schema: + default: 20 + type: number + - description: A KQL query string to filter results + in: query + name: kuery + required: false schema: type: string responses: @@ -37859,12 +32620,56 @@ paths: content: application/json: examples: - getAgentUploadFileExample: - description: The uploaded file content as a stream - value: + getEnrollmentApiKeysExample: + description: List of enrollment API keys + value: + items: + - active: true + api_key: api-key-value-1 + api_key_id: api-key-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: key-id-1 + name: Default policy enrollment key + policy_id: policy-id-1 + list: + - active: true + api_key: api-key-value-1 + api_key_id: api-key-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: key-id-1 + name: Default policy enrollment key + policy_id: policy-id-1 + page: 1 + perPage: 20 + total: 1 schema: + additionalProperties: false type: object - description: Successful response — returns the uploaded file content + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key' + maxItems: 10000 + type: array + list: + deprecated: true + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key' + maxItems: 10000 + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - total + - page + - perPage + - list + description: Successful response '400': content: application/json: @@ -37894,93 +32699,149 @@ paths: - message - attributes description: Bad Request - summary: Get an uploaded file + summary: Get enrollment API keys tags: - - Elastic Agents + - Fleet enrollment API keys x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/setup: - get: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/setup
+
post /s/{space_id}/api/fleet/enrollment_api_keys
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the current Fleet setup status, including whether Fleet is ready to enroll agents and which requirements or optional features are missing.

[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup. - operationId: get-fleet-agents-setup - parameters: [] + Create an enrollment API key for a given agent policy.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-enrollment-api-keys + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + requestBody: + content: + application/json: + examples: + postEnrollmentApiKeyRequestExample: + description: Create an enrollment API key for an agent policy + value: + expiration: '2025-01-01T00:00:00.000Z' + name: My enrollment key + policy_id: policy-id-1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_new_enrollment_api_key' responses: '200': content: application/json: examples: - agentsSetupNotReadyExample: - description: Fleet is not ready — a Fleet Server and API keys are required + postEnrollmentApiKeyExample: + description: The created enrollment API key value: - is_action_secrets_storage_enabled: false - is_secrets_storage_enabled: false - is_space_awareness_enabled: false - is_ssl_secrets_storage_enabled: false - isReady: false - missing_optional_features: - - encrypted_saved_object_encryption_key_required - missing_requirements: - - fleet_server - - api_keys - agentsSetupReadyExample: - description: Fleet is ready to enroll agents — all requirements are met + action: created + item: + active: true + api_key: api-key-value-1 + api_key_id: api-key-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: key-id-1 + name: My enrollment key + policy_id: policy-id-1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response value: - is_action_secrets_storage_enabled: true - is_secrets_storage_enabled: true - is_space_awareness_enabled: false - is_ssl_secrets_storage_enabled: false - isReady: true - missing_optional_features: [] - missing_requirements: [] - package_verification_key_id: D88DB4CC + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false - description: A summary of the agent setup status. `isReady` indicates whether the setup is ready. If the setup is not ready, `missing_requirements` lists which requirements are missing. + description: Generic Error type: object properties: - is_action_secrets_storage_enabled: - type: boolean - is_secrets_storage_enabled: - type: boolean - is_space_awareness_enabled: - type: boolean - is_ssl_secrets_storage_enabled: - type: boolean - isReady: - type: boolean - missing_optional_features: - items: - enum: - - encrypted_saved_object_encryption_key_required - type: string - maxItems: 1 - type: array - missing_requirements: - items: - enum: - - security_required - - tls_required - - api_keys - - fleet_admin_user - - fleet_server - type: string - maxItems: 5 - type: array - package_verification_key_id: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: type: string + statusCode: + type: number required: - - isReady - - missing_requirements - - missing_optional_features - description: Fleet setup status + - message + - attributes + description: Bad Request + summary: Create an enrollment API key + tags: + - Fleet enrollment API keys + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/enrollment_api_keys/_bulk_delete: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/enrollment_api_keys/_bulk_delete
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Revoke or delete multiple enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-enrollment-api-keys-bulk-delete + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + requestBody: + content: + application/json: + examples: + bulkDeleteByIdsExample: + description: Bulk delete enrollment API keys by IDs + value: + forceDelete: true + tokenIds: + - token-id-1 + - token-id-2 + bulkDeleteByKueryExample: + description: Bulk delete enrollment API keys by KQL query + value: + forceDelete: false + kuery: policy_id:"policy-id-1" + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_delete_enrollment_api_keys_request' + responses: + '200': + content: + application/json: + examples: + bulkDeleteEnrollmentApiKeysExample: + description: The enrollment API keys were successfully processed + value: + action: deleted + count: 2 + errorCount: 0 + successCount: 2 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_delete_enrollment_api_keys_response' + description: Successful response '400': content: application/json: @@ -37989,7 +32850,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: An error message describing what went wrong + message: Either tokenIds or kuery must be provided statusCode: 400 schema: additionalProperties: false @@ -38010,22 +32871,24 @@ paths: - message - attributes description: Bad Request - summary: Get agent setup info + summary: Bulk revoke or delete enrollment API keys tags: - - Elastic Agents + - Fleet enrollment API keys + x-state: Generally available x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - post: + /api/fleet/enrollment_api_keys/{keyId}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/setup
+
delete /s/{space_id}/api/fleet/enrollment_api_keys/{keyId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Initialize Fleet. This endpoint is used by Elastic Agents to trigger Fleet setup. Safe to call multiple times; subsequent calls are idempotent.

[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup. - operationId: post-fleet-agents-setup + Revoke or delete an enrollment API key by ID. Use `forceDelete=true` to remove the document.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: delete-fleet-enrollment-api-keys-keyid parameters: - description: A required header to protect against CSRF attacks in: header @@ -38034,41 +32897,38 @@ paths: schema: example: 'true' type: string + - description: The ID of the enrollment API key + in: path + name: keyId + required: true + schema: + type: string + - description: When false (default), invalidate the API key and mark the token as inactive. When true, also delete the token document. + in: query + name: forceDelete + required: false + schema: + default: false + type: boolean + - description: When true, allow deletion of hidden enrollment tokens (managed/agentless policies). Defaults to false. + in: query + name: includeHidden + required: false + schema: + default: false + type: boolean responses: '200': content: application/json: examples: - agentsSetupSuccessExample: - description: Fleet setup initialized successfully with no non-fatal errors + deleteEnrollmentApiKeyExample: + description: The enrollment API key was successfully revoked value: - isInitialized: true - nonFatalErrors: [] + action: deleted schema: - additionalProperties: false - description: A summary of the result of Fleet's `setup` lifecycle. If `isInitialized` is true, Fleet is ready to accept agent enrollment. `nonFatalErrors` may include useful insight into non-blocking issues with Fleet setup. - type: object - properties: - isInitialized: - type: boolean - nonFatalErrors: - items: - additionalProperties: false - type: object - properties: - message: - type: string - name: - type: string - required: - - name - - message - maxItems: 10000 - type: array - required: - - isInitialized - - nonFatalErrors - description: Fleet setup completed + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_enrollment_api_key_response' + description: Successful response '400': content: application/json: @@ -38098,60 +32958,58 @@ paths: - message - attributes description: Bad Request - summary: Initiate Fleet setup + '404': + content: + application/json: + examples: + notFoundExample: + description: No enrollment API key was found with the given ID + value: + error: Not Found + message: EnrollmentAPIKey key-id-1 not found + statusCode: 404 + description: Not Found + summary: Revoke or delete an enrollment API key tags: - - Elastic Agents + - Fleet enrollment API keys x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/agents/tags: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/tags
+
get /s/{space_id}/api/fleet/enrollment_api_keys/{keyId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of all tags used across enrolled agents.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-tags + Get an enrollment API key by ID.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup. + operationId: get-fleet-enrollment-api-keys-keyid parameters: - - description: A KQL query string to filter results - in: query - name: kuery - required: false + - description: The ID of the enrollment API key + in: path + name: keyId + required: true schema: type: string - - description: When true, include tags from inactive agents - in: query - name: showInactive - required: false - schema: - default: false - type: boolean responses: '200': content: application/json: examples: - getAgentTagsExample: - description: List of tags used across agents + getEnrollmentApiKeyExample: + description: An enrollment API key value: - items: - - production - - linux - - datacenter-1 + item: + active: true + api_key: api-key-value-1 + api_key_id: api-key-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: key-id-1 + name: Default policy enrollment key + policy_id: policy-id-1 schema: - additionalProperties: false - type: object - properties: - items: - items: - type: string - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key_response' description: Successful response '400': content: @@ -38182,58 +33040,72 @@ paths: - message - attributes description: Bad Request - summary: Get agent tags + '404': + content: + application/json: + examples: + notFoundExample: + description: No enrollment API key was found with the given ID + value: + error: Not Found + message: EnrollmentAPIKey key-id-1 not found + statusCode: 404 + description: Not Found + summary: Get an enrollment API key tags: - - Elastic Agents + - Fleet enrollment API keys x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/check-permissions: - get: + /api/fleet/epm/bulk_assets: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/check-permissions
+
post /s/{space_id}/api/fleet/epm/bulk_assets
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Check whether the current user has the required permissions to use Fleet. Optionally verifies Fleet Server setup privileges. - operationId: get-fleet-check-permissions + Retrieve multiple Kibana saved object assets by their IDs and types.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: post-fleet-epm-bulk-assets parameters: - - description: When true, check Fleet Server setup privileges in addition to standard Fleet privileges - in: query - name: fleetServerSetup - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: - type: boolean + example: 'true' + type: string + requestBody: + content: + application/json: + examples: + postBulkGetAssetsRequestExample: + description: Retrieve multiple assets by their IDs and types + value: + assetIds: + - id: dashboard-id-1 + type: dashboard + - id: index-pattern-id-1 + type: index_pattern + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_bulk_assets_request' responses: '200': content: application/json: examples: - checkPermissionsMissingPrivilegesExample: - description: The current user is missing Fleet privileges - value: - error: MISSING_PRIVILEGES - success: false - checkPermissionsSuccessExample: - description: The current user has all required Fleet permissions + postBulkGetAssetsExample: + description: Requested assets value: - success: true + items: + - appLink: /app/dashboards#/view/dashboard-id-1 + attributes: + title: My Dashboard + id: dashboard-id-1 + type: dashboard schema: - additionalProperties: false - type: object - properties: - error: - enum: - - MISSING_SECURITY - - MISSING_PRIVILEGES - - MISSING_FLEET_SERVER_SETUP_PRIVILEGES - type: string - success: - type: boolean - required: - - success + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_bulk_assets_response' description: Successful response '400': content: @@ -38264,106 +33136,53 @@ paths: - message - attributes description: Bad Request - summary: Check permissions + summary: Bulk get assets tags: - - Fleet internals + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/cloud_connectors: + /api/fleet/epm/categories: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/cloud_connectors
+
get /s/{space_id}/api/fleet/epm/categories
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - List all Fleet cloud connectors.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. - operationId: get-fleet-cloud-connectors + Get a list of integration categories.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-categories parameters: - - description: The page number for pagination. - in: query - name: page - required: false - schema: - type: string - - description: The number of items per page. + - description: When true, include prerelease packages in the results in: query - name: perPage + name: prerelease required: false schema: - type: string - - description: KQL query to filter cloud connectors. + type: boolean + - description: When true, include categories that only contain policy templates in: query - name: kuery + name: include_policy_templates required: false schema: - type: string + type: boolean responses: '200': content: application/json: examples: - getCloudConnectorsExample: - description: List of Fleet cloud connectors + getCategoriesExample: + description: List of integration categories value: items: - - accountType: single-account - cloudProvider: aws - created_at: '2024-01-15T10:00:00.000Z' - id: cloud-connector-id-1 - name: My AWS connector - packagePolicyCount: 2 - updated_at: '2024-01-15T10:00:00.000Z' - vars: {} + - count: 42 + id: security + title: Security + - count: 38 + id: observability + title: Observability schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - accountType: - type: string - cloudProvider: - type: string - created_at: - type: string - id: - type: string - name: - type: string - namespace: - type: string - packagePolicyCount: - type: number - updated_at: - type: string - vars: - additionalProperties: - nullable: true - type: object - verification_failed_at: - type: string - verification_started_at: - type: string - verification_status: - type: string - required: - - id - - name - - cloudProvider - - vars - - packagePolicyCount - - created_at - - updated_at - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_categories_response' description: Successful response '400': content: @@ -38394,23 +33213,23 @@ paths: - message - attributes description: Bad Request - summary: Get cloud connectors + summary: Get package categories tags: - - Fleet cloud connectors - x-state: Experimental + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name + /api/fleet/epm/custom_integrations: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/cloud_connectors
+
post /s/{space_id}/api/fleet/epm/custom_integrations
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create a new Fleet cloud connector.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. - operationId: post-fleet-cloud-connectors + Create a new custom integration package with user-defined data streams.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-custom-integrations parameters: - description: A required header to protect against CSRF attacks in: header @@ -38423,134 +33242,123 @@ paths: content: application/json: examples: - postCloudConnectorRequestExample: - description: Create a new AWS cloud connector + postCreateCustomIntegrationRequestExample: + description: Create a new custom integration value: - accountType: single-account - cloudProvider: aws - name: My AWS connector - vars: {} + datasets: + - name: my_custom_logs.access + type: logs + integrationName: my_custom_logs schema: - additionalProperties: false - type: object - properties: - accountType: - description: 'The account type: single-account (single account/subscription) or organization-account (organization-wide).' - enum: - - single-account - - organization-account - type: string - cloudProvider: - description: 'The cloud provider type: aws, azure, or gcp.' - enum: - - aws - - azure - - gcp - type: string - name: - description: The name of the cloud connector. - maxLength: 255 - minLength: 1 - type: string - vars: - additionalProperties: - anyOf: - - maxLength: 1000 - type: string - - type: number - - type: boolean - - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - maxLength: 50 - type: string - value: - anyOf: - - maxLength: 1000 - type: string - - additionalProperties: false - type: object - properties: - id: - maxLength: 255 - type: string - isSecretRef: - type: boolean - required: - - isSecretRef - - id - required: - - type - - value - type: object - required: - - name - - cloudProvider - - vars + $ref: '#/components/schemas/Kibana_HTTP_APIs_create_custom_integration_request' responses: '200': content: application/json: examples: - postCloudConnectorExample: - description: The created Fleet cloud connector + postCreateCustomIntegrationExample: + description: Custom integration successfully created value: - item: - accountType: single-account - cloudProvider: aws - created_at: '2024-01-15T10:00:00.000Z' - id: cloud-connector-id-2 - name: My AWS connector - packagePolicyCount: 0 - updated_at: '2024-01-15T10:00:00.000Z' - vars: {} + _meta: + install_source: custom + items: + - id: my_custom_logs-logs-my_custom_logs.access + type: index_template + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false + description: Generic Error type: object properties: - item: - additionalProperties: false - type: object - properties: - accountType: - type: string - cloudProvider: - type: string - created_at: - type: string - id: - type: string - name: - type: string - namespace: - type: string - packagePolicyCount: - type: number - updated_at: - type: string - vars: - additionalProperties: - nullable: true - type: object - verification_failed_at: - type: string - verification_started_at: - type: string - verification_status: - type: string - required: - - id - - name - - cloudProvider - - vars - - packagePolicyCount - - created_at - - updated_at + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number required: - - item + - message + - attributes + description: Bad Request + summary: Create a custom integration + tags: + - Elastic Package Manager (EPM) + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/epm/custom_integrations/{pkgName}: + put: + description: |- + **Spaces method and path for this operation:** + +
put /s/{space_id}/api/fleet/epm/custom_integrations/{pkgName}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Update the datasets of an existing custom integration package.

[Required authorization] Route required privileges: fleet-settings-all AND integrations-all. + operationId: put-fleet-epm-custom-integrations-pkgname + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + putUpdateCustomIntegrationRequestExample: + description: Update a custom integration + value: + datasets: + - name: my_custom_logs.access + type: logs + integrationName: my_custom_logs + schema: + additionalProperties: false + type: object + properties: + categories: + items: + type: string + maxItems: 10 + type: array + readMeData: + type: string + required: + - readMeData + responses: + '200': + content: + application/json: + examples: + putUpdateCustomIntegrationExample: + description: Custom integration successfully updated + value: {} description: Successful response '400': content: @@ -38581,61 +33389,76 @@ paths: - message - attributes description: Bad Request - summary: Create cloud connector + summary: Update a custom integration tags: - - Fleet cloud connectors - x-state: Experimental + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/cloud_connectors/{cloudConnectorId}: - delete: + /api/fleet/epm/data_streams: + get: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
+
get /s/{space_id}/api/fleet/epm/data_streams
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete a cloud connector by ID. Use the `force` query parameter to delete even if package policies are still using it.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. - operationId: delete-fleet-cloud-connectors-cloudconnectorid + Get a list of data streams created by installed integration packages.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-data-streams parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: Filter by data stream type + in: query + name: type + required: false schema: - example: 'true' + enum: + - logs + - metrics + - traces + - synthetics + - profiling type: string - - description: The unique identifier of the cloud connector to delete. - in: path - name: cloudConnectorId - required: true + - description: Filter data streams by dataset name + in: query + name: datasetQuery + required: false schema: type: string - - description: If true, forces deletion even if the cloud connector is in use. + - description: Sort order, ascending or descending in: query - name: force + name: sortOrder + required: false + schema: + default: asc + enum: + - asc + - desc + type: string + - description: When true, only return data streams that are not associated with a package + in: query + name: uncategorisedOnly required: false schema: + default: false type: boolean responses: '200': content: application/json: examples: - deleteCloudConnectorExample: - description: The cloud connector was successfully deleted + getDataStreamsExample: + description: List of data streams from installed packages value: - id: cloud-connector-id-1 + data_streams: + - ilm_policy: logs-default + index_template: logs-system.syslog + name: logs-system.syslog-default + package: system + package_version: 1.55.0 + title: System syslog logs schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_data_streams_response' description: Successful response '400': content: @@ -38666,91 +33489,69 @@ paths: - message - attributes description: Bad Request - summary: Delete cloud connector (supports force deletion) + summary: Get data streams tags: - - Fleet cloud connectors - x-state: Experimental + - Data streams x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name + /api/fleet/epm/packages: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
+
get /s/{space_id}/api/fleet/epm/packages
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a cloud connector by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. - operationId: get-fleet-cloud-connectors-cloudconnectorid + Get a list of integration packages available in the registry.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages parameters: - - description: The unique identifier of the cloud connector. - in: path - name: cloudConnectorId - required: true + - description: Filter packages by category + in: query + name: category + required: false schema: type: string + - description: When true, include prerelease packages in the results + in: query + name: prerelease + required: false + schema: + type: boolean + - description: When true, exclude the install status from the response + in: query + name: excludeInstallStatus + required: false + schema: + type: boolean + - description: When true, include the number of package policies per package + in: query + name: withPackagePoliciesCount + required: false + schema: + type: boolean responses: '200': content: application/json: examples: - getCloudConnectorExample: - description: A Fleet cloud connector + getPackagesExample: + description: List of available integration packages value: - item: - accountType: single-account - cloudProvider: aws - created_at: '2024-01-15T10:00:00.000Z' - id: cloud-connector-id-1 - name: My AWS connector - packagePolicyCount: 2 - updated_at: '2024-01-15T10:00:00.000Z' - vars: {} + items: + - categories: + - cloud + description: Collect logs and metrics from Amazon Web Services + id: aws + name: aws + status: not_installed + title: AWS + version: 2.10.0 + searchExcluded: 0 + total: 1 schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - accountType: - type: string - cloudProvider: - type: string - created_at: - type: string - id: - type: string - name: - type: string - namespace: - type: string - packagePolicyCount: - type: number - updated_at: - type: string - vars: - additionalProperties: - nullable: true - type: object - verification_failed_at: - type: string - verification_started_at: - type: string - verification_status: - type: string - required: - - id - - name - - cloudProvider - - vars - - packagePolicyCount - - created_at - - updated_at - required: - - item + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_packages_response' description: Successful response '400': content: @@ -38781,23 +33582,22 @@ paths: - message - attributes description: Bad Request - summary: Get cloud connector + summary: Get packages tags: - - Fleet cloud connectors - x-state: Experimental + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - put: + post: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
+
post /s/{space_id}/api/fleet/epm/packages
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update a cloud connector by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. - operationId: put-fleet-cloud-connectors-cloudconnectorid + Install a package by uploading a .zip or .tar.gz archive (max 100MB). Only available to superusers.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages parameters: - description: A required header to protect against CSRF attacks in: header @@ -38806,135 +33606,64 @@ paths: schema: example: 'true' type: string - - description: The unique identifier of the cloud connector to update. - in: path - name: cloudConnectorId - required: true + - description: When true, ignore mapping update errors during installation + in: query + name: ignoreMappingUpdateErrors + required: false schema: - type: string + default: false + type: boolean + - description: When true, skip data stream rollover after installation + in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean requestBody: content: - application/json: + application/gzip: examples: - putCloudConnectorRequestExample: - description: Update a Fleet cloud connector - value: - name: Updated AWS connector - vars: {} + postInstallByUploadRequestExample: + description: Upload a .zip or .tar.gz package archive (max 100MB) + value: + application/gzip; application/zip: + examples: + postInstallByUploadRequestExample: + description: Upload a .zip or .tar.gz package archive (max 100MB) + value: schema: - additionalProperties: false - type: object - properties: - accountType: - description: 'The account type: single-account (single account/subscription) or organization-account (organization-wide).' - enum: - - single-account - - organization-account - type: string - name: - description: The name of the cloud connector. - maxLength: 255 - minLength: 1 - type: string - vars: - additionalProperties: - anyOf: - - maxLength: 1000 - type: string - - type: number - - type: boolean - - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - maxLength: 50 - type: string - value: - anyOf: - - maxLength: 1000 - type: string - - additionalProperties: false - type: object - properties: - id: - maxLength: 255 - type: string - isSecretRef: - type: boolean - required: - - isSecretRef - - id - required: - - type - - value - type: object + format: binary + type: string responses: '200': content: - application/json: + application/gzip; application/zip: examples: - putCloudConnectorExample: - description: The updated Fleet cloud connector + postInstallByUploadExample: + description: Package successfully installed from upload value: - item: - accountType: single-account - cloudProvider: aws - created_at: '2024-01-15T10:00:00.000Z' - id: cloud-connector-id-1 - name: Updated AWS connector - packagePolicyCount: 2 - updated_at: '2024-01-15T11:00:00.000Z' - vars: {} + _meta: + install_source: upload + items: + - id: my-custom-package-logs-default + type: index_template schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - accountType: - type: string - cloudProvider: - type: string - created_at: - type: string - id: - type: string - name: - type: string - namespace: - type: string - packagePolicyCount: - type: number - updated_at: - type: string - vars: - additionalProperties: - nullable: true - type: object - verification_failed_at: - type: string - verification_started_at: - type: string - verification_status: - type: string - required: - - id - - name - - cloudProvider - - vars - - packagePolicyCount - - created_at - - updated_at - required: - - item + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_response' + application/json: + examples: + postInstallByUploadExample: + description: Package successfully installed from upload + value: + _meta: + install_source: upload + items: + - id: my-custom-package-logs-default + type: index_template description: Successful response '400': content: - application/json: + application/gzip; application/zip: examples: genericErrorResponseExample: description: Example of a generic error response @@ -38960,125 +33689,78 @@ paths: required: - message - attributes + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 description: Bad Request - summary: Update cloud connector + summary: Install a package by upload tags: - - Fleet cloud connectors - x-state: Experimental + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/cloud_connectors/{cloudConnectorId}/usage: - get: + /api/fleet/epm/packages/_bulk: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}/usage
+
post /s/{space_id}/api/fleet/epm/packages/_bulk
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of package policies that are using a given cloud connector.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. - operationId: get-fleet-cloud-connectors-cloudconnectorid-usage + Install multiple packages from the Elastic Package Registry in a single request.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk parameters: - - description: The unique identifier of the cloud connector. - in: path - name: cloudConnectorId + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf required: true schema: + example: 'true' type: string - - description: The page number for pagination. - in: query - name: page - required: false - schema: - minimum: 1 - type: number - - description: The number of items per page. + - description: When true, allow installing prerelease versions in: query - name: perPage + name: prerelease required: false schema: - minimum: 1 - type: number - responses: - '200': - content: - application/json: - examples: - getCloudConnectorUsageResponseExample: - description: Example response showing package policies using the cloud connector - value: - items: - - created_at: '2025-01-16T09:00:00.000Z' - id: package-policy-1 - name: CSPM AWS Policy - package: - name: cloud_security_posture - title: Cloud Security Posture Management - version: 3.1.1 - policy_ids: - - policy-id-123 - - policy-id-456 - updated_at: '2025-01-16T09:00:00.000Z' - page: 1 - perPage: 20 - total: 2 - schema: - additionalProperties: false - type: object - properties: - items: + type: boolean + requestBody: + content: + application/json: + examples: + postBulkInstallPackagesRequestExample: + description: Install multiple packages from the registry + value: + packages: + - system + - aws + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_install_packages_from_registry_request' + responses: + '200': + content: + application/json: + examples: + postBulkInstallPackagesExample: + description: Bulk install results + value: items: - additionalProperties: false - type: object - properties: - created_at: - type: string - id: - type: string - name: - type: string - package: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version: - type: string - required: - - name - - title - - version - policy_ids: - items: - type: string - maxItems: 10000 - type: array - updated_at: - type: string - required: - - id - - name - - policy_ids - - created_at - - updated_at - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage - description: 'OK: A successful request.' + - name: system + result: + assets: [] + status: installed + - name: aws + result: + assets: [] + status: installed + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_install_packages_from_registry_response' + description: Successful response '400': content: application/json: @@ -39087,7 +33769,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: Cloud connector not found + message: An error message describing what went wrong statusCode: 400 schema: additionalProperties: false @@ -39107,140 +33789,75 @@ paths: required: - message - attributes - description: A bad request. - summary: Get cloud connector usage (package policies using the connector) + description: Bad Request + summary: Bulk install packages tags: - - Fleet cloud connectors - x-state: Experimental + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/data_streams: - get: + /api/fleet/epm/packages/_bulk_namespace_customization: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/data_streams
+
post /s/{space_id}/api/fleet/epm/packages/_bulk_namespace_customization
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - List all Fleet-managed data streams with metadata including package, namespace, size, and last activity.

[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all. - operationId: get-fleet-data-streams - parameters: [] + Enable or disable namespace-level index template customization for a list of packages in one call. Use this for IaC-style declarative flows.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk-namespace-customization + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + requestBody: + content: + application/json: + examples: + bulkNamespaceCustomizationRequest: + value: + disable: + - dev + enable: + - production + - staging + packages: + - system + - nginx + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_namespace_customization_request' responses: '200': content: application/json: examples: - getDataStreamsExample: - description: List of Fleet-managed data streams + successResponse: value: - data_streams: - - dashboards: - - id: nginx-overview - title: Nginx Overview - dataset: nginx.access - index: logs-nginx.access-default - last_activity_ms: 1700000000000 - namespace: default - package: nginx - package_version: 1.20.0 - serviceDetails: null - size_in_bytes: 1048576 - size_in_bytes_formatted: 1mb - type: logs - - dashboards: [] - dataset: system.cpu - index: metrics-system.cpu-default - last_activity_ms: 1699999000000 - namespace: default - package: system - package_version: 1.38.0 - serviceDetails: null - size_in_bytes: 524288 - size_in_bytes_formatted: 512kb - type: metrics - schema: - additionalProperties: false - type: object - properties: - data_streams: items: - additionalProperties: false - type: object - properties: - dashboards: - items: - additionalProperties: false - type: object - properties: - id: - type: string - title: - type: string - required: - - id - - title - maxItems: 10000 - type: array - dataset: - type: string - index: - type: string - last_activity_ms: - type: number - namespace: - type: string - package: - type: string - package_version: - type: string - serviceDetails: - additionalProperties: false - nullable: true - type: object - properties: - environment: - type: string - serviceName: - type: string - required: - - environment - - serviceName - size_in_bytes: - type: number - size_in_bytes_formatted: - anyOf: - - type: number - - type: string - type: - type: string - required: - - index - - dataset - - namespace - - type - - package - - package_version - - last_activity_ms - - size_in_bytes - - size_in_bytes_formatted - - dashboards - - serviceDetails - maxItems: 10000 - type: array - required: - - data_streams - description: Successful response + - name: system + namespace_customization_enabled_for: + - production + - staging + success: true + - error: Package nginx is not installed + name: nginx + success: false + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_namespace_customization_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: error: Bad Request - message: An error message describing what went wrong + message: 'Namespaces must not appear in both enable and disable: production' statusCode: 400 schema: additionalProperties: false @@ -39260,168 +33877,60 @@ paths: required: - message - attributes - description: Bad Request - summary: Get data streams + description: A bad request. + summary: Bulk enable/disable namespace-level customization for packages tags: - - Data streams + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/enrollment_api_keys: - get: + /api/fleet/epm/packages/_bulk_rollback: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/enrollment_api_keys
+
post /s/{space_id}/api/fleet/epm/packages/_bulk_rollback
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - List all enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup. - operationId: get-fleet-enrollment-api-keys + Rollback multiple packages to their previous versions.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk-rollback parameters: - - description: Page number - in: query - name: page - required: false - schema: - default: 1 - type: number - - description: Number of results per page - in: query - name: perPage - required: false - schema: - default: 20 - type: number - - description: A KQL query string to filter results - in: query - name: kuery - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string + requestBody: + content: + application/json: + examples: + bulkRollbackRequest: + value: + packages: + - name: system + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_rollback_packages_request' responses: '200': content: application/json: examples: - getEnrollmentApiKeysExample: - description: List of enrollment API keys + successResponse: value: - items: - - active: true - api_key: api-key-value-1 - api_key_id: api-key-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: key-id-1 - name: Default policy enrollment key - policy_id: policy-id-1 - list: - - active: true - api_key: api-key-value-1 - api_key_id: api-key-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: key-id-1 - name: Default policy enrollment key - policy_id: policy-id-1 - page: 1 - perPage: 20 - total: 1 + taskId: taskId schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - active: - description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: The enrollment API key (token) used for enrolling Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - hidden: - type: boolean - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: The ID of the agent policy the Elastic Agent will be enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - maxItems: 10000 - type: array - list: - deprecated: true - items: - additionalProperties: false - type: object - properties: - active: - description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: The enrollment API key (token) used for enrolling Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - hidden: - type: boolean - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: The ID of the agent policy the Elastic Agent will be enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage - - list - description: Successful response + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_rollback_packages_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -39440,123 +33949,49 @@ paths: required: - message - attributes - description: Bad Request - summary: Get enrollment API keys + description: A bad request. + summary: Bulk rollback packages tags: - - Fleet enrollment API keys + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - post: + /api/fleet/epm/packages/_bulk_rollback/{taskId}: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/enrollment_api_keys
+
get /s/{space_id}/api/fleet/epm/packages/_bulk_rollback/{taskId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create an enrollment API key for a given agent policy.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-enrollment-api-keys + Get the status and results of a bulk package rollback operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: get-fleet-epm-packages-bulk-rollback-taskid parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: Task ID of the bulk operation + in: path + name: taskId required: true schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - postEnrollmentApiKeyRequestExample: - description: Create an enrollment API key for an agent policy - value: - expiration: '2025-01-01T00:00:00.000Z' - name: My enrollment key - policy_id: policy-id-1 - schema: - additionalProperties: false - type: object - properties: - expiration: - type: string - name: - type: string - policy_id: - type: string - required: - - policy_id responses: '200': content: application/json: examples: - postEnrollmentApiKeyExample: - description: The created enrollment API key + successResponse: value: - action: created - item: - active: true - api_key: api-key-value-1 - api_key_id: api-key-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: key-id-1 - name: My enrollment key - policy_id: policy-id-1 + status: success schema: - additionalProperties: false - type: object - properties: - action: - enum: - - created - type: string - item: - additionalProperties: false - type: object - properties: - active: - description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: The enrollment API key (token) used for enrolling Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - hidden: - type: boolean - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: The ID of the agent policy the Elastic Agent will be enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - required: - - item - - action - description: Successful response + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_one_bulk_operation_packages_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -39575,24 +34010,24 @@ paths: required: - message - attributes - description: Bad Request - summary: Create an enrollment API key + description: A bad request. + summary: Get Bulk rollback packages details tags: - - Fleet enrollment API keys + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/enrollment_api_keys/_bulk_delete: + /api/fleet/epm/packages/_bulk_uninstall: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/enrollment_api_keys/_bulk_delete
+
post /s/{space_id}/api/fleet/epm/packages/_bulk_uninstall
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Revoke or delete multiple enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-enrollment-api-keys-bulk-delete + Uninstall multiple packages in a single operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk-uninstall parameters: - description: A required header to protect against CSRF attacks in: header @@ -39605,68 +34040,95 @@ paths: content: application/json: examples: - bulkDeleteByIdsExample: - description: Bulk delete enrollment API keys by IDs - value: - forceDelete: true - tokenIds: - - token-id-1 - - token-id-2 - bulkDeleteByKueryExample: - description: Bulk delete enrollment API keys by KQL query + postBulkUninstallPackagesRequestExample: + description: Uninstall multiple packages value: - forceDelete: false - kuery: policy_id:"policy-id-1" + packages: + - name: aws + - name: gcp schema: - additionalProperties: false - type: object - properties: - forceDelete: - default: false - description: When false (default), invalidate the API key and mark the token as inactive. When true, also delete the token document. - type: boolean - includeHidden: - default: false - description: When true, allow deletion of hidden enrollment tokens (managed/agentless policies). Defaults to false. - type: boolean - kuery: - description: KQL query to select enrollment tokens to delete. - type: string - tokenIds: - description: List of enrollment token IDs to delete. - items: - type: string - maxItems: 10000 - type: array + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_uninstall_packages_request' responses: '200': content: application/json: examples: - bulkDeleteEnrollmentApiKeysExample: - description: The enrollment API keys were successfully processed + postBulkUninstallPackagesExample: + description: Bulk uninstall task initiated value: - action: deleted - count: 2 - errorCount: 0 - successCount: 2 + taskId: task-id-1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_upgrade_packages_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false + description: Generic Error type: object properties: - action: + attributes: + nullable: true + error: type: string - count: - type: number - errorCount: - type: number - successCount: + errorType: + type: string + message: + type: string + statusCode: type: number required: - - action - - count - - successCount - - errorCount + - message + - attributes + description: Bad Request + summary: Bulk uninstall packages + tags: + - Elastic Package Manager (EPM) + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/epm/packages/_bulk_uninstall/{taskId}: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/epm/packages/_bulk_uninstall/{taskId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get the status and results of a bulk package uninstall operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: get-fleet-epm-packages-bulk-uninstall-taskid + parameters: + - description: Task ID of the bulk operation + in: path + name: taskId + required: true + schema: + type: string + responses: + '200': + content: + application/json: + examples: + getBulkOperationDetailsExample: + description: Details of the bulk operation task + value: + packages: + - name: system + result: installed + - name: elastic_agent + result: installed + status: success + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_one_bulk_operation_packages_response' description: Successful response '400': content: @@ -39676,7 +34138,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: Either tokenIds or kuery must be provided + message: An error message describing what went wrong statusCode: 400 schema: additionalProperties: false @@ -39697,24 +34159,23 @@ paths: - message - attributes description: Bad Request - summary: Bulk revoke or delete enrollment API keys + summary: Get Bulk uninstall packages details tags: - - Fleet enrollment API keys - x-state: Generally available + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/enrollment_api_keys/{keyId}: - delete: + /api/fleet/epm/packages/_bulk_upgrade: + post: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/enrollment_api_keys/{keyId}
+
post /s/{space_id}/api/fleet/epm/packages/_bulk_upgrade
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Revoke or delete an enrollment API key by ID. Use `forceDelete=true` to remove the document.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: delete-fleet-enrollment-api-keys-keyid + Upgrade multiple packages to their latest versions.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk-upgrade parameters: - description: A required header to protect against CSRF attacks in: header @@ -39723,45 +34184,29 @@ paths: schema: example: 'true' type: string - - description: The ID of the enrollment API key - in: path - name: keyId - required: true - schema: - type: string - - description: When false (default), invalidate the API key and mark the token as inactive. When true, also delete the token document. - in: query - name: forceDelete - required: false - schema: - default: false - type: boolean - - description: When true, allow deletion of hidden enrollment tokens (managed/agentless policies). Defaults to false. - in: query - name: includeHidden - required: false - schema: - default: false - type: boolean + requestBody: + content: + application/json: + examples: + postBulkUpgradePackagesRequestExample: + description: Upgrade multiple packages to their latest versions + value: + packages: + - name: system + - name: elastic_agent + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_upgrade_packages_request' responses: '200': content: application/json: examples: - deleteEnrollmentApiKeyExample: - description: The enrollment API key was successfully revoked + postBulkUpgradePackagesExample: + description: Bulk upgrade task initiated value: - action: deleted + taskId: task-id-1 schema: - additionalProperties: false - type: object - properties: - action: - enum: - - deleted - type: string - required: - - action + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_upgrade_packages_response' description: Successful response '400': content: @@ -39792,37 +34237,27 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No enrollment API key was found with the given ID - value: - error: Not Found - message: EnrollmentAPIKey key-id-1 not found - statusCode: 404 - description: Not Found - summary: Revoke or delete an enrollment API key + summary: Bulk upgrade packages tags: - - Fleet enrollment API keys + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name + /api/fleet/epm/packages/_bulk_upgrade/{taskId}: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/enrollment_api_keys/{keyId}
+
get /s/{space_id}/api/fleet/epm/packages/_bulk_upgrade/{taskId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an enrollment API key by ID.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup. - operationId: get-fleet-enrollment-api-keys-keyid + Get the status and results of a bulk package upgrade operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: get-fleet-epm-packages-bulk-upgrade-taskid parameters: - - description: The ID of the enrollment API key + - description: Task ID of the bulk operation in: path - name: keyId + name: taskId required: true schema: type: string @@ -39831,54 +34266,17 @@ paths: content: application/json: examples: - getEnrollmentApiKeyExample: - description: An enrollment API key + getBulkOperationDetailsExample: + description: Details of the bulk operation task value: - item: - active: true - api_key: api-key-value-1 - api_key_id: api-key-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: key-id-1 - name: Default policy enrollment key - policy_id: policy-id-1 + packages: + - name: system + result: installed + - name: elastic_agent + result: installed + status: success schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - active: - description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: The enrollment API key (token) used for enrolling Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - hidden: - type: boolean - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: The ID of the agent policy the Elastic Agent will be enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - required: - - item + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_one_bulk_operation_packages_response' description: Successful response '400': content: @@ -39909,34 +34307,23 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No enrollment API key was found with the given ID - value: - error: Not Found - message: EnrollmentAPIKey key-id-1 not found - statusCode: 404 - description: Not Found - summary: Get an enrollment API key + summary: Get Bulk upgrade packages details tags: - - Fleet enrollment API keys + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/bulk_assets: - post: + /api/fleet/epm/packages/{pkgName}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/bulk_assets
+
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Retrieve multiple Kibana saved object assets by their IDs and types.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: post-fleet-epm-bulk-assets + Uninstall a package and remove all its assets.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: delete-fleet-epm-packages-pkgname parameters: - description: A required header to protect against CSRF attacks in: header @@ -39945,87 +34332,31 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkGetAssetsRequestExample: - description: Retrieve multiple assets by their IDs and types - value: - assetIds: - - id: dashboard-id-1 - type: dashboard - - id: index-pattern-id-1 - type: index_pattern - schema: - additionalProperties: false - type: object - properties: - assetIds: - items: - additionalProperties: false - type: object - properties: - id: - type: string - type: - type: string - required: - - id - - type - maxItems: 10000 - type: array - required: - - assetIds + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: When true, delete the package even if it has active package policies + in: query + name: force + required: false + schema: + type: boolean responses: '200': content: application/json: examples: - postBulkGetAssetsExample: - description: Requested assets + deletePackageExample: + description: Package successfully deleted value: items: - - appLink: /app/dashboards#/view/dashboard-id-1 - attributes: - title: My Dashboard - id: dashboard-id-1 - type: dashboard + - id: aws-logs-aws.cloudwatch_logs-default + type: index_template schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - appLink: - type: string - attributes: - additionalProperties: false - type: object - properties: - description: - type: string - service: - type: string - title: - type: string - id: - type: string - type: - type: string - updatedAt: - type: string - required: - - id - - type - - attributes - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_package_response' description: Successful response '400': content: @@ -40056,78 +34387,76 @@ paths: - message - attributes description: Bad Request - summary: Bulk get assets + summary: Delete a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/categories: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/categories
+
get /s/{space_id}/api/fleet/epm/packages/{pkgName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of integration categories.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-categories + Get information about a package by name, returning the latest installed or available version. + operationId: get-fleet-epm-packages-pkgname parameters: - - description: When true, include prerelease packages in the results + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: When true, returns the package even if the signature cannot be verified + in: query + name: ignoreUnverified + required: false + schema: + type: boolean + - description: When true, include prerelease versions in: query name: prerelease required: false schema: type: boolean - - description: When true, include categories that only contain policy templates + - description: When true, return the full package info including assets in: query - name: include_policy_templates + name: full + required: false + schema: + type: boolean + - description: When true, include package metadata such as whether it has package policies + in: query + name: withMetadata required: false schema: + default: false type: boolean responses: '200': content: application/json: examples: - getCategoriesExample: - description: List of integration categories + getPackageInfoExample: + description: Package details and installation status value: - items: - - count: 42 - id: security - title: Security - - count: 38 - id: observability - title: Observability + item: + assets: + kibana: + dashboard: [] + index_pattern: [] + categories: + - cloud + description: Collect logs and metrics from Amazon Web Services + name: aws + status: installed + title: AWS + version: 2.10.0 schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - count: - type: number - id: - type: string - parent_id: - type: string - parent_title: - type: string - title: - type: string - required: - - id - - title - - count - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_info_response' description: Successful response '400': content: @@ -40158,23 +34487,22 @@ paths: - message - attributes description: Bad Request - summary: Get package categories + summary: Get a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/custom_integrations: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/custom_integrations
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create a new custom integration package with user-defined data streams.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-custom-integrations + Install the latest version of a package from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname parameters: - description: A required header to protect against CSRF attacks in: header @@ -40183,138 +34511,66 @@ paths: schema: example: 'true' type: string + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: When true, allow installing prerelease versions + in: query + name: prerelease + required: false + schema: + type: boolean + - description: When true, ignore mapping update errors during installation + in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - description: When true, skip data stream rollover after installation + in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + - description: Skip dependency validation when installing a package with dependencies + in: query + name: skipDependencyCheck + required: false + schema: + default: false + type: boolean requestBody: content: application/json: examples: - postCreateCustomIntegrationRequestExample: - description: Create a new custom integration + postInstallPackageRequestExample: + description: Install a package, optionally ignoring constraints value: - datasets: - - name: my_custom_logs.access - type: logs - integrationName: my_custom_logs + ignore_constraints: false schema: - additionalProperties: false - type: object - properties: - datasets: - items: - additionalProperties: false - type: object - properties: - name: - type: string - type: - enum: - - logs - - metrics - - traces - - synthetics - - profiling - type: string - required: - - name - - type - maxItems: 10 - type: array - force: - type: boolean - integrationName: - type: string - required: - - integrationName - - datasets + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_from_registry_request' + nullable: true responses: '200': content: application/json: examples: - postCreateCustomIntegrationExample: - description: Custom integration successfully created + postInstallPackageExample: + description: Package successfully installed value: _meta: - install_source: custom + install_source: registry items: - - id: my_custom_logs-logs-my_custom_logs.access + - id: aws-logs-aws.cloudwatch_logs-default type: index_template schema: - additionalProperties: false - type: object - properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - name: - type: string - required: - - install_source - - name - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - required: - - items - - _meta + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_response' description: Successful response '400': content: @@ -40345,23 +34601,22 @@ paths: - message - attributes description: Bad Request - summary: Create a custom integration + summary: Install a package from the registry tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/custom_integrations/{pkgName}: put: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/epm/custom_integrations/{pkgName}
+
put /s/{space_id}/api/fleet/epm/packages/{pkgName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update the datasets of an existing custom integration package.

[Required authorization] Route required privileges: fleet-settings-all AND integrations-all. - operationId: put-fleet-epm-custom-integrations-pkgname + Update settings for a package, such as whether policies are kept up to date automatically.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: put-fleet-epm-packages-pkgname parameters: - description: A required header to protect against CSRF attacks in: header @@ -40380,34 +34635,118 @@ paths: content: application/json: examples: - putUpdateCustomIntegrationRequestExample: - description: Update a custom integration + putUpdatePackageNamespaceCustomizationExample: + description: Enable namespace-level customization for the `production` and `staging` namespaces value: - datasets: - - name: my_custom_logs.access - type: logs - integrationName: my_custom_logs + namespace_customization_enabled_for: + - production + - staging + putUpdatePackageRequestExample: + description: Update keep_policies_up_to_date setting for a package + value: + keepPoliciesUpToDate: true schema: - additionalProperties: false - type: object - properties: - categories: - items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_request' + responses: + '200': + content: + application/json: + examples: + putUpdatePackageExample: + description: Updated package settings + value: + item: + keepPoliciesUpToDate: true + name: aws + version: 2.10.0 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: type: string - maxItems: 10 - type: array - readMeData: - type: string - required: - - readMeData + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Update package settings + tags: + - Elastic Package Manager (EPM) + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/epm/packages/{pkgName}/{pkgVersion}: + delete: + description: |- + **Spaces method and path for this operation:** + +
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Uninstall a specific version of a package and remove all its assets.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: delete-fleet-epm-packages-pkgname-pkgversion + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: When true, delete the package even if it has active package policies + in: query + name: force + required: false + schema: + type: boolean responses: '200': content: application/json: examples: - putUpdateCustomIntegrationExample: - description: Custom integration successfully updated - value: {} + deletePackageExample: + description: Package successfully deleted + value: + items: + - id: aws-logs-aws.cloudwatch_logs-default + type: index_template + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_package_response' description: Successful response '400': content: @@ -40438,55 +34777,56 @@ paths: - message - attributes description: Bad Request - summary: Update a custom integration + summary: Delete a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/data_streams: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/data_streams
+
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of data streams created by installed integration packages.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-data-streams + Get information about a specific version of a package. + operationId: get-fleet-epm-packages-pkgname-pkgversion parameters: - - description: Filter by data stream type + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: When true, returns the package even if the signature cannot be verified in: query - name: type + name: ignoreUnverified required: false schema: - enum: - - logs - - metrics - - traces - - synthetics - - profiling - type: string - - description: Filter data streams by dataset name + type: boolean + - description: When true, include prerelease versions in: query - name: datasetQuery + name: prerelease required: false schema: - type: string - - description: Sort order, ascending or descending + type: boolean + - description: When true, return the full package info including assets in: query - name: sortOrder + name: full required: false schema: - default: asc - enum: - - asc - - desc - type: string - - description: When true, only return data streams that are not associated with a package + type: boolean + - description: When true, include package metadata such as whether it has package policies in: query - name: uncategorisedOnly + name: withMetadata required: false schema: default: false @@ -40496,33 +34836,23 @@ paths: content: application/json: examples: - getDataStreamsExample: - description: List of data streams from installed packages + getPackageInfoExample: + description: Package details and installation status value: - data_streams: - - ilm_policy: logs-default - index_template: logs-system.syslog - name: logs-system.syslog-default - package: system - package_version: 1.55.0 - title: System syslog logs + item: + assets: + kibana: + dashboard: [] + index_pattern: [] + categories: + - cloud + description: Collect logs and metrics from Amazon Web Services + name: aws + status: installed + title: AWS + version: 2.10.0 schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - name: - type: string - required: - - name - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_info_response' description: Successful response '400': content: @@ -40553,557 +34883,110 @@ paths: - message - attributes description: Bad Request - summary: Get data streams + summary: Get a package tags: - - Data streams + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages: - get: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of integration packages available in the registry.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages + Install a specific version of a package from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-pkgversion parameters: - - description: Filter packages by category - in: query - name: category - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: When true, include prerelease packages in the results + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: When true, allow installing prerelease versions in: query name: prerelease required: false schema: type: boolean - - description: When true, exclude the install status from the response + - description: When true, ignore mapping update errors during installation in: query - name: excludeInstallStatus + name: ignoreMappingUpdateErrors required: false schema: + default: false type: boolean - - description: When true, include the number of package policies per package + - description: When true, skip data stream rollover after installation in: query - name: withPackagePoliciesCount + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + - description: Skip dependency validation when installing a package with dependencies + in: query + name: skipDependencyCheck required: false schema: + default: false type: boolean + requestBody: + content: + application/json: + examples: + postInstallPackageRequestExample: + description: Install a package, optionally ignoring constraints + value: + ignore_constraints: false + schema: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_from_registry_request' + nullable: true responses: '200': content: application/json: examples: - getPackagesExample: - description: List of available integration packages + postInstallPackageExample: + description: Package successfully installed value: + _meta: + install_source: registry items: - - categories: - - cloud - description: Collect logs and metrics from Amazon Web Services - id: aws - name: aws - status: not_installed - title: AWS - version: 2.10.0 - searchExcluded: 0 - total: 1 + - id: aws-logs-aws.cloudwatch_logs-default + type: index_template + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: true - type: object - properties: - categories: - items: - type: string - maxItems: 100 - type: array - conditions: - additionalProperties: true - type: object - properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - id: - type: string - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: - type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - maxItems: 10 - type: array - name: - type: string - namespaces: - items: - type: string - maxItems: 100 - type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - integration: - type: string - internal: - type: boolean - latestVersion: - type: string - name: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input - type: string - - enum: - - content - type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: - type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string - required: - - name - - version - - title - - id - maxItems: 10000 - type: array - required: - - items - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error + description: Generic Error type: object properties: attributes: @@ -41120,22 +35003,22 @@ paths: - message - attributes description: Bad Request - summary: Get packages + summary: Install a package from the registry tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - post: + put: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages
+
put /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install a package by uploading a .zip or .tar.gz archive (max 100MB). Only available to superusers.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages + Update settings for a specific version of a package.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: put-fleet-epm-packages-pkgname-pkgversion parameters: - description: A required header to protect against CSRF attacks in: header @@ -41144,139 +35027,52 @@ paths: schema: example: 'true' type: string - - description: When true, ignore mapping update errors during installation - in: query - name: ignoreMappingUpdateErrors - required: false + - description: Package name + in: path + name: pkgName + required: true schema: - default: false - type: boolean - - description: When true, skip data stream rollover after installation - in: query - name: skipDataStreamRollover - required: false + type: string + - description: Package version + in: path + name: pkgVersion + required: true schema: - default: false - type: boolean + type: string requestBody: content: - application/gzip: - examples: - postInstallByUploadRequestExample: - description: Upload a .zip or .tar.gz package archive (max 100MB) - value: - application/gzip; application/zip: + application/json: examples: - postInstallByUploadRequestExample: - description: Upload a .zip or .tar.gz package archive (max 100MB) - value: + putUpdatePackageNamespaceCustomizationExample: + description: Enable namespace-level customization for the `production` and `staging` namespaces + value: + namespace_customization_enabled_for: + - production + - staging + putUpdatePackageRequestExample: + description: Update keep_policies_up_to_date setting for a package + value: + keepPoliciesUpToDate: true schema: - format: binary - type: string + $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_request' responses: '200': content: - application/gzip; application/zip: - examples: - postInstallByUploadExample: - description: Package successfully installed from upload - value: - _meta: - install_source: upload - items: - - id: my-custom-package-logs-default - type: index_template - schema: - additionalProperties: false - type: object - properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - name: - type: string - required: - - install_source - - name - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - required: - - items - - _meta application/json: examples: - postInstallByUploadExample: - description: Package successfully installed from upload + putUpdatePackageExample: + description: Updated package settings value: - _meta: - install_source: upload - items: - - id: my-custom-package-logs-default - type: index_template + item: + keepPoliciesUpToDate: true + name: aws + version: 2.10.0 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_response' description: Successful response '400': content: - application/gzip; application/zip: + application/json: examples: genericErrorResponseExample: description: Example of a generic error response @@ -41302,215 +35098,53 @@ paths: required: - message - attributes - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 description: Bad Request - summary: Install a package by upload + summary: Update package settings tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/_bulk: - post: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk
+
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install multiple packages from the Elastic Package Registry in a single request.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk + Get the contents of a specific file from a package.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-pkgname-pkgversion-filepath parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: Package name + in: path + name: pkgName required: true schema: - example: 'true' type: string - - description: When true, allow installing prerelease versions - in: query - name: prerelease - required: false + - description: Package version + in: path + name: pkgVersion + required: true schema: - type: boolean - requestBody: - content: - application/json: - examples: - postBulkInstallPackagesRequestExample: - description: Install multiple packages from the registry - value: - packages: - - system - - aws - schema: - additionalProperties: false - type: object - properties: - force: - default: false - type: boolean - packages: - items: - anyOf: - - type: string - - additionalProperties: false - type: object - properties: - name: - type: string - prerelease: - type: boolean - version: - type: string - required: - - name - - version - maxItems: 1000 - minItems: 1 - type: array - required: - - packages + type: string + - description: File path within the package + in: path + name: filePath + required: true + schema: + type: string responses: '200': content: application/json: examples: - postBulkInstallPackagesExample: - description: Bulk install results - value: - items: - - name: system - result: - assets: [] - status: installed - - name: aws - result: - assets: [] - status: installed - schema: - additionalProperties: false - type: object - properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - error: - nullable: true - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - nullable: true - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - maxItems: 10000 - type: array - required: - - items - description: Successful response + getPackageFileExample: + description: The content of the requested package file + value: + schema: {} + description: Successful response — returns the file content '400': content: application/json: @@ -41540,23 +35174,23 @@ paths: - message - attributes description: Bad Request - summary: Bulk install packages + summary: Get a package file tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/_bulk_namespace_customization: - post: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk_namespace_customization
+
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Enable or disable namespace-level index template customization for a list of packages in one call. Use this for IaC-style declarative flows.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk-namespace-customization + Delete datastream assets for a specific input package, by data stream name.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: delete-fleet-epm-packages-pkgname-pkgversion-datastream-assets parameters: - description: A required header to protect against CSRF attacks in: header @@ -41565,98 +35199,47 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - bulkNamespaceCustomizationRequest: - value: - disable: - - dev - enable: - - production - - staging - packages: - - system - - nginx - schema: - additionalProperties: false - type: object - properties: - disable: - description: Namespaces to disable namespace-level customization for on each package. - items: - type: string - maxItems: 100 - type: array - enable: - description: Namespaces to enable namespace-level customization for on each package. - items: - type: string - maxItems: 100 - type: array - packages: - description: Package names to apply the customization changes to. - items: - type: string - maxItems: 1000 - minItems: 1 - type: array - required: - - packages + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: The ID of the package policy + in: query + name: packagePolicyId + required: true + schema: + type: string responses: '200': content: application/json: examples: - successResponse: + deletePackageDatastreamAssetsExample: + description: Package datastream assets successfully deleted value: items: - - name: system - namespace_customization_enabled_for: - - production - - staging - success: true - - error: Package nginx is not installed - name: nginx - success: false + - id: logs-my_package.access-default + type: index_template schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - error: - type: string - name: - type: string - namespace_customization_enabled_for: - description: 'The opt-in list on the package. Returned whenever the package is installed: the new list on success, or the unchanged list when the request is rejected (for example, because of a namespace-prefix restriction).' - items: - type: string - maxItems: 100 - type: array - success: - type: boolean - required: - - name - - success - maxItems: 1000 - type: array - required: - - items - description: 'OK: A successful request.' + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_package_datastream_assets_response' + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: error: Bad Request - message: 'Namespaces must not appear in both enable and disable: production' + message: An error message describing what went wrong statusCode: 400 schema: additionalProperties: false @@ -41676,83 +35259,64 @@ paths: required: - message - attributes - description: A bad request. - summary: Bulk enable/disable namespace-level customization for packages + description: Bad Request + summary: Delete assets for an input package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/_bulk_rollback: - post: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/dependencies: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk_rollback
+
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/dependencies
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Rollback multiple packages to their previous versions.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk-rollback + Get the list of packages that a specific package depends on.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-pkgname-pkgversion-dependencies parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion required: true schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - bulkRollbackRequest: - value: - packages: - - name: system - schema: - additionalProperties: false - type: object - properties: - packages: - items: - additionalProperties: false - type: object - properties: - name: - description: Package name to rollback - type: string - required: - - name - maxItems: 1000 - minItems: 1 - type: array - required: - - packages responses: '200': content: application/json: examples: - successResponse: + dependenciesResponse: value: - taskId: taskId + items: + - name: aws + title: AWS + version: ^2.0.0 + - name: system + title: System + version: ^1.0.0 + noDependenciesResponse: + value: + items: [] schema: - additionalProperties: false - type: object - properties: - taskId: - type: string - required: - - taskId + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_dependencies_response' description: 'OK: A successful request.' '400': content: application/json: examples: - badRequestResponse: + packageNotFoundResponse: value: - message: Bad Request + message: '[my-package-1.0.0] package not found in registry' schema: additionalProperties: false description: Generic Error @@ -41772,27 +35336,41 @@ paths: - message - attributes description: A bad request. - summary: Bulk rollback packages + summary: Get package dependencies tags: - Elastic Package Manager (EPM) + x-state: Generally available x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/_bulk_rollback/{taskId}: - get: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets: + delete: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/_bulk_rollback/{taskId}
+
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the status and results of a bulk package rollback operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: get-fleet-epm-packages-bulk-rollback-taskid + Delete Kibana assets (dashboards, visualizations, etc.) for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: delete-fleet-epm-packages-pkgname-pkgversion-kibana-assets parameters: - - description: Task ID of the bulk operation + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: Package name in: path - name: taskId + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion required: true schema: type: string @@ -41801,55 +35379,25 @@ paths: content: application/json: examples: - successResponse: + deleteKibanaAssetsExample: + description: Kibana assets successfully deleted value: - status: success - schema: - additionalProperties: false - type: object - properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - results: items: - additionalProperties: false - type: object - properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - name: - type: string - success: - type: boolean - required: - - name - - success - maxItems: 10000 - type: array - status: - type: string - required: - - status - description: 'OK: A successful request.' + - id: dashboard-id-1 + type: dashboard + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_kibana_assets_response' + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -41868,24 +35416,23 @@ paths: required: - message - attributes - description: A bad request. - summary: Get Bulk rollback packages details + description: Bad Request + summary: Delete Kibana assets for a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/_bulk_uninstall: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk_uninstall
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Uninstall multiple packages in a single operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk-uninstall + Install Kibana assets (dashboards, visualizations, etc.) for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-pkgversion-kibana-assets parameters: - description: A required header to protect against CSRF attacks in: header @@ -41894,57 +35441,42 @@ paths: schema: example: 'true' type: string + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string requestBody: content: application/json: examples: - postBulkUninstallPackagesRequestExample: - description: Uninstall multiple packages - value: - packages: - - name: aws - - name: gcp + postInstallKibanaAssetsRequestExample: + description: Install Kibana assets for a specific package version + value: {} schema: - additionalProperties: false - type: object - properties: - force: - default: false - type: boolean - packages: - items: - additionalProperties: false - type: object - properties: - name: - type: string - version: - type: string - required: - - name - - version - maxItems: 1000 - minItems: 1 - type: array - required: - - packages + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_install_kibana_assets_request' + nullable: true responses: '200': content: application/json: examples: - postBulkUninstallPackagesExample: - description: Bulk uninstall task initiated + postInstallKibanaAssetsExample: + description: Kibana assets successfully installed value: - taskId: task-id-1 + items: + - id: dashboard-id-1 + type: dashboard schema: - additionalProperties: false - type: object - properties: - taskId: - type: string - required: - - taskId + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_kibana_assets_response' description: Successful response '400': content: @@ -41975,82 +35507,67 @@ paths: - message - attributes description: Bad Request - summary: Bulk uninstall packages + summary: Install Kibana assets for a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/_bulk_uninstall/{taskId}: - get: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/rule_assets: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/_bulk_uninstall/{taskId}
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/rule_assets
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the status and results of a bulk package uninstall operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: get-fleet-epm-packages-bulk-uninstall-taskid + Install Kibana alert rule assets for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-pkgversion-rule-assets parameters: - - description: Task ID of the bulk operation + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: Package name in: path - name: taskId + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion required: true schema: type: string + requestBody: + content: + application/json: + examples: + postInstallRuleAssetsRequestExample: + description: Install alert rule assets for a specific package version + value: {} + schema: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_install_rule_assets_request' + nullable: true responses: '200': content: application/json: examples: - getBulkOperationDetailsExample: - description: Details of the bulk operation task + postInstallRuleAssetsExample: + description: Rule assets successfully installed value: - packages: - - name: system - result: installed - - name: elastic_agent - result: installed - status: success - schema: - additionalProperties: false - type: object - properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - results: items: - additionalProperties: false - type: object - properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - name: - type: string - success: - type: boolean - required: - - name - - success - maxItems: 10000 - type: array - status: - type: string - required: - - status + - id: rule-asset-id-1 + type: security_rule + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_kibana_assets_response' description: Successful response '400': content: @@ -42081,23 +35598,23 @@ paths: - message - attributes description: Bad Request - summary: Get Bulk uninstall packages details + summary: Install Kibana alert rule for a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/_bulk_upgrade: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk_upgrade
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Upgrade multiple packages to their latest versions.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk-upgrade + Reauthorize Elasticsearch transforms installed by a package with secondary authorization headers. + operationId: post-fleet-epm-packages-pkgname-pkgversion-transforms-authorize parameters: - description: A required header to protect against CSRF attacks in: header @@ -42106,61 +35623,64 @@ paths: schema: example: 'true' type: string + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: When true, allow prerelease versions + in: query + name: prerelease + required: false + schema: + type: boolean requestBody: content: application/json: examples: - postBulkUpgradePackagesRequestExample: - description: Upgrade multiple packages to their latest versions + postReauthorizeTransformsRequestExample: + description: Reauthorize transforms for a package value: - packages: - - name: system - - name: elastic_agent + transforms: + - destinations: + - index: logs-transform-dest + transformId: logs-transform-1 schema: - additionalProperties: false - type: object - properties: - force: - default: false - type: boolean - packages: - items: - additionalProperties: false - type: object - properties: - name: - type: string - version: - type: string - required: - - name - maxItems: 1000 - minItems: 1 - type: array - prerelease: - type: boolean - upgrade_package_policies: - default: false - type: boolean - required: - - packages + $ref: '#/components/schemas/Kibana_HTTP_APIs_reauthorize_transform_request' responses: '200': content: application/json: examples: - postBulkUpgradePackagesExample: - description: Bulk upgrade task initiated + postReauthorizeTransformsExample: + description: Transforms successfully reauthorized value: - taskId: task-id-1 + - success: true + transformId: logs-transform-1 schema: - additionalProperties: false - type: object - properties: - taskId: - type: string - required: - - taskId + items: + additionalProperties: false + type: object + properties: + error: + nullable: true + success: + type: boolean + transformId: + type: string + required: + - transformId + - success + - error + maxItems: 10000 + type: array description: Successful response '400': content: @@ -42191,82 +35711,191 @@ paths: - message - attributes description: Bad Request - summary: Bulk upgrade packages + summary: Authorize transforms tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/_bulk_upgrade/{taskId}: - get: + /api/fleet/epm/packages/{pkgName}/review_upgrade: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/_bulk_upgrade/{taskId}
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/review_upgrade
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the status and results of a bulk package upgrade operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: get-fleet-epm-packages-bulk-upgrade-taskid + Review and accept or reject a pending policy upgrade for a package that contains deprecations.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-review-upgrade parameters: - - description: Task ID of the bulk operation + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: Package name to review upgrade for in: path - name: taskId + name: pkgName required: true schema: type: string + requestBody: + content: + application/json: + examples: + acceptUpgrade: + value: + action: accept + target_version: 2.0.0 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_review_upgrade_request' responses: '200': content: application/json: examples: - getBulkOperationDetailsExample: - description: Details of the bulk operation task + successResponse: value: - packages: - - name: system - result: installed - - name: elastic_agent - result: installed - status: success + success: true + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_review_upgrade_response' + description: 'OK: A successful request.' + '400': + content: + application/json: + examples: + badRequestResponse: + value: + message: Bad Request schema: additionalProperties: false + description: Generic Error type: object properties: + attributes: + nullable: true error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - results: - items: - additionalProperties: false - type: object - properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - name: - type: string - success: - type: boolean - required: - - name - - success - maxItems: 10000 - type: array - status: type: string + errorType: + type: string + message: + type: string + statusCode: + type: number required: - - status + - message + - attributes + description: A bad request. + summary: Review a pending policy upgrade for a package with deprecations + tags: + - Elastic Package Manager (EPM) + x-state: Generally available + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/epm/packages/{pkgName}/rollback: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/rollback
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Rollback a package to its previously installed version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-rollback + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: Package name to roll back + in: path + name: pkgName + required: true + schema: + type: string + responses: + '200': + content: + application/json: + examples: + successResponse: + value: + success: true + version: 1.0.0 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_rollback_package_response' + description: 'OK: A successful request.' + '400': + content: + application/json: + examples: + badRequestResponse: + value: + message: Bad Request + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: A bad request. + summary: Rollback a package to previous version + tags: + - Elastic Package Manager (EPM) + x-state: Experimental + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/epm/packages/{pkgName}/stats: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/stats
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get usage statistics for a specific package, such as the number of agent policies using it.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-pkgname-stats + parameters: + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + responses: + '200': + content: + application/json: + examples: + getPackageStatsExample: + description: Usage stats for a specific package + value: + response: + agent_policy_count: 3 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_stats_response' description: Successful response '400': content: @@ -42297,119 +35926,158 @@ paths: - message - attributes description: Bad Request - summary: Get Bulk upgrade packages details + summary: Get package stats tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}: - delete: + /api/fleet/epm/packages/installed: + get: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}
+
get /s/{space_id}/api/fleet/epm/packages/installed
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Uninstall a package and remove all its assets.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: delete-fleet-epm-packages-pkgname + Get a list of all currently installed integration packages.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-installed parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: Filter by data stream type + in: query + name: dataStreamType + required: false schema: - example: 'true' + enum: + - logs + - metrics + - traces + - synthetics + - profiling type: string - - description: Package name - in: path - name: pkgName - required: true + - description: When true, only return packages with active data streams + in: query + name: showOnlyActiveDataStreams + required: false + schema: + type: boolean + - description: Filter packages by name + in: query + name: nameQuery + required: false schema: type: string - - description: When true, delete the package even if it has active package policies + - description: Sort values from the previous page for `search_after` pagination in: query - name: force + name: searchAfter required: false schema: - type: boolean + items: + anyOf: + - type: string + - type: number + maxItems: 10 + type: array + - description: Number of results per page + in: query + name: perPage + required: false + schema: + default: 15 + type: number + - description: Sort order, ascending or descending + in: query + name: sortOrder + required: false + schema: + default: asc + enum: + - asc + - desc + type: string responses: '200': content: application/json: examples: - deletePackageExample: - description: Package successfully deleted + getInstalledPackagesExample: + description: List of installed integration packages value: items: - - id: aws-logs-aws.cloudwatch_logs-default - type: index_template + - name: system + status: installed + title: System + version: 1.55.0 + - name: elastic_agent + status: installed + title: Elastic Agent + version: 1.15.0 + searchExcluded: 0 + total: 2 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_installed_packages_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false + description: Generic Error type: object properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number required: - - items + - message + - attributes + description: Bad Request + summary: Get installed packages + tags: + - Elastic Package Manager (EPM) + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/epm/packages/limited: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/epm/packages/limited
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get the list of packages that cannot be uninstalled (e.g. elastic_agent, fleet_server).

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-limited + parameters: [] + responses: + '200': + content: + application/json: + examples: + getLimitedPackagesExample: + description: List of packages that cannot be uninstalled + value: + items: + - elastic_agent + - fleet_server + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_limited_packages_response' description: Successful response '400': content: @@ -42440,22 +36108,23 @@ paths: - message - attributes description: Bad Request - summary: Delete a package + summary: Get a limited package list tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name + /api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}
+
get /s/{space_id}/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get information about a package by name, returning the latest installed or available version. - operationId: get-fleet-epm-packages-pkgname + Get an inputs template for a package, used to pre-populate package policy forms.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-templates-pkgname-pkgversion-inputs parameters: - description: Package name in: path @@ -42463,596 +36132,115 @@ paths: required: true schema: type: string - - description: When true, returns the package even if the signature cannot be verified - in: query - name: ignoreUnverified - required: false + - description: Package version + in: path + name: pkgVersion + required: true schema: - type: boolean - - description: When true, include prerelease versions + type: string + - description: 'Output format for the inputs template: json, yml, or yaml' in: query - name: prerelease + name: format required: false schema: - type: boolean - - description: When true, return the full package info including assets + default: json + enum: + - json + - yml + - yaml + type: string + - description: When true, allow prerelease versions in: query - name: full + name: prerelease required: false schema: type: boolean - - description: When true, include package metadata such as whether it has package policies + - description: When true, return inputs even if the package signature cannot be verified in: query - name: withMetadata + name: ignoreUnverified required: false schema: - default: false type: boolean responses: '200': content: application/json: examples: - getPackageInfoExample: - description: Package details and installation status + getInputsTemplateExample: + description: Inputs template for a package value: - item: - assets: - kibana: - dashboard: [] - index_pattern: [] - categories: - - cloud - description: Collect logs and metrics from Amazon Web Services - name: aws - status: installed - title: AWS - version: 2.10.0 + inputs: + - description: Collect logs from log files + title: Collect logs from files + type: logfile + vars: + - name: paths + required: true + title: Paths + type: text + schema: + anyOf: + - type: string + - $ref: '#/components/schemas/Kibana_HTTP_APIs_get_inputs_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false + description: Generic Error type: object properties: - item: - additionalProperties: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - maxItems: 1000 - type: array - asset_types: - items: - type: string - maxItems: 100 - type: array - text: - type: string - required: - - text - maxItems: 1000 - type: array - assets: - additionalProperties: - nullable: true - type: object - categories: - items: - type: string - maxItems: 100 - type: array - conditions: - additionalProperties: true - type: object - properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - elasticsearch: - additionalProperties: - nullable: true - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: - type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - maxItems: 10 - type: array - name: - type: string - namespaces: - items: - type: string - maxItems: 100 - type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input - type: string - - enum: - - content - type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: - type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string - required: - - name - - version - - title - - assets - metadata: - additionalProperties: false - type: object - properties: - has_policies: - type: boolean - required: - - has_policies + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number required: - - item + - message + - attributes + description: Bad Request + summary: Get an inputs template + tags: + - Elastic Package Manager (EPM) + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/epm/verification_key_id: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/epm/verification_key_id
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get the GPG key ID used to verify the signatures of packages from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-verification-key-id + parameters: [] + responses: + '200': + content: + application/json: + examples: + getVerificationKeyIdExample: + description: The GPG key ID used to verify package signatures + value: + id: D27D666CD88E42B4 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_verification_key_id_response' description: Successful response '400': content: @@ -43083,172 +36271,165 @@ paths: - message - attributes description: Bad Request - summary: Get a package + summary: Get a package signature verification key ID tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - post: + /api/fleet/fleet_server_hosts: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}
+
get /s/{space_id}/api/fleet/fleet_server_hosts
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install the latest version of a package from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: When true, allow installing prerelease versions - in: query - name: prerelease - required: false - schema: - type: boolean - - description: When true, ignore mapping update errors during installation - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - description: When true, skip data stream rollover after installation - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - - description: Skip dependency validation when installing a package with dependencies - in: query - name: skipDependencyCheck - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/json: - examples: - postInstallPackageRequestExample: - description: Install a package, optionally ignoring constraints - value: - ignore_constraints: false - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - default: false - type: boolean - ignore_constraints: - default: false - type: boolean + List all Fleet Server hosts.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-settings-read. + operationId: get-fleet-fleet-server-hosts + parameters: [] responses: '200': content: application/json: examples: - postInstallPackageExample: - description: Package successfully installed + getFleetServerHostsExample: + description: List of Fleet Server hosts value: - _meta: - install_source: registry items: - - id: aws-logs-aws.cloudwatch_logs-default - type: index_template + - host_urls: + - https://fleet-server.example.com:8220 + id: fleet-server-host-id-1 + is_default: true + is_preconfigured: false + name: Default Fleet Server + page: 1 + perPage: 20 + total: 1 schema: additionalProperties: false type: object properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - name: - type: string - required: - - install_source - - name items: items: - anyOf: - - additionalProperties: false + additionalProperties: false + type: object + properties: + host_urls: + items: + type: string + maxItems: 10 + minItems: 1 + type: array + id: + type: string + is_default: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + default: false + type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false type: object properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false + ssl: + additionalProperties: false + type: object + properties: + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true type: object properties: - deferred: - type: boolean - id: + agent_certificate: type: string - type: + agent_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + agent_key: + type: string + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + client_auth: enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view + - optional + - required + - none type: string - version: + es_certificate: type: string - required: - - id - - type + es_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + es_key: + type: string + key: + type: string + required: + - name + - host_urls + - id maxItems: 10000 type: array + page: + type: number + perPage: + type: number + total: + type: number required: - items - - _meta + - total + - page + - perPage description: Successful response '400': content: @@ -43279,22 +36460,22 @@ paths: - message - attributes description: Bad Request - summary: Install a package from the registry + summary: Get Fleet Server hosts tags: - - Elastic Package Manager (EPM) + - Fleet Server hosts x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - put: + post: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/epm/packages/{pkgName}
+
post /s/{space_id}/api/fleet/fleet_server_hosts
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update settings for a package, such as whether policies are kept up to date automatically.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: put-fleet-epm-packages-pkgname + Create a new Fleet Server host.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: post-fleet-fleet-server-hosts parameters: - description: A required header to protect against CSRF attacks in: header @@ -43303,585 +36484,245 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string requestBody: content: application/json: examples: - putUpdatePackageNamespaceCustomizationExample: - description: Enable namespace-level customization for the `production` and `staging` namespaces - value: - namespace_customization_enabled_for: - - production - - staging - putUpdatePackageRequestExample: - description: Update keep_policies_up_to_date setting for a package + postFleetServerHostRequestExample: + description: Create a new Fleet Server host value: - keepPoliciesUpToDate: true + host_urls: + - https://fleet-server.example.com:8220 + is_default: false + name: My Fleet Server schema: additionalProperties: false type: object properties: - keepPoliciesUpToDate: - type: boolean - namespace_customization_enabled_for: - description: Namespaces for which namespace-level customization is enabled on this package. + host_urls: items: type: string - maxItems: 100 + maxItems: 10 + minItems: 1 type: array + id: + type: string + is_default: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + default: false + type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false + type: object + properties: + ssl: + additionalProperties: false + type: object + properties: + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true + type: object + properties: + agent_certificate: + type: string + agent_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + agent_key: + type: string + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + client_auth: + enum: + - optional + - required + - none + type: string + es_certificate: + type: string + es_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + es_key: + type: string + key: + type: string + required: + - name + - host_urls responses: '200': content: application/json: examples: - putUpdatePackageExample: - description: Updated package settings + postFleetServerHostExample: + description: The created Fleet Server host value: item: - keepPoliciesUpToDate: true - name: aws - version: 2.10.0 + host_urls: + - https://fleet-server.example.com:8220 + id: fleet-server-host-id-2 + is_default: false + is_preconfigured: false + name: My Fleet Server schema: additionalProperties: false type: object properties: item: - additionalProperties: true + additionalProperties: false type: object properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - maxItems: 1000 - type: array - asset_types: - items: - type: string - maxItems: 100 - type: array - text: - type: string - required: - - text - maxItems: 1000 - type: array - assets: - additionalProperties: - nullable: true - type: object - categories: + host_urls: items: type: string - maxItems: 100 + maxItems: 10 + minItems: 1 type: array - conditions: - additionalProperties: true + id: + type: string + is_default: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + default: false + type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false type: object properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true + ssl: + additionalProperties: false type: object properties: - version: - type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true type: object properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: + agent_certificate: type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: + agent_certificate_authorities: items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - elasticsearch: - additionalProperties: - nullable: true - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: - type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error maxItems: 10 type: array - name: + agent_key: + type: string + certificate: type: string - namespaces: + certificate_authorities: items: type: string - maxItems: 100 + maxItems: 10 type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: + client_auth: enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: + - optional + - required + - none type: string - type: - enum: - - elastic - - partner - - community + es_certificate: type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: + es_certificate_authorities: + items: type: string - required: - - src - maxItems: 100 - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input + maxItems: 10 + type: array + es_key: type: string - - enum: - - content + key: type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: - type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string required: - name - - version - - title - - assets + - host_urls + - id required: - item description: Successful response @@ -43914,23 +36755,23 @@ paths: - message - attributes description: Bad Request - summary: Update package settings + summary: Create a Fleet Server host tags: - - Elastic Package Manager (EPM) + - Fleet Server hosts x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}: + /api/fleet/fleet_server_hosts/{itemId}: delete: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
+
delete /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Uninstall a specific version of a package and remove all its assets.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: delete-fleet-epm-packages-pkgname-pkgversion + Delete a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: delete-fleet-fleet-server-hosts-itemid parameters: - description: A required header to protect against CSRF attacks in: header @@ -43939,100 +36780,29 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version + - description: The ID of the Fleet Server host in: path - name: pkgVersion + name: itemId required: true schema: type: string - - description: When true, delete the package even if it has active package policies - in: query - name: force - required: false - schema: - type: boolean responses: '200': content: application/json: examples: - deletePackageExample: - description: Package successfully deleted + deleteFleetServerHostExample: + description: The Fleet Server host was successfully deleted value: - items: - - id: aws-logs-aws.cloudwatch_logs-default - type: index_template + id: fleet-server-host-id-1 schema: additionalProperties: false type: object properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array + id: + type: string required: - - items + - id description: Successful response '400': content: @@ -44063,9 +36833,20 @@ paths: - message - attributes description: Bad Request - summary: Delete a package + '404': + content: + application/json: + examples: + notFoundExample: + description: No Fleet Server host was found with the given ID + value: + error: Not Found + message: Fleet server fleet-server-host-id-1 not found + statusCode: 404 + description: Not Found + summary: Delete a Fleet Server host tags: - - Elastic Package Manager (EPM) + - Fleet Server hosts x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name @@ -44073,613 +36854,143 @@ paths: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
+
get /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get information about a specific version of a package. - operationId: get-fleet-epm-packages-pkgname-pkgversion + Get a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-read. + operationId: get-fleet-fleet-server-hosts-itemid parameters: - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version + - description: The ID of the Fleet Server host in: path - name: pkgVersion + name: itemId required: true schema: type: string - - description: When true, returns the package even if the signature cannot be verified - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - description: When true, include prerelease versions - in: query - name: prerelease - required: false - schema: - type: boolean - - description: When true, return the full package info including assets - in: query - name: full - required: false - schema: - type: boolean - - description: When true, include package metadata such as whether it has package policies - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean responses: '200': content: application/json: examples: - getPackageInfoExample: - description: Package details and installation status + getFleetServerHostExample: + description: A Fleet Server host value: item: - assets: - kibana: - dashboard: [] - index_pattern: [] - categories: - - cloud - description: Collect logs and metrics from Amazon Web Services - name: aws - status: installed - title: AWS - version: 2.10.0 + host_urls: + - https://fleet-server.example.com:8220 + id: fleet-server-host-id-1 + is_default: true + is_preconfigured: false + name: Default Fleet Server schema: additionalProperties: false type: object properties: item: - additionalProperties: true + additionalProperties: false type: object properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - maxItems: 1000 - type: array - asset_types: - items: - type: string - maxItems: 100 - type: array - text: - type: string - required: - - text - maxItems: 1000 - type: array - assets: - additionalProperties: - nullable: true - type: object - categories: + host_urls: items: type: string - maxItems: 100 + maxItems: 10 + minItems: 1 type: array - conditions: - additionalProperties: true + id: + type: string + is_default: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + default: false + type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false type: object properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true + ssl: + additionalProperties: false type: object properties: - version: - type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true type: object properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: + agent_certificate: type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: + agent_certificate_authorities: items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - elasticsearch: - additionalProperties: - nullable: true - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 + maxItems: 10 type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed + agent_key: type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: + certificate: type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: + certificate_authorities: items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error + type: string maxItems: 10 type: array - name: + client_auth: + enum: + - optional + - required + - none + type: string + es_certificate: type: string - namespaces: + es_certificate_authorities: items: type: string - maxItems: 100 + maxItems: 10 type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: + es_key: type: string - type: - enum: - - elastic - - partner - - community + key: type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input - type: string - - enum: - - content - type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: - type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string required: - name - - version - - title - - assets - metadata: - additionalProperties: false - type: object - properties: - has_policies: - type: boolean - required: - - has_policies + - host_urls + - id required: - item description: Successful response @@ -44712,22 +37023,33 @@ paths: - message - attributes description: Bad Request - summary: Get a package + '404': + content: + application/json: + examples: + notFoundExample: + description: No Fleet Server host was found with the given ID + value: + error: Not Found + message: Fleet server fleet-server-host-id-1 not found + statusCode: 404 + description: Not Found + summary: Get a Fleet Server host tags: - - Elastic Package Manager (EPM) + - Fleet Server hosts x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - post: + put: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
+
put /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install a specific version of a package from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-pkgversion + Update a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: put-fleet-fleet-server-hosts-itemid parameters: - description: A required header to protect against CSRF attacks in: header @@ -44736,154 +37058,246 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version + - description: The ID of the Fleet Server host in: path - name: pkgVersion + name: itemId required: true schema: type: string - - description: When true, allow installing prerelease versions - in: query - name: prerelease - required: false - schema: - type: boolean - - description: When true, ignore mapping update errors during installation - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - description: When true, skip data stream rollover after installation - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - - description: Skip dependency validation when installing a package with dependencies - in: query - name: skipDependencyCheck - required: false - schema: - default: false - type: boolean requestBody: content: application/json: examples: - postInstallPackageRequestExample: - description: Install a package, optionally ignoring constraints + putFleetServerHostRequestExample: + description: Update a Fleet Server host value: - ignore_constraints: false + host_urls: + - https://updated-fleet-server.example.com:8220 + is_default: false + name: Updated Fleet Server schema: additionalProperties: false - nullable: true type: object properties: - force: - default: false + host_urls: + items: + type: string + maxItems: 10 + minItems: 1 + type: array + is_default: type: boolean - ignore_constraints: - default: false + is_internal: type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false + type: object + properties: + ssl: + additionalProperties: false + type: object + properties: + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true + type: object + properties: + agent_certificate: + type: string + agent_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + agent_key: + type: string + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + client_auth: + enum: + - optional + - required + - none + type: string + es_certificate: + type: string + es_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + es_key: + type: string + key: + type: string + required: + - proxy_id responses: '200': content: application/json: examples: - postInstallPackageExample: - description: Package successfully installed + putFleetServerHostExample: + description: The updated Fleet Server host value: - _meta: - install_source: registry - items: - - id: aws-logs-aws.cloudwatch_logs-default - type: index_template + item: + host_urls: + - https://updated-fleet-server.example.com:8220 + id: fleet-server-host-id-1 + is_default: false + is_preconfigured: false + name: Updated Fleet Server schema: additionalProperties: false type: object properties: - _meta: + item: additionalProperties: false type: object properties: - install_source: + host_urls: + items: + type: string + maxItems: 10 + minItems: 1 + type: array + id: type: string + is_default: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + default: false + type: boolean name: type: string - required: - - install_source - - name - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false + type: object + properties: + ssl: + additionalProperties: false + type: object + properties: + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true + type: object + properties: + agent_certificate: + type: string + agent_certificate_authorities: + items: type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view + maxItems: 10 + type: array + agent_key: + type: string + certificate: + type: string + certificate_authorities: + items: type: string - version: + maxItems: 10 + type: array + client_auth: + enum: + - optional + - required + - none + type: string + es_certificate: + type: string + es_certificate_authorities: + items: type: string - required: - - id - - type - maxItems: 10000 - type: array + maxItems: 10 + type: array + es_key: + type: string + key: + type: string + required: + - name + - host_urls + - id required: - - items - - _meta + - item description: Successful response '400': content: @@ -44914,22 +37328,34 @@ paths: - message - attributes description: Bad Request - summary: Install a package from the registry + '404': + content: + application/json: + examples: + notFoundExample: + description: No Fleet Server host was found with the given ID + value: + error: Not Found + message: Fleet server fleet-server-host-id-1 not found + statusCode: 404 + description: Not Found + summary: Update a Fleet Server host tags: - - Elastic Package Manager (EPM) + - Fleet Server hosts x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - put: + /api/fleet/health_check: + post: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
+
post /s/{space_id}/api/fleet/health_check
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update settings for a specific version of a package.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: put-fleet-epm-packages-pkgname-pkgversion + Check the health status of a Fleet Server instance by its host ID. Returns the server status and name if available.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: post-fleet-health-check parameters: - description: A required header to protect against CSRF attacks in: header @@ -44938,603 +37364,59 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true - schema: - type: string requestBody: content: application/json: examples: - putUpdatePackageNamespaceCustomizationExample: - description: Enable namespace-level customization for the `production` and `staging` namespaces - value: - namespace_customization_enabled_for: - - production - - staging - putUpdatePackageRequestExample: - description: Update keep_policies_up_to_date setting for a package + postHealthCheckRequestExample: + description: Check the health of a Fleet Server instance by its host ID value: - keepPoliciesUpToDate: true + id: fleet-server-host-id-1 schema: additionalProperties: false type: object properties: - keepPoliciesUpToDate: - type: boolean - namespace_customization_enabled_for: - description: Namespaces for which namespace-level customization is enabled on this package. - items: - type: string - maxItems: 100 - type: array + id: + type: string + required: + - id responses: '200': content: application/json: examples: - putUpdatePackageExample: - description: Updated package settings + postHealthCheckHealthyExample: + description: Fleet Server is online and healthy value: - item: - keepPoliciesUpToDate: true - name: aws - version: 2.10.0 + name: fleet-server-1 + status: ONLINE + postHealthCheckUnreachableExample: + description: Fleet Server host is not reachable (request timed out or aborted) + value: + host_id: fleet-server-host-id-1 + status: OFFLINE schema: additionalProperties: false type: object properties: - item: - additionalProperties: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - maxItems: 1000 - type: array - asset_types: - items: - type: string - maxItems: 100 - type: array - text: - type: string - required: - - text - maxItems: 1000 - type: array - assets: - additionalProperties: - nullable: true - type: object - categories: - items: - type: string - maxItems: 100 - type: array - conditions: - additionalProperties: true - type: object - properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - elasticsearch: - additionalProperties: - nullable: true - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: - type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - maxItems: 10 - type: array - name: - type: string - namespaces: - items: - type: string - maxItems: 100 - type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input - type: string - - enum: - - content - type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: - type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string - required: - - name - - version - - title - - assets + host_id: + type: string + name: + type: string + status: + type: string required: - - item - description: Successful response + - status + description: Successful health check response '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestExample: + description: The host ID exists but has no associated host URLs configured value: error: Bad Request - message: An error message describing what went wrong + message: The requested host id fleet-server-host-id-1 does not have associated host urls. statusCode: 400 schema: additionalProperties: false @@ -45555,40 +37437,69 @@ paths: - message - attributes description: Bad Request - summary: Update package settings + '404': + content: + application/json: + examples: + notFoundExample: + description: No Fleet Server host was found with the given ID + value: + error: Not Found + message: The requested host id fleet-server-host-id-1 does not exist. + statusCode: 404 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Not Found + summary: Check Fleet Server health tags: - - Elastic Package Manager (EPM) + - Fleet internals x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}: + /api/fleet/kubernetes: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}
+
get /s/{space_id}/api/fleet/kubernetes
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the contents of a specific file from a package.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-pkgname-pkgversion-filepath + Get the Kubernetes manifest for deploying Elastic Agent.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. + operationId: get-fleet-kubernetes parameters: - - description: Package name - in: path - name: pkgName - required: true + - description: If true, returns the manifest as a downloadable file + in: query + name: download + required: false schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true + type: boolean + - description: Fleet Server host URL to include in the manifest + in: query + name: fleetServer + required: false schema: type: string - - description: File path within the package - in: path - name: filePath - required: true + - description: Enrollment token to include in the manifest + in: query + name: enrolToken + required: false schema: type: string responses: @@ -45596,11 +37507,13 @@ paths: content: application/json: examples: - getPackageFileExample: - description: The content of the requested package file - value: - schema: {} - description: Successful response — returns the file content + getK8sManifestExample: + description: The Kubernetes manifest for deploying Elastic Agent + value: + item: 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: agent-node-datastreams\n namespace: kube-system\n' + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_k8s_manifest_response' + description: Successful response '400': content: application/json: @@ -45630,47 +37543,40 @@ paths: - message - attributes description: Bad Request - summary: Get a package file + summary: Get a full K8s agent manifest tags: - - Elastic Package Manager (EPM) + - Elastic Agent policies x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets: - delete: + /api/fleet/kubernetes/download: + get: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets
+
get /s/{space_id}/api/fleet/kubernetes/download
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete datastream assets for a specific input package, by data stream name.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: delete-fleet-epm-packages-pkgname-pkgversion-datastream-assets + Download the Kubernetes manifest for deploying Elastic Agent.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. + operationId: get-fleet-kubernetes-download parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: Package name - in: path - name: pkgName - required: true + - description: If true, returns the manifest as a downloadable file + in: query + name: download + required: false schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true + type: boolean + - description: Fleet Server host URL to include in the manifest + in: query + name: fleetServer + required: false schema: type: string - - description: The ID of the package policy + - description: Enrollment token to include in the manifest in: query - name: packagePolicyId - required: true + name: enrolToken + required: false schema: type: string responses: @@ -45678,21 +37584,12 @@ paths: content: application/json: examples: - deletePackageDatastreamAssetsExample: - description: Package datastream assets successfully deleted - value: - items: - - id: logs-my_package.access-default - type: index_template + getDownloadK8sManifestExample: + description: The Kubernetes manifest download + value: 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: agent-node-datastreams\n namespace: kube-system\n' schema: - additionalProperties: false - type: object - properties: - success: - type: boolean - required: - - success - description: Successful response + type: string + description: Successful response — returns the Kubernetes manifest as a YAML file download '400': content: application/json: @@ -45722,84 +37619,88 @@ paths: - message - attributes description: Bad Request - summary: Delete assets for an input package + '404': + content: + application/json: + examples: + notFoundExample: + description: No manifest was found + value: + error: Not Found + message: Agent manifest not found + statusCode: 404 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Not Found + summary: Download an agent manifest tags: - - Elastic Package Manager (EPM) + - Elastic Agent policies x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/dependencies: - get: + /api/fleet/logstash_api_keys: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/dependencies
+
post /s/{space_id}/api/fleet/logstash_api_keys
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the list of packages that a specific package depends on.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-pkgname-pkgversion-dependencies + Generate an API key for Logstash to use with a Fleet output.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: post-fleet-logstash-api-keys parameters: - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf required: true schema: + example: 'true' type: string responses: '200': content: application/json: examples: - dependenciesResponse: - value: - items: - - name: aws - title: AWS - version: ^2.0.0 - - name: system - title: System - version: ^1.0.0 - noDependenciesResponse: + postLogstashApiKeyExample: + description: The generated Logstash API key value: - items: [] + api_key: TiNAGG4BaaMdaH1tRfuU:KnR6yE41RrSowb0kQ0HWoA schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version: - type: string - required: - - name - - version - - title - maxItems: 1000 - type: array + api_key: + type: string required: - - items - description: 'OK: A successful request.' + - api_key + description: Successful response '400': content: application/json: examples: - packageNotFoundResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: '[my-package-1.0.0] package not found in registry' + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -45818,25 +37719,24 @@ paths: required: - message - attributes - description: A bad request. - summary: Get package dependencies + description: Bad Request + summary: Generate a Logstash API key tags: - - Elastic Package Manager (EPM) - x-state: Generally available + - Fleet outputs x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets: - delete: + /api/fleet/message_signing_service/rotate_key_pair: + post: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets
+
post /s/{space_id}/api/fleet/message_signing_service/rotate_key_pair
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete Kibana assets (dashboards, visualizations, etc.) for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: delete-fleet-epm-packages-pkgname-pkgversion-kibana-assets + Rotate the key pair used by Fleet to sign messages sent to Elastic Agents. This operation is irreversible and requires all agents in the Fleet to be re-enrolled after rotation. You must explicitly acknowledge the risk by passing `acknowledge=true` as a query parameter.

[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all. + operationId: post-fleet-message-signing-service-rotate-key-pair parameters: - description: A required header to protect against CSRF attacks in: header @@ -45845,47 +37745,40 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true + - description: Set to true to confirm you understand the risks of rotating the key pair + in: query + name: acknowledge + required: false schema: - type: string + default: false + type: boolean responses: '200': content: application/json: examples: - deleteKibanaAssetsExample: - description: Kibana assets successfully deleted + rotateKeyPairSuccessExample: + description: The key pair was rotated. All agents must be re-enrolled to receive the new signing key. value: - items: - - id: dashboard-id-1 - type: dashboard + message: Key pair rotated successfully. schema: additionalProperties: false type: object properties: - success: - type: boolean + message: + type: string required: - - success - description: Successful response + - message + description: Key pair rotated successfully '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + acknowledgeRequiredExample: + description: Request was rejected because the acknowledge query parameter was not set to true value: error: Bad Request - message: An error message describing what went wrong + message: 'Warning: this API will cause a key pair to rotate and should not be necessary in normal operation. If you proceed, you may need to reinstall Agents in your network. You must acknowledge the risks of rotating the key pair with acknowledge=true in the request parameters. For more information, reach out to your administrator.' statusCode: 400 schema: additionalProperties: false @@ -45906,82 +37799,96 @@ paths: - message - attributes description: Bad Request - summary: Delete Kibana assets for a package + '500': + content: + application/json: + examples: + serviceUnavailableExample: + description: The message signing service is not available + value: + error: Internal Server Error + message: Failed to rotate key pair. Message signing service is unavailable! + statusCode: 500 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Internal Server Error + summary: Rotate a Fleet message signing key pair tags: - - Elastic Package Manager (EPM) + - Message Signing Service x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - post: + /api/fleet/outputs: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets
+
get /s/{space_id}/api/fleet/outputs
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install Kibana assets (dashboards, visualizations, etc.) for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-pkgversion-kibana-assets - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true - schema: - type: string - requestBody: - content: - application/json: - examples: - postInstallKibanaAssetsRequestExample: - description: Install Kibana assets for a specific package version - value: {} - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - space_ids: - description: When provided install assets in the specified spaces instead of the current space. - items: - type: string - maxItems: 100 - minItems: 1 - type: array + List all Fleet outputs.

[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read. + operationId: get-fleet-outputs + parameters: [] responses: '200': content: application/json: examples: - postInstallKibanaAssetsExample: - description: Kibana assets successfully installed + getOutputsExample: + description: List of Fleet outputs value: items: - - id: dashboard-id-1 - type: dashboard + - hosts: + - https://elasticsearch.example.com:9200 + id: output-id-1 + is_default: true + is_default_monitoring: true + name: Default output + type: elasticsearch + page: 1 + perPage: 20 + total: 1 schema: additionalProperties: false type: object properties: - success: - type: boolean + items: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' + maxItems: 10000 + type: array + page: + type: number + perPage: + type: number + total: + type: number required: - - success + - items + - total + - page + - perPage description: Successful response '400': content: @@ -46012,23 +37919,22 @@ paths: - message - attributes description: Bad Request - summary: Install Kibana assets for a package + summary: Get outputs tags: - - Elastic Package Manager (EPM) + - Fleet outputs x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/rule_assets: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/rule_assets
+
post /s/{space_id}/api/fleet/outputs
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install Kibana alert rule assets for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-pkgversion-rule-assets + Create a new Fleet output.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: post-fleet-outputs parameters: - description: A required header to protect against CSRF attacks in: header @@ -46037,51 +37943,53 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true - schema: - type: string requestBody: content: application/json: examples: - postInstallRuleAssetsRequestExample: - description: Install alert rule assets for a specific package version - value: {} + postOutputRequestExample: + description: Create a new Elasticsearch output + value: + hosts: + - https://elasticsearch.example.com:9200 + is_default: false + is_default_monitoring: false + name: My output + type: elasticsearch schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_kafka' responses: '200': content: application/json: examples: - postInstallRuleAssetsExample: - description: Rule assets successfully installed + postOutputExample: + description: The created Fleet output value: - items: - - id: rule-asset-id-1 - type: security_rule + item: + hosts: + - https://elasticsearch.example.com:9200 + id: output-id-2 + is_default: false + is_default_monitoring: false + name: My output + type: elasticsearch schema: additionalProperties: false type: object properties: - success: - type: boolean + item: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' required: - - success + - item description: Successful response '400': content: @@ -46112,23 +38020,23 @@ paths: - message - attributes description: Bad Request - summary: Install Kibana alert rule for a package + summary: Create output tags: - - Elastic Package Manager (EPM) + - Fleet outputs x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize: - post: + /api/fleet/outputs/{outputId}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize
+
delete /s/{space_id}/api/fleet/outputs/{outputId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Reauthorize Elasticsearch transforms installed by a package with secondary authorization headers. - operationId: post-fleet-epm-packages-pkgname-pkgversion-transforms-authorize + Delete output by ID.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: delete-fleet-outputs-outputid parameters: - description: A required header to protect against CSRF attacks in: header @@ -46137,79 +38045,29 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version + - description: The ID of the output in: path - name: pkgVersion + name: outputId required: true schema: type: string - - description: When true, allow prerelease versions - in: query - name: prerelease - required: false - schema: - type: boolean - requestBody: - content: - application/json: - examples: - postReauthorizeTransformsRequestExample: - description: Reauthorize transforms for a package - value: - transforms: - - destinations: - - index: logs-transform-dest - transformId: logs-transform-1 - schema: - additionalProperties: false - type: object - properties: - transforms: - items: - additionalProperties: false - type: object - properties: - transformId: - type: string - required: - - transformId - maxItems: 1000 - type: array - required: - - transforms responses: '200': content: application/json: examples: - postReauthorizeTransformsExample: - description: Transforms successfully reauthorized + deleteOutputExample: + description: The output was successfully deleted value: - - success: true - transformId: logs-transform-1 + id: output-id-1 schema: - items: - additionalProperties: false - type: object - properties: - error: - nullable: true - success: - type: boolean - transformId: - type: string - required: - - transformId - - success - - error - maxItems: 10000 - type: array + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id description: Successful response '400': content: @@ -46240,84 +38098,97 @@ paths: - message - attributes description: Bad Request - summary: Authorize transforms + '404': + content: + application/json: + examples: + notFoundExample: + description: No output was found with the given ID + value: + error: Not Found + message: Output output-id-1 not found + statusCode: 404 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Not Found + summary: Delete output tags: - - Elastic Package Manager (EPM) + - Fleet outputs x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/review_upgrade: - post: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/review_upgrade
+
get /s/{space_id}/api/fleet/outputs/{outputId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Review and accept or reject a pending policy upgrade for a package that contains deprecations.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-review-upgrade + Get output by ID.

[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read. + operationId: get-fleet-outputs-outputid parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: Package name to review upgrade for + - description: The ID of the output in: path - name: pkgName + name: outputId required: true schema: type: string - requestBody: - content: - application/json: - examples: - acceptUpgrade: - value: - action: accept - target_version: 2.0.0 - schema: - additionalProperties: false - type: object - properties: - action: - enum: - - accept - - decline - - pending - type: string - target_version: - type: string - required: - - action - - target_version responses: '200': content: application/json: examples: - successResponse: + getOutputExample: + description: A Fleet output value: - success: true + item: + hosts: + - https://elasticsearch.example.com:9200 + id: output-id-1 + is_default: true + is_default_monitoring: true + name: Default output + type: elasticsearch schema: additionalProperties: false type: object properties: - success: - type: boolean + item: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' required: - - success - description: 'OK: A successful request.' + - item + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -46336,25 +38207,34 @@ paths: required: - message - attributes - description: A bad request. - summary: Review a pending policy upgrade for a package with deprecations + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No output was found with the given ID + value: + error: Not Found + message: Output output-id-1 not found + statusCode: 404 + description: Not Found + summary: Get output tags: - - Elastic Package Manager (EPM) - x-state: Generally available + - Fleet outputs x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/rollback: - post: + put: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/rollback
+
put /s/{space_id}/api/fleet/outputs/{outputId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Rollback a package to its previously installed version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-rollback + Update output by ID.

[Required authorization] Route required privileges: fleet-settings-all OR fleet-agent-policies-all. + operationId: put-fleet-outputs-outputid parameters: - description: A required header to protect against CSRF attacks in: header @@ -46363,40 +38243,67 @@ paths: schema: example: 'true' type: string - - description: Package name to roll back + - description: The ID of the output in: path - name: pkgName + name: outputId required: true schema: type: string + requestBody: + content: + application/json: + examples: + putOutputRequestExample: + description: Update a Fleet output + value: + hosts: + - https://updated-elasticsearch.example.com:9200 + name: Updated output + schema: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_kafka' responses: '200': content: application/json: examples: - successResponse: + putOutputExample: + description: The updated Fleet output value: - success: true - version: 1.0.0 + item: + hosts: + - https://updated-elasticsearch.example.com:9200 + id: output-id-1 + is_default: true + is_default_monitoring: true + name: Updated output + type: elasticsearch schema: additionalProperties: false type: object properties: - success: - type: boolean - version: - type: string + item: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' required: - - version - - success - description: 'OK: A successful request.' + - item + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -46415,29 +38322,39 @@ paths: required: - message - attributes - description: A bad request. - summary: Rollback a package to previous version + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No output was found with the given ID + value: + error: Not Found + message: Output output-id-1 not found + statusCode: 404 + description: Not Found + summary: Update output tags: - - Elastic Package Manager (EPM) - x-state: Experimental + - Fleet outputs x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/{pkgName}/stats: + /api/fleet/outputs/{outputId}/health: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/stats
+
get /s/{space_id}/api/fleet/outputs/{outputId}/health
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get usage statistics for a specific package, such as the number of agent policies using it.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-pkgname-stats + Get the latest health status of an output by ID.

[Required authorization] Route required privileges: fleet-settings-read. + operationId: get-fleet-outputs-outputid-health parameters: - - description: Package name + - description: The ID of the output in: path - name: pkgName + name: outputId required: true schema: type: string @@ -46446,28 +38363,29 @@ paths: content: application/json: examples: - getPackageStatsExample: - description: Usage stats for a specific package + getOutputHealthExample: + description: The latest health status of a Fleet output value: - response: - agent_policy_count: 3 + message: '' + state: HEALTHY + timestamp: '2024-01-15T10:00:00.000Z' schema: additionalProperties: false type: object properties: - response: - additionalProperties: false - type: object - properties: - agent_policy_count: - type: number - package_policy_count: - type: number - required: - - agent_policy_count - - package_policy_count + message: + description: long message if unhealthy + type: string + state: + description: state of output, HEALTHY or DEGRADED + type: string + timestamp: + description: timestamp of reported state + type: string required: - - response + - state + - message + - timestamp description: Successful response '400': content: @@ -46498,171 +38416,123 @@ paths: - message - attributes description: Bad Request - summary: Get package stats + summary: Get the latest output health tags: - - Elastic Package Manager (EPM) + - Fleet outputs x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/installed: + /api/fleet/package_policies: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/installed
+
get /s/{space_id}/api/fleet/package_policies
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of all currently installed integration packages.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-installed + List all package policies. + operationId: get-fleet-package-policies parameters: - - description: Filter by data stream type + - description: Page number in: query - name: dataStreamType + name: page required: false schema: - enum: - - logs - - metrics - - traces - - synthetics - - profiling - type: string - - description: When true, only return packages with active data streams + type: number + - description: Number of results per page in: query - name: showOnlyActiveDataStreams + name: perPage required: false schema: - type: boolean - - description: Filter packages by name + type: number + - description: Field to sort results by in: query - name: nameQuery + name: sortField required: false schema: type: string - - description: Sort values from the previous page for `search_after` pagination + - description: Sort order, ascending or descending in: query - name: searchAfter + name: sortOrder required: false schema: - items: - anyOf: - - type: string - - type: number - maxItems: 10 - type: array - - description: Number of results per page + enum: + - desc + - asc + type: string + - description: When true, only show policies with available upgrades in: query - name: perPage + name: showUpgradeable required: false schema: - default: 15 - type: number - - description: Sort order, ascending or descending + type: boolean + - description: A KQL query string to filter results in: query - name: sortOrder + name: kuery + required: false + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format required: false schema: - default: asc enum: - - asc - - desc + - simplified + - legacy type: string + - description: When true, include the agent count per package policy + in: query + name: withAgentCount + required: false + schema: + type: boolean responses: '200': content: application/json: examples: - getInstalledPackagesExample: - description: List of installed integration packages + getPackagePoliciesExample: + description: List of package policies value: items: - - name: system - status: installed - title: System - version: 1.55.0 - - name: elastic_agent - status: installed - title: Elastic Agent - version: 1.15.0 - searchExcluded: 0 - total: 2 + - created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-1 + inputs: [] + name: nginx-1 + namespace: default + package: + name: nginx + title: Nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + updated_at: '2024-01-15T10:00:00.000Z' + page: 1 + perPage: 20 + total: 1 schema: additionalProperties: false type: object properties: items: items: - additionalProperties: false - type: object - properties: - dataStreams: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - required: - - name - - title - maxItems: 10000 - type: array - description: - type: string - icons: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - name: - type: string - status: - type: string - title: - type: string - version: - type: string - required: - - name - - version - - status - - dataStreams + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' maxItems: 10000 type: array - searchAfter: - items: - anyOf: - - type: string - - type: number - - type: boolean - - nullable: true - nullable: true - maxItems: 2 - type: array + page: + type: number + perPage: + type: number total: type: number required: - items - total + - page + - perPage description: Successful response '400': content: @@ -46693,46 +38563,83 @@ paths: - message - attributes description: Bad Request - summary: Get installed packages + summary: Get package policies tags: - - Elastic Package Manager (EPM) + - Fleet package policies x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/packages/limited: - get: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/limited
+
post /s/{space_id}/api/fleet/package_policies
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the list of packages that cannot be uninstalled (e.g. elastic_agent, fleet_server).

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-limited - parameters: [] + Create a new package policy and assign it to an agent policy. + operationId: post-fleet-package-policies + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + requestBody: + content: + application/json: + examples: + postPackagePolicyRequestExample: + description: Create a new nginx package policy + value: + inputs: {} + name: nginx-1 + namespace: default + package: + name: nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + schema: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_create_package_policy_request' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_simplified_create_package_policy_request' + description: You should use inputs as an object and not use the deprecated inputs array. responses: '200': content: application/json: examples: - getLimitedPackagesExample: - description: List of packages that cannot be uninstalled + postPackagePolicyExample: + description: The created package policy value: - items: - - elastic_agent - - fleet_server + item: + created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-2 + inputs: [] + name: nginx-1 + namespace: default + package: + name: nginx + title: Nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + updated_at: '2024-01-15T10:00:00.000Z' schema: - additionalProperties: false - type: object - properties: - items: - items: - type: string - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_create_package_policy_response' description: Successful response '400': content: @@ -46763,425 +38670,117 @@ paths: - message - attributes description: Bad Request - summary: Get a limited package list + '409': + content: + application/json: + examples: + conflictExample: + description: A package policy with the same name already exists + value: + error: Conflict + message: An error message describing what went wrong + statusCode: 409 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Conflict + summary: Create a package policy tags: - - Elastic Package Manager (EPM) + - Fleet package policies x-metaTags: - content: Kibana, Elastic Cloud Serverless name: product_name - /api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs: - get: + /api/fleet/package_policies/_bulk_get: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs
+
post /s/{space_id}/api/fleet/package_policies/_bulk_get
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an inputs template for a package, used to pre-populate package policy forms.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-templates-pkgname-pkgversion-inputs + Get multiple package policies by ID. + operationId: post-fleet-package-policies-bulk-get parameters: - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf required: true schema: + example: 'true' type: string - - description: 'Output format for the inputs template: json, yml, or yaml' + - description: 'Format for the response: simplified or legacy' in: query name: format required: false schema: - default: json enum: - - json - - yml - - yaml + - simplified + - legacy type: string - - description: When true, allow prerelease versions - in: query - name: prerelease - required: false - schema: - type: boolean - - description: When true, return inputs even if the package signature cannot be verified - in: query - name: ignoreUnverified - required: false - schema: - type: boolean + requestBody: + content: + application/json: + examples: + postBulkGetPackagePoliciesRequestExample: + description: Retrieve multiple package policies by ID + value: + ids: + - package-policy-id-1 + - package-policy-id-2 + schema: + additionalProperties: false + type: object + properties: + ids: + description: list of package policy ids + items: + type: string + maxItems: 1000 + type: array + ignoreMissing: + type: boolean + required: + - ids responses: '200': content: application/json: examples: - getInputsTemplateExample: - description: Inputs template for a package + postBulkGetPackagePoliciesExample: + description: The requested package policies value: - inputs: - - description: Collect logs from log files - title: Collect logs from files - type: logfile - vars: - - name: paths - required: true - title: Paths - type: text + items: + - created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-1 + inputs: [] + name: nginx-1 + namespace: default + package: + name: nginx + title: Nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + updated_at: '2024-01-15T10:00:00.000Z' schema: - anyOf: - - type: string - - additionalProperties: false - type: object - properties: - connectors: - additionalProperties: - nullable: true - type: object - exporters: - additionalProperties: - nullable: true - type: object - extensions: - additionalProperties: - nullable: true - type: object - inputs: - items: - additionalProperties: false - type: object - properties: - id: - type: string - streams: - items: - additionalProperties: true - type: object - properties: - data_stream: - additionalProperties: true - type: object - properties: - dataset: - type: string - type: - type: string - required: - - dataset - id: - type: string - required: - - id - - data_stream - maxItems: 10000 - type: array - type: - type: string - required: - - id - - type - maxItems: 10000 - type: array - processors: - additionalProperties: - nullable: true - type: object - receivers: - additionalProperties: - nullable: true - type: object - service: - additionalProperties: false - type: object - properties: - extensions: - items: - type: string - maxItems: 1000 - type: array - pipelines: - additionalProperties: - additionalProperties: false - type: object - properties: - exporters: - items: - type: string - maxItems: 1000 - type: array - processors: - items: - type: string - maxItems: 1000 - type: array - receivers: - items: - type: string - maxItems: 1000 - type: array - type: object - required: - - inputs - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get an inputs template - tags: - - Elastic Package Manager (EPM) - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/epm/verification_key_id: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/epm/verification_key_id
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get the GPG key ID used to verify the signatures of packages from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-verification-key-id - parameters: [] - responses: - '200': - content: - application/json: - examples: - getVerificationKeyIdExample: - description: The GPG key ID used to verify package signatures - value: - id: D27D666CD88E42B4 - schema: - additionalProperties: false - type: object - properties: - id: - nullable: true - type: string - required: - - id - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get a package signature verification key ID - tags: - - Elastic Package Manager (EPM) - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/fleet_server_hosts: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/fleet_server_hosts
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - List all Fleet Server hosts.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-settings-read. - operationId: get-fleet-fleet-server-hosts - parameters: [] - responses: - '200': - content: - application/json: - examples: - getFleetServerHostsExample: - description: List of Fleet Server hosts - value: - items: - - host_urls: - - https://fleet-server.example.com:8220 - id: fleet-server-host-id-1 - is_default: true - is_preconfigured: false - name: Default Fleet Server - page: 1 - perPage: 20 - total: 1 - schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - name - - host_urls - - id - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_get_package_policies_response' description: Successful response '400': content: @@ -47206,6549 +38805,307 @@ paths: type: string message: type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get Fleet Server hosts - tags: - - Fleet Server hosts - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/fleet_server_hosts
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Create a new Fleet Server host.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: post-fleet-fleet-server-hosts - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - requestBody: - content: - application/json: - examples: - postFleetServerHostRequestExample: - description: Create a new Fleet Server host - value: - host_urls: - - https://fleet-server.example.com:8220 - is_default: false - name: My Fleet Server - schema: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - name - - host_urls - responses: - '200': - content: - application/json: - examples: - postFleetServerHostExample: - description: The created Fleet Server host - value: - item: - host_urls: - - https://fleet-server.example.com:8220 - id: fleet-server-host-id-2 - is_default: false - is_preconfigured: false - name: My Fleet Server - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - name - - host_urls - - id - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Create a Fleet Server host - tags: - - Fleet Server hosts - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/fleet_server_hosts/{itemId}: - delete: - description: |- - **Spaces method and path for this operation:** - -
delete /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Delete a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: delete-fleet-fleet-server-hosts-itemid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the Fleet Server host - in: path - name: itemId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - deleteFleetServerHostExample: - description: The Fleet Server host was successfully deleted - value: - id: fleet-server-host-id-1 - schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No Fleet Server host was found with the given ID - value: - error: Not Found - message: Fleet server fleet-server-host-id-1 not found - statusCode: 404 - description: Not Found - summary: Delete a Fleet Server host - tags: - - Fleet Server hosts - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-read. - operationId: get-fleet-fleet-server-hosts-itemid - parameters: - - description: The ID of the Fleet Server host - in: path - name: itemId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getFleetServerHostExample: - description: A Fleet Server host - value: - item: - host_urls: - - https://fleet-server.example.com:8220 - id: fleet-server-host-id-1 - is_default: true - is_preconfigured: false - name: Default Fleet Server - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - name - - host_urls - - id - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No Fleet Server host was found with the given ID - value: - error: Not Found - message: Fleet server fleet-server-host-id-1 not found - statusCode: 404 - description: Not Found - summary: Get a Fleet Server host - tags: - - Fleet Server hosts - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - put: - description: |- - **Spaces method and path for this operation:** - -
put /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Update a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: put-fleet-fleet-server-hosts-itemid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the Fleet Server host - in: path - name: itemId - required: true - schema: - type: string - requestBody: - content: - application/json: - examples: - putFleetServerHostRequestExample: - description: Update a Fleet Server host - value: - host_urls: - - https://updated-fleet-server.example.com:8220 - is_default: false - name: Updated Fleet Server - schema: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - is_default: - type: boolean - is_internal: - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - proxy_id - responses: - '200': - content: - application/json: - examples: - putFleetServerHostExample: - description: The updated Fleet Server host - value: - item: - host_urls: - - https://updated-fleet-server.example.com:8220 - id: fleet-server-host-id-1 - is_default: false - is_preconfigured: false - name: Updated Fleet Server - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - name - - host_urls - - id - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No Fleet Server host was found with the given ID - value: - error: Not Found - message: Fleet server fleet-server-host-id-1 not found - statusCode: 404 - description: Not Found - summary: Update a Fleet Server host - tags: - - Fleet Server hosts - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/health_check: - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/health_check
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Check the health status of a Fleet Server instance by its host ID. Returns the server status and name if available.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: post-fleet-health-check - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - requestBody: - content: - application/json: - examples: - postHealthCheckRequestExample: - description: Check the health of a Fleet Server instance by its host ID - value: - id: fleet-server-host-id-1 - schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - responses: - '200': - content: - application/json: - examples: - postHealthCheckHealthyExample: - description: Fleet Server is online and healthy - value: - name: fleet-server-1 - status: ONLINE - postHealthCheckUnreachableExample: - description: Fleet Server host is not reachable (request timed out or aborted) - value: - host_id: fleet-server-host-id-1 - status: OFFLINE - schema: - additionalProperties: false - type: object - properties: - host_id: - type: string - name: - type: string - status: - type: string - required: - - status - description: Successful health check response - '400': - content: - application/json: - examples: - badRequestExample: - description: The host ID exists but has no associated host URLs configured - value: - error: Bad Request - message: The requested host id fleet-server-host-id-1 does not have associated host urls. - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No Fleet Server host was found with the given ID - value: - error: Not Found - message: The requested host id fleet-server-host-id-1 does not exist. - statusCode: 404 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Not Found - summary: Check Fleet Server health - tags: - - Fleet internals - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/kubernetes: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/kubernetes
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get the Kubernetes manifest for deploying Elastic Agent.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. - operationId: get-fleet-kubernetes - parameters: - - description: If true, returns the manifest as a downloadable file - in: query - name: download - required: false - schema: - type: boolean - - description: Fleet Server host URL to include in the manifest - in: query - name: fleetServer - required: false - schema: - type: string - - description: Enrollment token to include in the manifest - in: query - name: enrolToken - required: false - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getK8sManifestExample: - description: The Kubernetes manifest for deploying Elastic Agent - value: - item: 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: agent-node-datastreams\n namespace: kube-system\n' - schema: - additionalProperties: false - type: object - properties: - item: - type: string - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get a full K8s agent manifest - tags: - - Elastic Agent policies - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/kubernetes/download: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/kubernetes/download
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Download the Kubernetes manifest for deploying Elastic Agent.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. - operationId: get-fleet-kubernetes-download - parameters: - - description: If true, returns the manifest as a downloadable file - in: query - name: download - required: false - schema: - type: boolean - - description: Fleet Server host URL to include in the manifest - in: query - name: fleetServer - required: false - schema: - type: string - - description: Enrollment token to include in the manifest - in: query - name: enrolToken - required: false - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getDownloadK8sManifestExample: - description: The Kubernetes manifest download - value: 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: agent-node-datastreams\n namespace: kube-system\n' - schema: - type: string - description: Successful response — returns the Kubernetes manifest as a YAML file download - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No manifest was found - value: - error: Not Found - message: Agent manifest not found - statusCode: 404 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Not Found - summary: Download an agent manifest - tags: - - Elastic Agent policies - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/logstash_api_keys: - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/logstash_api_keys
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Generate an API key for Logstash to use with a Fleet output.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: post-fleet-logstash-api-keys - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - responses: - '200': - content: - application/json: - examples: - postLogstashApiKeyExample: - description: The generated Logstash API key - value: - api_key: TiNAGG4BaaMdaH1tRfuU:KnR6yE41RrSowb0kQ0HWoA - schema: - additionalProperties: false - type: object - properties: - api_key: - type: string - required: - - api_key - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Generate a Logstash API key - tags: - - Fleet outputs - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/message_signing_service/rotate_key_pair: - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/message_signing_service/rotate_key_pair
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Rotate the key pair used by Fleet to sign messages sent to Elastic Agents. This operation is irreversible and requires all agents in the Fleet to be re-enrolled after rotation. You must explicitly acknowledge the risk by passing `acknowledge=true` as a query parameter.

[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all. - operationId: post-fleet-message-signing-service-rotate-key-pair - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: Set to true to confirm you understand the risks of rotating the key pair - in: query - name: acknowledge - required: false - schema: - default: false - type: boolean - responses: - '200': - content: - application/json: - examples: - rotateKeyPairSuccessExample: - description: The key pair was rotated. All agents must be re-enrolled to receive the new signing key. - value: - message: Key pair rotated successfully. - schema: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - description: Key pair rotated successfully - '400': - content: - application/json: - examples: - acknowledgeRequiredExample: - description: Request was rejected because the acknowledge query parameter was not set to true - value: - error: Bad Request - message: 'Warning: this API will cause a key pair to rotate and should not be necessary in normal operation. If you proceed, you may need to reinstall Agents in your network. You must acknowledge the risks of rotating the key pair with acknowledge=true in the request parameters. For more information, reach out to your administrator.' - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '500': - content: - application/json: - examples: - serviceUnavailableExample: - description: The message signing service is not available - value: - error: Internal Server Error - message: Failed to rotate key pair. Message signing service is unavailable! - statusCode: 500 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Internal Server Error - summary: Rotate a Fleet message signing key pair - tags: - - Message Signing Service - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/outputs: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/outputs
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - List all Fleet outputs.

[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read. - operationId: get-fleet-outputs - parameters: [] - responses: - '200': - content: - application/json: - examples: - getOutputsExample: - description: List of Fleet outputs - value: - items: - - hosts: - - https://elasticsearch.example.com:9200 - id: output-id-1 - is_default: true - is_default_monitoring: true - name: Default output - type: elasticsearch - page: 1 - perPage: 20 - total: 1 - schema: - additionalProperties: false - type: object - properties: - items: - items: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get outputs - tags: - - Fleet outputs - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/outputs
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Create a new Fleet output.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: post-fleet-outputs - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - requestBody: - content: - application/json: - examples: - postOutputRequestExample: - description: Create a new Elasticsearch output - value: - hosts: - - https://elasticsearch.example.com:9200 - is_default: false - is_default_monitoring: false - name: My output - type: elasticsearch - schema: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_kafka' - responses: - '200': - content: - application/json: - examples: - postOutputExample: - description: The created Fleet output - value: - item: - hosts: - - https://elasticsearch.example.com:9200 - id: output-id-2 - is_default: false - is_default_monitoring: false - name: My output - type: elasticsearch - schema: - additionalProperties: false - type: object - properties: - item: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Create output - tags: - - Fleet outputs - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/outputs/{outputId}: - delete: - description: |- - **Spaces method and path for this operation:** - -
delete /s/{space_id}/api/fleet/outputs/{outputId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Delete output by ID.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: delete-fleet-outputs-outputid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the output - in: path - name: outputId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - deleteOutputExample: - description: The output was successfully deleted - value: - id: output-id-1 - schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No output was found with the given ID - value: - error: Not Found - message: Output output-id-1 not found - statusCode: 404 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Not Found - summary: Delete output - tags: - - Fleet outputs - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/outputs/{outputId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get output by ID.

[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read. - operationId: get-fleet-outputs-outputid - parameters: - - description: The ID of the output - in: path - name: outputId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getOutputExample: - description: A Fleet output - value: - item: - hosts: - - https://elasticsearch.example.com:9200 - id: output-id-1 - is_default: true - is_default_monitoring: true - name: Default output - type: elasticsearch - schema: - additionalProperties: false - type: object - properties: - item: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No output was found with the given ID - value: - error: Not Found - message: Output output-id-1 not found - statusCode: 404 - description: Not Found - summary: Get output - tags: - - Fleet outputs - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - put: - description: |- - **Spaces method and path for this operation:** - -
put /s/{space_id}/api/fleet/outputs/{outputId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Update output by ID.

[Required authorization] Route required privileges: fleet-settings-all OR fleet-agent-policies-all. - operationId: put-fleet-outputs-outputid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the output - in: path - name: outputId - required: true - schema: - type: string - requestBody: - content: - application/json: - examples: - putOutputRequestExample: - description: Update a Fleet output - value: - hosts: - - https://updated-elasticsearch.example.com:9200 - name: Updated output - schema: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_kafka' - responses: - '200': - content: - application/json: - examples: - putOutputExample: - description: The updated Fleet output - value: - item: - hosts: - - https://updated-elasticsearch.example.com:9200 - id: output-id-1 - is_default: true - is_default_monitoring: true - name: Updated output - type: elasticsearch - schema: - additionalProperties: false - type: object - properties: - item: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No output was found with the given ID - value: - error: Not Found - message: Output output-id-1 not found - statusCode: 404 - description: Not Found - summary: Update output - tags: - - Fleet outputs - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/outputs/{outputId}/health: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/outputs/{outputId}/health
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get the latest health status of an output by ID.

[Required authorization] Route required privileges: fleet-settings-read. - operationId: get-fleet-outputs-outputid-health - parameters: - - description: The ID of the output - in: path - name: outputId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getOutputHealthExample: - description: The latest health status of a Fleet output - value: - message: '' - state: HEALTHY - timestamp: '2024-01-15T10:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - message: - description: long message if unhealthy - type: string - state: - description: state of output, HEALTHY or DEGRADED - type: string - timestamp: - description: timestamp of reported state - type: string - required: - - state - - message - - timestamp - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get the latest output health - tags: - - Fleet outputs - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/package_policies: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/package_policies
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - List all package policies. - operationId: get-fleet-package-policies - parameters: - - description: Page number - in: query - name: page - required: false - schema: - type: number - - description: Number of results per page - in: query - name: perPage - required: false - schema: - type: number - - description: Field to sort results by - in: query - name: sortField - required: false - schema: - type: string - - description: Sort order, ascending or descending - in: query - name: sortOrder - required: false - schema: - enum: - - desc - - asc - type: string - - description: When true, only show policies with available upgrades - in: query - name: showUpgradeable - required: false - schema: - type: boolean - - description: A KQL query string to filter results - in: query - name: kuery - required: false - schema: - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - - description: When true, include the agent count per package policy - in: query - name: withAgentCount - required: false - schema: - type: boolean - responses: - '200': - content: - application/json: - examples: - getPackagePoliciesExample: - description: List of package policies - value: - items: - - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-1 - inputs: [] - name: nginx-1 - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T10:00:00.000Z' - page: 1 - perPage: 20 - total: 1 - schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get package policies - tags: - - Fleet package policies - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/package_policies
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Create a new package policy and assign it to an agent policy. - operationId: post-fleet-package-policies - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - requestBody: - content: - application/json: - examples: - postPackagePolicyRequestExample: - description: Create a new nginx package policy - value: - inputs: {} - name: nginx-1 - namespace: default - package: - name: nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - schema: - anyOf: - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Package policy description - type: string - enabled: - type: boolean - force: - description: Force package policy creation even if the package is not verified, or if the agent policy is managed. - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier - type: string - inputs: - items: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - maxItems: 1000 - type: array - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - name - - inputs - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 100 - nullable: true - type: array - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Policy description. - type: string - force: - description: Force package policy creation even if the package is not verified, or if the agent policy is managed. - type: boolean - id: - description: Policy unique identifier. - type: string - inputs: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - name: - description: Unique name for the policy. - type: string - namespace: - description: Policy namespace. When not specified, it inherits the agent policy namespace. - type: string - output_id: - nullable: true - type: string - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - policy_id: - deprecated: true - description: Deprecated. Use policy_ids instead. - nullable: true - type: string - policy_ids: - description: IDs of the agent policies which that package policy will be added to. - items: - type: string - maxItems: 1000 - type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API. - nullable: true - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - required: - - name - - package - description: You should use inputs as an object and not use the deprecated inputs array. - responses: - '200': - content: - application/json: - examples: - postPackagePolicyExample: - description: The created package policy - value: - item: - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-2 - inputs: [] - name: nginx-1 - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T10:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '409': - content: - application/json: - examples: - conflictExample: - description: A package policy with the same name already exists - value: - error: Conflict - message: An error message describing what went wrong - statusCode: 409 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Conflict - summary: Create a package policy - tags: - - Fleet package policies - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/package_policies/_bulk_get: - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/package_policies/_bulk_get
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get multiple package policies by ID. - operationId: post-fleet-package-policies-bulk-get - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - requestBody: - content: - application/json: - examples: - postBulkGetPackagePoliciesRequestExample: - description: Retrieve multiple package policies by ID - value: - ids: - - package-policy-id-1 - - package-policy-id-2 - schema: - additionalProperties: false - type: object - properties: - ids: - description: list of package policy ids - items: - type: string - maxItems: 1000 - type: array - ignoreMissing: - type: boolean - required: - - ids - responses: - '200': - content: - application/json: - examples: - postBulkGetPackagePoliciesExample: - description: The requested package policies - value: - items: - - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-1 - inputs: [] - name: nginx-1 - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T10:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required: - - items - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: One or more package policies were not found - value: - error: Not Found - message: Package policy package-policy-id-2 not found - statusCode: 404 - schema: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - description: Not Found - summary: Bulk get package policies - tags: - - Fleet package policies - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - /api/fleet/package_policies/{packagePolicyId}: - delete: - description: |- - **Spaces method and path for this operation:** - -
delete /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Delete a package policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all. - operationId: delete-fleet-package-policies-packagepolicyid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the package policy - in: path - name: packagePolicyId - required: true - schema: - type: string - - description: When true, delete the package policy even if it is managed - in: query - name: force - required: false - schema: - type: boolean - responses: - '200': - content: - application/json: - examples: - deletePackagePolicyExample: - description: The package policy was successfully deleted - value: - id: package-policy-id-1 - schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Delete a package policy - tags: - - Fleet package policies - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get a package policy by ID. - operationId: get-fleet-package-policies-packagepolicyid - parameters: - - description: The ID of the package policy - in: path - name: packagePolicyId - required: true - schema: - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - responses: - '200': - content: - application/json: - examples: - getPackagePolicyExample: - description: A package policy - value: - item: - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-1 - inputs: [] - name: nginx-1 - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T10:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No package policy was found with the given ID - value: - error: Not Found - message: Package policy package-policy-id-1 not found - statusCode: 404 - schema: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - description: Not Found - summary: Get a package policy - tags: - - Fleet package policies - x-metaTags: - - content: Kibana, Elastic Cloud Serverless - name: product_name - put: - description: |- - **Spaces method and path for this operation:** - -
put /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Update a package policy by ID. - operationId: put-fleet-package-policies-packagepolicyid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the package policy - in: path - name: packagePolicyId - required: true - schema: - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - requestBody: - content: - application/json: - examples: - putPackagePolicyRequestExample: - description: Update a package policy - value: - enabled: true - inputs: {} - name: nginx-1-updated - namespace: default - package: - name: nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - schema: - anyOf: - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Package policy description - type: string - enabled: - type: boolean - force: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - inputs: - items: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - maxItems: 1000 - type: array - is_managed: - type: boolean - name: - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - version: - type: string - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 100 - nullable: true - type: array - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Policy description. - type: string - force: - description: Force package policy creation even if the package is not verified, or if the agent policy is managed. - type: boolean - id: - description: Policy unique identifier. - type: string - inputs: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - name: - description: Unique name for the policy. - type: string - namespace: - description: Policy namespace. When not specified, it inherits the agent policy namespace. - type: string - output_id: - nullable: true - type: string - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - policy_id: - deprecated: true - description: Deprecated. Use policy_ids instead. - nullable: true - type: string - policy_ids: - description: IDs of the agent policies which that package policy will be added to. - items: - type: string - maxItems: 1000 - type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API. - nullable: true - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - required: - - name - - package - responses: - '200': - content: - application/json: - examples: - putPackagePolicyExample: - description: The updated package policy - value: - item: - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-1 - inputs: [] - name: nginx-1-updated - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T11:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: One or more package policies were not found + value: + error: Not Found + message: Package policy package-policy-id-2 not found + statusCode: 404 + schema: + additionalProperties: false + type: object + properties: + message: + type: string + required: + - message + description: Not Found + summary: Bulk get package policies + tags: + - Fleet package policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + /api/fleet/package_policies/{packagePolicyId}: + delete: + description: |- + **Spaces method and path for this operation:** + +
delete /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Delete a package policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all. + operationId: delete-fleet-package-policies-packagepolicyid + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The ID of the package policy + in: path + name: packagePolicyId + required: true + schema: + type: string + - description: When true, delete the package policy even if it is managed + in: query + name: force + required: false + schema: + type: boolean + responses: + '200': + content: + application/json: + examples: + deletePackagePolicyExample: + description: The package policy was successfully deleted + value: + id: package-policy-id-1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_one_package_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Delete a package policy + tags: + - Fleet package policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get a package policy by ID. + operationId: get-fleet-package-policies-packagepolicyid + parameters: + - description: The ID of the package policy + in: path + name: packagePolicyId + required: true + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + responses: + '200': + content: + application/json: + examples: + getPackagePolicyExample: + description: A package policy + value: + item: + created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-1 + inputs: [] + name: nginx-1 + namespace: default package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string + name: nginx + title: Nginx + version: 1.20.0 policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by + - agent-policy-id-1 + updated_at: '2024-01-15T10:00:00.000Z' + schema: + additionalProperties: false + type: object + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + required: + - item + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No package policy was found with the given ID + value: + error: Not Found + message: Package policy package-policy-id-1 not found + statusCode: 404 + schema: + additionalProperties: false + type: object + properties: + message: + type: string + required: + - message + description: Not Found + summary: Get a package policy + tags: + - Fleet package policies + x-metaTags: + - content: Kibana, Elastic Cloud Serverless + name: product_name + put: + description: |- + **Spaces method and path for this operation:** + +
put /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Update a package policy by ID. + operationId: put-fleet-package-policies-packagepolicyid + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The ID of the package policy + in: path + name: packagePolicyId + required: true + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + requestBody: + content: + application/json: + examples: + putPackagePolicyRequestExample: + description: Update a package policy + value: + enabled: true + inputs: {} + name: nginx-1-updated + namespace: default + package: + name: nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + schema: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_policy_request' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_simplified_create_package_policy_request' + responses: + '200': + content: + application/json: + examples: + putPackagePolicyExample: + description: The updated package policy + value: + item: + created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-1 + inputs: [] + name: nginx-1-updated + namespace: default + package: + name: nginx + title: Nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + updated_at: '2024-01-15T11:00:00.000Z' + schema: + additionalProperties: false + type: object + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' required: - item description: Successful response @@ -53844,114 +39201,24 @@ paths: value: packagePolicyIds: - package-policy-id-1 - - package-policy-id-2 - schema: - additionalProperties: false - type: object - properties: - force: - type: boolean - packagePolicyIds: - items: - type: string - maxItems: 1000 - type: array - required: - - packagePolicyIds - responses: - '200': - content: - application/json: - examples: - postDeletePackagePoliciesExample: - description: Results of the bulk delete operation - value: - - id: package-policy-id-1 - success: true - - id: package-policy-id-2 - success: true - schema: - items: - additionalProperties: false - type: object - properties: - body: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - id: - type: string - name: - type: string - output_id: - nullable: true - type: string - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - policy_id: - deprecated: true - description: Use `policy_ids` instead - nullable: true - type: string - policy_ids: - items: - type: string - maxItems: 10000 - type: array - statusCode: - type: number - success: - type: boolean - required: - - id - - success - - policy_ids - - package + - package-policy-id-2 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_package_policies_request' + responses: + '200': + content: + application/json: + examples: + postDeletePackagePoliciesExample: + description: Results of the bulk delete operation + value: + - id: package-policy-id-1 + success: true + - id: package-policy-id-2 + success: true + schema: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_status_response' maxItems: 10000 type: array description: Successful response @@ -54019,16 +39286,7 @@ paths: packagePolicyIds: - package-policy-id-1 schema: - additionalProperties: false - type: object - properties: - packagePolicyIds: - items: - type: string - maxItems: 1000 - type: array - required: - - packagePolicyIds + $ref: '#/components/schemas/Kibana_HTTP_APIs_upgrade_package_policies_request' responses: '200': content: @@ -54042,28 +39300,7 @@ paths: success: true schema: items: - additionalProperties: false - type: object - properties: - body: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - id: - type: string - name: - type: string - statusCode: - type: number - success: - type: boolean - required: - - id - - success + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_status_response' maxItems: 10000 type: array description: Successful response @@ -54131,18 +39368,7 @@ paths: packagePolicyIds: - package-policy-id-1 schema: - additionalProperties: false - type: object - properties: - packagePolicyIds: - items: - type: string - maxItems: 1000 - type: array - packageVersion: - type: string - required: - - packagePolicyIds + $ref: '#/components/schemas/Kibana_HTTP_APIs_dry_run_package_policies_request' responses: '200': content: @@ -54279,947 +39505,8 @@ paths: diff: items: anyOf: - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - revision - - updated_at - - updated_by - - created_at - - created_by - - additionalProperties: true - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - errors: - items: - additionalProperties: false - type: object - properties: - key: - type: string - message: - type: string - required: - - message - maxItems: 10 - type: array - force: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - type: string - inputs: - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - is_managed: - type: boolean - missingVars: - items: - type: string - maxItems: 100 - type: array - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs + - $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_dry_run_package_policy' maxItems: 2 type: array hasErrors: @@ -84183,6 +68470,336 @@ components: type: boolean required: - data_view + Kibana_HTTP_APIs_action_id_response: + additionalProperties: false + properties: + actionId: + type: string + required: + - actionId + title: action_id_response + type: object + Kibana_HTTP_APIs_action_message_response: + additionalProperties: false + properties: + message: + type: string + required: + - message + title: action_message_response + type: object + Kibana_HTTP_APIs_agent_policy_response: + additionalProperties: false + properties: + advanced_settings: + additionalProperties: false + type: object + properties: + agent_download_target_directory: + nullable: true + agent_download_timeout: + nullable: true + agent_features_disable_policy_change_acks_enabled: + nullable: true + agent_internal: + nullable: true + agent_limits_go_max_procs: + nullable: true + agent_logging_files_interval: + nullable: true + agent_logging_files_keepfiles: + nullable: true + agent_logging_files_rotateeverybytes: + nullable: true + agent_logging_level: + nullable: true + agent_logging_metrics_period: + nullable: true + agent_logging_to_files: + nullable: true + agent_monitoring_runtime_experimental: + nullable: true + agent_features: + items: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + maxItems: 100 + type: array + agentless: + additionalProperties: false + type: object + properties: + cloud_connectors: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + target_csp: + enum: + - aws + - azure + - gcp + type: string + required: + - enabled + cluster_id: + type: string + resources: + additionalProperties: false + type: object + properties: + requests: + additionalProperties: false + type: object + properties: + cpu: + type: string + memory: + type: string + agents: + type: number + agents_per_version: + items: + additionalProperties: false + type: object + properties: + count: + type: number + version: + type: string + required: + - version + - count + maxItems: 1000 + type: array + created_at: + type: string + data_output_id: + nullable: true + type: string + description: + type: string + download_source_id: + nullable: true + type: string + fips_agents: + type: number + fleet_server_host_id: + nullable: true + type: string + global_data_tags: + description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. + items: + additionalProperties: false + type: object + properties: + name: + type: string + value: + anyOf: + - type: string + - type: number + required: + - name + - value + maxItems: 100 + type: array + has_agent_version_conditions: + type: boolean + has_fleet_server: + type: boolean + id: + type: string + inactivity_timeout: + default: 1209600 + minimum: 0 + type: number + is_default: + type: boolean + is_default_fleet_server: + type: boolean + is_managed: + type: boolean + is_preconfigured: + type: boolean + is_protected: + description: Indicates whether the agent policy has tamper protection enabled. Defaults to `false`. + type: boolean + is_verifier: + type: boolean + keep_monitoring_alive: + default: false + description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled + nullable: true + type: boolean + min_agent_version: + nullable: true + type: string + monitoring_diagnostics: + additionalProperties: false + type: object + properties: + limit: + additionalProperties: false + type: object + properties: + burst: + type: number + interval: + type: string + uploader: + additionalProperties: false + type: object + properties: + init_dur: + type: string + max_dur: + type: string + max_retries: + type: number + monitoring_enabled: + items: + enum: + - logs + - metrics + - traces + type: string + maxItems: 3 + type: array + monitoring_http: + additionalProperties: false + type: object + properties: + buffer: + additionalProperties: false + type: object + properties: + enabled: + default: false + type: boolean + enabled: + type: boolean + host: + type: string + port: + maximum: 65353 + minimum: 0 + type: number + monitoring_output_id: + nullable: true + type: string + monitoring_pprof_enabled: + type: boolean + name: + minLength: 1 + type: string + namespace: + minLength: 1 + type: string + overrides: + additionalProperties: + nullable: true + description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + package_agent_version_conditions: + items: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + version_condition: + type: string + required: + - name + - title + - version_condition + maxItems: 1000 + nullable: true + type: array + package_policies: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the `?full=true` parameter + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + maxItems: 10000 + type: array + required_versions: + items: + additionalProperties: false + type: object + properties: + percentage: + description: Target percentage of agents to auto upgrade + maximum: 100 + minimum: 0 + type: number + version: + description: Target version for automatic agent upgrade + type: string + required: + - version + - percentage + maxItems: 100 + nullable: true + type: array + revision: + type: number + schema_version: + type: string + space_ids: + items: + type: string + maxItems: 100 + type: array + status: + enum: + - active + - inactive + type: string + supports_agentless: + default: false + description: Indicates whether the agent policy supports agentless integrations. + nullable: true + type: boolean + unenroll_timeout: + minimum: 0 + type: number + unprivileged_agents: + type: number + updated_at: + type: string + updated_by: + type: string + version: + type: string + required: + - id + - name + - namespace + - is_protected + - status + - updated_at + - updated_by + - revision + title: agent_policy_response + type: object Kibana_HTTP_APIs_aiops_change_point_chart: additionalProperties: false description: Change point detection chart embeddable schema @@ -85091,6 +69708,314 @@ components: - schedule title: backfill_response type: object + Kibana_HTTP_APIs_bulk_delete_enrollment_api_keys_request: + additionalProperties: false + properties: + forceDelete: + default: false + description: When false (default), invalidate the API key and mark the token as inactive. When true, also delete the token document. + type: boolean + includeHidden: + default: false + description: When true, allow deletion of hidden enrollment tokens (managed/agentless policies). Defaults to false. + type: boolean + kuery: + description: KQL query to select enrollment tokens to delete. + type: string + tokenIds: + description: List of enrollment token IDs to delete. + items: + type: string + maxItems: 10000 + type: array + title: bulk_delete_enrollment_api_keys_request + type: object + Kibana_HTTP_APIs_bulk_delete_enrollment_api_keys_response: + additionalProperties: false + properties: + action: + type: string + count: + type: number + errorCount: + type: number + successCount: + type: number + required: + - action + - count + - successCount + - errorCount + title: bulk_delete_enrollment_api_keys_response + type: object + Kibana_HTTP_APIs_bulk_get_agent_policies_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_agent_policy_response' + maxItems: 10000 + type: array + required: + - items + title: bulk_get_agent_policies_response + type: object + Kibana_HTTP_APIs_bulk_get_package_policies_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + maxItems: 10000 + type: array + required: + - items + title: bulk_get_package_policies_response + type: object + Kibana_HTTP_APIs_bulk_install_packages_from_registry_request: + additionalProperties: false + properties: + force: + default: false + type: boolean + packages: + items: + anyOf: + - type: string + - additionalProperties: false + type: object + properties: + name: + type: string + prerelease: + type: boolean + version: + type: string + required: + - name + - version + maxItems: 1000 + minItems: 1 + type: array + required: + - packages + title: bulk_install_packages_from_registry_request + type: object + Kibana_HTTP_APIs_bulk_install_packages_from_registry_response: + additionalProperties: false + properties: + items: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_install_packages_response_item_success' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_install_packages_response_item_error' + maxItems: 10000 + type: array + required: + - items + title: bulk_install_packages_from_registry_response + type: object + Kibana_HTTP_APIs_bulk_install_packages_response_item_error: + additionalProperties: false + properties: + error: + anyOf: + - type: string + - nullable: true + name: + type: string + statusCode: + type: number + required: + - name + - statusCode + title: bulk_install_packages_response_item_error + type: object + Kibana_HTTP_APIs_bulk_install_packages_response_item_success: + additionalProperties: false + properties: + name: + type: string + result: + additionalProperties: false + type: object + properties: + assets: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_es_asset_reference' + maxItems: 10000 + type: array + error: + nullable: true + installSource: + type: string + installType: + type: string + status: + enum: + - installed + - already_installed + type: string + required: + - error + - installType + version: + type: string + required: + - name + - version + - result + title: bulk_install_packages_response_item_success + type: object + Kibana_HTTP_APIs_bulk_namespace_customization_request: + additionalProperties: false + properties: + disable: + description: Namespaces to disable namespace-level customization for on each package. + items: + type: string + maxItems: 100 + type: array + enable: + description: Namespaces to enable namespace-level customization for on each package. + items: + type: string + maxItems: 100 + type: array + packages: + description: Package names to apply the customization changes to. + items: + type: string + maxItems: 1000 + minItems: 1 + type: array + required: + - packages + title: bulk_namespace_customization_request + type: object + Kibana_HTTP_APIs_bulk_namespace_customization_response: + additionalProperties: false + properties: + items: + items: + additionalProperties: false + type: object + properties: + error: + type: string + name: + type: string + namespace_customization_enabled_for: + description: 'The opt-in list on the package. Returned whenever the package is installed: the new list on success, or the unchanged list when the request is rejected (for example, because of a namespace-prefix restriction).' + items: + type: string + maxItems: 100 + type: array + success: + type: boolean + required: + - name + - success + maxItems: 1000 + type: array + required: + - items + title: bulk_namespace_customization_response + type: object + Kibana_HTTP_APIs_bulk_rollback_packages_request: + additionalProperties: false + properties: + packages: + items: + additionalProperties: false + type: object + properties: + name: + description: Package name to rollback + type: string + required: + - name + maxItems: 1000 + minItems: 1 + type: array + required: + - packages + title: bulk_rollback_packages_request + type: object + Kibana_HTTP_APIs_bulk_rollback_packages_response: + additionalProperties: false + properties: + taskId: + type: string + required: + - taskId + title: bulk_rollback_packages_response + type: object + Kibana_HTTP_APIs_bulk_uninstall_packages_request: + additionalProperties: false + properties: + force: + default: false + type: boolean + packages: + items: + additionalProperties: false + type: object + properties: + name: + type: string + version: + type: string + required: + - name + - version + maxItems: 1000 + minItems: 1 + type: array + required: + - packages + title: bulk_uninstall_packages_request + type: object + Kibana_HTTP_APIs_bulk_upgrade_packages_request: + additionalProperties: false + properties: + force: + default: false + type: boolean + packages: + items: + additionalProperties: false + type: object + properties: + name: + type: string + version: + type: string + required: + - name + maxItems: 1000 + minItems: 1 + type: array + prerelease: + type: boolean + upgrade_package_policies: + default: false + type: boolean + required: + - packages + title: bulk_upgrade_packages_request + type: object + Kibana_HTTP_APIs_bulk_upgrade_packages_response: + additionalProperties: false + properties: + taskId: + type: string + required: + - taskId + title: bulk_upgrade_packages_response + type: object Kibana_HTTP_APIs_byteFormat: additionalProperties: false description: Data size format in bits or bytes, with optional decimal places and suffix. @@ -85154,6 +70079,25 @@ components: - mapping title: Categorical Color Mapping type: object + Kibana_HTTP_APIs_category_summary_item: + additionalProperties: false + properties: + count: + type: number + id: + type: string + parent_id: + type: string + parent_title: + type: string + title: + type: string + required: + - id + - title + - count + title: category_summary_item + type: object Kibana_HTTP_APIs_ClassicFieldDefinition: additionalProperties: $ref: '#/components/schemas/Kibana_HTTP_APIs_ClassicFieldDefinitionConfig' @@ -85628,6 +70572,18 @@ components: - routing required: - objects + Kibana_HTTP_APIs_copy_agent_policy_request: + additionalProperties: false + properties: + description: + type: string + name: + minLength: 1 + type: string + required: + - name + title: copy_agent_policy_request + type: object Kibana_HTTP_APIs_core_status_redactedResponse: additionalProperties: false description: A minimal representation of Kibana's operational status. Returned when the caller is unauthenticated or lacks the `monitor` cluster privilege. @@ -85975,6 +70931,335 @@ components: - operation title: Count Metric Operation type: object + Kibana_HTTP_APIs_create_custom_integration_request: + additionalProperties: false + properties: + datasets: + items: + additionalProperties: false + type: object + properties: + name: + type: string + type: + enum: + - logs + - metrics + - traces + - synthetics + - profiling + type: string + required: + - name + - type + maxItems: 10 + type: array + force: + type: boolean + integrationName: + type: string + required: + - integrationName + - datasets + title: create_custom_integration_request + type: object + Kibana_HTTP_APIs_create_package_policy_request: + additionalProperties: false + properties: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. + items: + type: string + maxItems: 1000 + nullable: true + type: array + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. + nullable: true + type: string + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 + nullable: true + type: string + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' + type: string + description: + description: Package policy description + type: string + enabled: + type: boolean + force: + description: Force package policy creation even if the package is not verified, or if the agent policy is managed. + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + nullable: true + type: array + id: + description: Package policy unique identifier + type: string + inputs: + items: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + name: + type: string + policy_template: + type: string + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: + additionalProperties: false + type: object + properties: + dataset: + type: string + elasticsearch: + additionalProperties: false + type: object + properties: + dynamic_dataset: + type: boolean + dynamic_namespace: + type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string + required: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - enabled + - data_stream + - compiled_stream + maxItems: 1000 + type: array + type: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - type + - enabled + maxItems: 1000 + type: array + is_managed: + type: boolean + name: + description: Unique name for the package policy. + type: string + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: + nullable: true + type: string + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. + nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + spaceIds: + items: + type: string + maxItems: 100 + type: array + supports_agentless: + default: false + deprecated: true + description: Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API. + nullable: true + type: boolean + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. + nullable: true + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - name + - inputs + title: create_package_policy_request + type: object + Kibana_HTTP_APIs_create_package_policy_response: + additionalProperties: false + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + required: + - item + title: create_package_policy_response + type: object Kibana_HTTP_APIs_cumulativeSumOperation: additionalProperties: false properties: @@ -88115,43 +73400,494 @@ components: type: string use_original_time_range: default: false - description: When `true`, uses the original time range instead of the current query time range. + description: When `true`, uses the original time range instead of the current query time range. + type: boolean + required: + - operation + - field + title: Date Histogram Operation + type: object + Kibana_HTTP_APIs_delete_agent_policy_request: + additionalProperties: false + properties: + agentPolicyId: + description: The ID of the agent policy + type: string + force: + description: bypass validation checks that can prevent agent policy deletion + type: boolean + required: + - agentPolicyId + title: delete_agent_policy_request + type: object + Kibana_HTTP_APIs_delete_agent_policy_response: + additionalProperties: false + properties: + id: + type: string + name: + type: string + required: + - id + - name + title: delete_agent_policy_response + type: object + Kibana_HTTP_APIs_delete_enrollment_api_key_response: + additionalProperties: false + properties: + action: + enum: + - deleted + type: string + required: + - action + title: delete_enrollment_api_key_response + type: object + Kibana_HTTP_APIs_delete_one_package_policy_response: + additionalProperties: false + properties: + id: + type: string + required: + - id + title: delete_one_package_policy_response + type: object + Kibana_HTTP_APIs_delete_package_datastream_assets_response: + additionalProperties: false + properties: + success: + type: boolean + required: + - success + title: delete_package_datastream_assets_response + type: object + Kibana_HTTP_APIs_delete_package_policies_request: + additionalProperties: false + properties: + force: + type: boolean + packagePolicyIds: + items: + type: string + maxItems: 1000 + type: array + required: + - packagePolicyIds + title: delete_package_policies_request + type: object + Kibana_HTTP_APIs_delete_package_response: + additionalProperties: false + properties: + items: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_es_asset_reference' + maxItems: 10000 + type: array + required: + - items + title: delete_package_response + type: object + Kibana_HTTP_APIs_deprecation_info: + additionalProperties: false + properties: + description: + type: string + replaced_by: + additionalProperties: + type: string + type: object + since: + type: string + required: + - description + title: deprecation_info + type: object + Kibana_HTTP_APIs_differencesOperation: + additionalProperties: false + properties: + filter: + $ref: '#/components/schemas/Kibana_HTTP_APIs_filterSimple' + format: + $ref: '#/components/schemas/Kibana_HTTP_APIs_formatType' + label: + description: Label for the operation + type: string + of: + $ref: '#/components/schemas/Kibana_HTTP_APIs_fieldMetricOperations' + operation: + enum: + - differences + type: string + reduced_time_range: + description: Reduced time range + title: Operation Reduced Time Range Setting + type: string + time_scale: + $ref: '#/components/schemas/Kibana_HTTP_APIs_operationTimeScaleSetting' + time_shift: + description: Time shift + title: Operation Time Shift Setting + type: string + required: + - operation + - of + title: Differences Operation + type: object + Kibana_HTTP_APIs_dry_run_package_policies_request: + additionalProperties: false + properties: + packagePolicyIds: + items: + type: string + maxItems: 1000 + type: array + packageVersion: + type: string + required: + - packagePolicyIds + title: dry_run_package_policies_request + type: object + Kibana_HTTP_APIs_dry_run_package_policy: + additionalProperties: true + properties: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. + items: + type: string + maxItems: 1000 + nullable: true + type: array + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. + nullable: true + type: string + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 + nullable: true + type: string + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' + type: string + created_at: + type: string + created_by: + type: string + description: + description: Package policy description + type: string + elasticsearch: + additionalProperties: true + type: object + properties: + privileges: + additionalProperties: true + type: object + properties: + cluster: + items: + type: string + maxItems: 100 + type: array + enabled: + type: boolean + errors: + items: + additionalProperties: false + type: object + properties: + key: + type: string + message: + type: string + required: + - message + maxItems: 10 + type: array + force: + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + nullable: true + type: array + id: + type: string + inputs: + items: + additionalProperties: false + type: object + properties: + compiled_input: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + name: + type: string + policy_template: + type: string + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: + additionalProperties: false + type: object + properties: + dataset: + type: string + elasticsearch: + additionalProperties: false + type: object + properties: + dynamic_dataset: + type: boolean + dynamic_namespace: + type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string + required: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - enabled + - data_stream + - compiled_stream + maxItems: 1000 + type: array + type: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - type + - enabled + - streams + - compiled_input + maxItems: 100 + type: array + is_managed: + type: boolean + missingVars: + items: + type: string + maxItems: 100 + type: array + name: + description: Unique name for the package policy. + type: string + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: + nullable: true + type: string + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. + nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + revision: + type: number + secret_references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 1000 + type: array + supports_agentless: + default: false + description: Indicates whether the package policy belongs to an agentless agent policy. + nullable: true type: boolean - required: - - operation - - field - title: Date Histogram Operation - type: object - Kibana_HTTP_APIs_differencesOperation: - additionalProperties: false - properties: - filter: - $ref: '#/components/schemas/Kibana_HTTP_APIs_filterSimple' - format: - $ref: '#/components/schemas/Kibana_HTTP_APIs_formatType' - label: - description: Label for the operation - type: string - of: - $ref: '#/components/schemas/Kibana_HTTP_APIs_fieldMetricOperations' - operation: - enum: - - differences + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. + nullable: true + type: boolean + updated_at: type: string - reduced_time_range: - description: Reduced time range - title: Operation Reduced Time Range Setting + updated_by: type: string - time_scale: - $ref: '#/components/schemas/Kibana_HTTP_APIs_operationTimeScaleSetting' - time_shift: - description: Time shift - title: Operation Time Shift Setting + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + version: + description: Package policy ES version. type: string required: - - operation - - of - title: Differences Operation + - name + - enabled + - inputs + title: dry_run_package_policy type: object Kibana_HTTP_APIs_durationFormat: additionalProperties: false @@ -88176,6 +73912,79 @@ components: - to title: Duration Format type: object + Kibana_HTTP_APIs_enrollment_api_key: + additionalProperties: false + properties: + active: + description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. + type: boolean + api_key: + description: The enrollment API key (token) used for enrolling Elastic Agents. + type: string + api_key_id: + description: The ID of the API key in the Security API. + type: string + created_at: + type: string + hidden: + type: boolean + id: + type: string + name: + description: The name of the enrollment API key. + type: string + policy_id: + description: The ID of the agent policy the Elastic Agent will be enrolled in. + type: string + required: + - id + - api_key_id + - api_key + - active + - created_at + title: enrollment_api_key + type: object + Kibana_HTTP_APIs_enrollment_api_key_response: + additionalProperties: false + properties: + action: + enum: + - created + type: string + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key' + required: + - item + - action + title: enrollment_api_key_response + type: object + Kibana_HTTP_APIs_es_asset_reference: + additionalProperties: false + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + - knowledge_base + - esql_view + type: string + version: + type: string + required: + - id + - type + title: es_asset_reference + type: object Kibana_HTTP_APIs_es-query-create-rule-body-alerting: additionalProperties: false properties: @@ -88845,6 +74654,512 @@ components: - formula title: Formula Operation type: object + Kibana_HTTP_APIs_full_agent_policy: + additionalProperties: false + properties: + agent: + additionalProperties: false + type: object + properties: + download: + additionalProperties: false + type: object + properties: + auth: + additionalProperties: false + type: object + properties: + api_key: + type: string + headers: + items: + additionalProperties: false + type: object + properties: + key: + type: string + value: + type: string + required: + - key + - value + maxItems: 100 + type: array + password: + type: string + username: + type: string + proxy_headers: + additionalProperties: + anyOf: + - type: string + - type: boolean + - type: number + nullable: true + type: object + proxy_url: + type: string + secrets: + additionalProperties: true + type: object + properties: + ssl: + additionalProperties: true + type: object + properties: + key: + additionalProperties: true + type: object + properties: + id: + type: string + required: + - key + sourceURI: + type: string + ssl: + additionalProperties: false + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + key: + type: string + renegotiation: + type: string + verification_mode: + type: string + target_directory: + type: string + timeout: + type: string + required: + - sourceURI + features: + additionalProperties: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + required: + - enabled + type: object + internal: + nullable: true + limits: + additionalProperties: false + type: object + properties: + go_max_procs: + type: number + logging: + additionalProperties: false + type: object + properties: + files: + additionalProperties: false + type: object + properties: + interval: + type: string + keepfiles: + type: number + rotateeverybytes: + type: number + level: + type: string + metrics: + additionalProperties: false + type: object + properties: + period: + type: string + to_files: + type: boolean + monitoring: + additionalProperties: false + type: object + properties: + _runtime_experimental: + type: string + apm: + nullable: true + diagnostics: + additionalProperties: false + type: object + properties: + limit: + additionalProperties: false + type: object + properties: + burst: + type: number + interval: + type: string + uploader: + additionalProperties: false + type: object + properties: + init_dur: + type: string + max_dur: + type: string + max_retries: + type: number + enabled: + type: boolean + http: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: number + logs: + type: boolean + metrics: + type: boolean + namespace: + type: string + pprof: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + required: + - enabled + traces: + type: boolean + use_output: + type: string + required: + - enabled + - metrics + - logs + - traces + - apm + protection: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + signing_key: + type: string + uninstall_token_hash: + type: string + required: + - enabled + - uninstall_token_hash + - signing_key + required: + - monitoring + - download + - features + - internal + connectors: + additionalProperties: + nullable: true + type: object + exporters: + additionalProperties: + nullable: true + type: object + extensions: + additionalProperties: + nullable: true + type: object + fleet: + anyOf: + - additionalProperties: false + type: object + properties: + hosts: + items: + type: string + maxItems: 100 + type: array + proxy_headers: + additionalProperties: + anyOf: + - type: string + - type: boolean + - type: number + nullable: true + type: object + proxy_url: + type: string + secrets: + additionalProperties: true + type: object + properties: + ssl: + additionalProperties: true + type: object + properties: + key: + additionalProperties: true + type: object + properties: + id: + type: string + required: + - key + ssl: + additionalProperties: false + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + key: + type: string + renegotiation: + type: string + verification_mode: + type: string + required: + - hosts + - additionalProperties: false + type: object + properties: + kibana: + additionalProperties: false + type: object + properties: + hosts: + items: + type: string + maxItems: 100 + type: array + path: + type: string + protocol: + type: string + required: + - hosts + - protocol + required: + - kibana + id: + type: string + inputs: + items: + additionalProperties: true + type: object + properties: + data_stream: + additionalProperties: true + type: object + properties: + namespace: + type: string + required: + - namespace + id: + type: string + meta: + additionalProperties: true + type: object + properties: + package: + additionalProperties: true + type: object + properties: + name: + type: string + version: + type: string + required: + - name + - version + name: + type: string + package_policy_id: + type: string + processors: + items: + additionalProperties: true + type: object + properties: + add_fields: + additionalProperties: true + type: object + properties: + fields: + additionalProperties: + anyOf: + - type: string + - type: number + type: object + target: + type: string + required: + - target + - fields + required: + - add_fields + maxItems: 10000 + type: array + revision: + type: number + streams: + items: + additionalProperties: true + type: object + properties: + data_stream: + additionalProperties: true + type: object + properties: + dataset: + type: string + type: + type: string + required: + - dataset + id: + type: string + required: + - id + - data_stream + maxItems: 10000 + type: array + type: + type: string + use_output: + type: string + required: + - id + - name + - revision + - type + - data_stream + - use_output + - package_policy_id + maxItems: 10000 + type: array + namespaces: + items: + type: string + maxItems: 100 + type: array + output_permissions: + additionalProperties: + additionalProperties: + nullable: true + type: object + type: object + outputs: + additionalProperties: + additionalProperties: true + type: object + properties: + ca_sha256: + nullable: true + type: string + hosts: + items: + type: string + maxItems: 100 + type: array + proxy_headers: + additionalProperties: + anyOf: + - type: string + - type: boolean + - type: number + nullable: true + type: object + proxy_url: + type: string + type: + type: string + required: + - type + type: object + processors: + additionalProperties: + nullable: true + type: object + receivers: + additionalProperties: + nullable: true + type: object + revision: + type: number + secret_references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 10000 + type: array + service: + additionalProperties: false + type: object + properties: + extensions: + items: + type: string + maxItems: 1000 + type: array + pipelines: + additionalProperties: + additionalProperties: false + type: object + properties: + exporters: + items: + type: string + maxItems: 1000 + type: array + processors: + items: + type: string + maxItems: 1000 + type: array + receivers: + items: + type: string + maxItems: 1000 + type: array + type: object + signed: + additionalProperties: false + type: object + properties: + data: + type: string + signature: + type: string + required: + - data + - signature + required: + - id + - outputs + - inputs + title: full_agent_policy + type: object Kibana_HTTP_APIs_gaugeESQL: additionalProperties: false description: Gauge configuration using an ES|QL query. @@ -89900,242 +76215,1006 @@ components: - type title: url_drilldown type: object - maxItems: 100 + maxItems: 100 + type: array + filters: + $ref: '#/components/schemas/Kibana_HTTP_APIs_lensPanelFilters' + hide_border: + type: boolean + hide_title: + type: boolean + ignore_global_filters: + default: false + description: When `true`, ignores global filters when fetching data for this layer. Defaults to `false`. + type: boolean + metric: + anyOf: + - anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricCountMetric' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricUniqueCountMetric' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricStatsMetric' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricSumMetric' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricLastValue' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricPercentile' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricPercentileRanks' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricFormula' + query: + $ref: '#/components/schemas/Kibana_HTTP_APIs_filterSimple' + references: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_kbn-content-management-utils-referenceSchema' + type: array + sampling: + default: 1 + description: Sampling factor between 0 (no sampling) and 1 (full sampling). + maximum: 1 + minimum: 0 + type: number + styling: + $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeStyling' + time_range: + $ref: '#/components/schemas/Kibana_HTTP_APIs_kbn-es-query-server-timeRangeSchema' + title: + type: string + type: + enum: + - gauge + type: string + required: + - type + - data_source + - metric + title: Gauge Chart (DSL) + type: object + Kibana_HTTP_APIs_gaugeShapeBullet: + additionalProperties: false + description: Bullet gauge shape. + properties: + orientation: + $ref: '#/components/schemas/Kibana_HTTP_APIs_vis_api_simple_orientation' + type: + enum: + - bullet + type: string + required: + - type + title: Shape (Bullet) + type: object + Kibana_HTTP_APIs_gaugeShapeCircular: + additionalProperties: false + description: Circular gauge shape. + properties: + type: + enum: + - circle + - semi_circle + - arc + type: string + required: + - type + title: Shape (Circular) + type: object + Kibana_HTTP_APIs_gaugeStyling: + additionalProperties: false + description: Visual chart styling options + properties: + shape: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeShapeBullet' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeShapeCircular' + title: Gauge styling + type: object + Kibana_HTTP_APIs_geo-containment-create-rule-body-alerting: + additionalProperties: false + properties: + actions: + default: [] + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_new_rule_action' + type: array + alert_delay: + additionalProperties: false + description: Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions. + type: object + properties: + active: + description: The number of consecutive runs that must meet the rule conditions. + type: number + required: + - active + artifacts: + additionalProperties: false + type: object + properties: + dashboards: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 10 + type: array + investigation_guide: + additionalProperties: false + type: object + properties: + blob: + maxLength: 10000 + type: string + required: + - blob + consumer: + description: 'The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.' + type: string + enabled: + default: true + description: Indicates whether you want the rule to run on an interval basis after it is created. + type: boolean + flapping: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_rule_flapping' + nullable: true + name: + description: The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule. + type: string + notify_when: + description: 'Indicates how frequently rule actions are triggered. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. You cannot specify `notify_when` at both the rule and action level. The recommended approach is to set it for each action individually. If you set `notify_when` at the rule level and then edit the rule, it will automatically be converted to action-specific values.' + enum: + - onActionGroupChange + - onActiveAlert + - onThrottleInterval + nullable: true + type: string + params: + additionalProperties: false + description: The parameters for the geo containment rule. These parameters are appropriate when `rule_type_id` is `.geo-containment`. + properties: + boundaryGeoField: + minLength: 1 + type: string + boundaryIndexId: + minLength: 1 + type: string + boundaryIndexQuery: + nullable: true + boundaryIndexTitle: + minLength: 1 + type: string + boundaryNameField: + minLength: 1 + type: string + boundaryType: + minLength: 1 + type: string + dateField: + minLength: 1 + type: string + entity: + minLength: 1 + type: string + geoField: + minLength: 1 + type: string + index: + minLength: 1 + type: string + indexId: + minLength: 1 + type: string + indexQuery: + nullable: true + required: + - index + - indexId + - geoField + - entity + - dateField + - boundaryType + - boundaryIndexTitle + - boundaryIndexId + - boundaryGeoField + - indexQuery + - boundaryIndexQuery + title: Geo Containment Rule Params + type: object + rule_type_id: + enum: + - .geo-containment + type: string + schedule: + additionalProperties: false + description: The check interval, which specifies how frequently the rule conditions are checked. + type: object + properties: + interval: + description: The interval is specified in seconds, minutes, hours, or days. + type: string + required: + - interval + tags: + default: [] + description: The tags for the rule. + items: + type: string + type: array + throttle: + description: Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how frequently rule actions are triggered. You cannot specify the throttle interval at both the rule and action level. If you set the throttle interval at the rule level and then edit the rule, it will automatically be converted to action-specific values. + nullable: true + type: string + required: + - name + - consumer + - schedule + - rule_type_id + - params + title: Geo containment + type: object + Kibana_HTTP_APIs_get_agent_policy_outputs_response: + additionalProperties: false + properties: + item: + additionalProperties: false + type: object + properties: + agentPolicyId: + type: string + data: + additionalProperties: false + type: object + properties: + integrations: + items: + additionalProperties: false + type: object + properties: + id: + type: string + integrationPolicyName: + type: string + name: + type: string + pkgName: + type: string + maxItems: 1000 + type: array + output: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + required: + - id + - name + required: + - output + monitoring: + additionalProperties: false + type: object + properties: + output: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + required: + - id + - name + required: + - output + required: + - monitoring + - data + required: + - item + title: get_agent_policy_outputs_response + type: object + Kibana_HTTP_APIs_get_agent_policy_response: + additionalProperties: false + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_agent_policy_response' + required: + - item + title: get_agent_policy_response + type: object + Kibana_HTTP_APIs_get_bulk_assets_request: + additionalProperties: false + properties: + assetIds: + items: + additionalProperties: false + type: object + properties: + id: + type: string + type: + type: string + required: + - id + - type + maxItems: 10000 + type: array + required: + - assetIds + title: get_bulk_assets_request + type: object + Kibana_HTTP_APIs_get_bulk_assets_response: + additionalProperties: false + properties: + items: + items: + additionalProperties: false + type: object + properties: + appLink: + type: string + attributes: + additionalProperties: false + type: object + properties: + description: + type: string + service: + type: string + title: + type: string + id: + type: string + type: + type: string + updatedAt: + type: string + required: + - id + - type + - attributes + maxItems: 10000 + type: array + required: + - items + title: get_bulk_assets_response + type: object + Kibana_HTTP_APIs_get_categories_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_category_summary_item' + maxItems: 10000 + type: array + required: + - items + title: get_categories_response + type: object + Kibana_HTTP_APIs_get_data_streams_response: + additionalProperties: false + properties: + items: + items: + additionalProperties: false + type: object + properties: + name: + type: string + required: + - name + maxItems: 10000 + type: array + required: + - items + title: get_data_streams_response + type: object + Kibana_HTTP_APIs_get_dependencies_response: + additionalProperties: false + properties: + items: + items: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + version: + type: string + required: + - name + - version + - title + maxItems: 1000 + type: array + required: + - items + title: get_dependencies_response + type: object + Kibana_HTTP_APIs_get_full_agent_policy_response: + additionalProperties: false + properties: + item: + anyOf: + - type: string + - $ref: '#/components/schemas/Kibana_HTTP_APIs_full_agent_policy' + required: + - item + title: get_full_agent_policy_response + type: object + Kibana_HTTP_APIs_get_info_response: + additionalProperties: false + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_package_info' + metadata: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_metadata' + required: + - item + title: get_info_response + type: object + Kibana_HTTP_APIs_get_inputs_response: + additionalProperties: false + properties: + connectors: + additionalProperties: + nullable: true + type: object + exporters: + additionalProperties: + nullable: true + type: object + extensions: + additionalProperties: + nullable: true + type: object + inputs: + items: + additionalProperties: false + type: object + properties: + id: + type: string + streams: + items: + additionalProperties: true + type: object + properties: + data_stream: + additionalProperties: true + type: object + properties: + dataset: + type: string + type: + type: string + required: + - dataset + id: + type: string + required: + - id + - data_stream + maxItems: 10000 + type: array + type: + type: string + required: + - id + - type + maxItems: 10000 + type: array + processors: + additionalProperties: + nullable: true + type: object + receivers: + additionalProperties: + nullable: true + type: object + service: + additionalProperties: false + type: object + properties: + extensions: + items: + type: string + maxItems: 1000 + type: array + pipelines: + additionalProperties: + additionalProperties: false + type: object + properties: + exporters: + items: + type: string + maxItems: 1000 + type: array + processors: + items: + type: string + maxItems: 1000 + type: array + receivers: + items: + type: string + maxItems: 1000 + type: array + type: object + required: + - inputs + title: get_inputs_response + type: object + Kibana_HTTP_APIs_get_installed_packages_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_installed_package' + maxItems: 10000 type: array - filters: - $ref: '#/components/schemas/Kibana_HTTP_APIs_lensPanelFilters' - hide_border: - type: boolean - hide_title: - type: boolean - ignore_global_filters: - default: false - description: When `true`, ignores global filters when fetching data for this layer. Defaults to `false`. - type: boolean - metric: - anyOf: - - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricCountMetric' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricUniqueCountMetric' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricStatsMetric' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricSumMetric' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricLastValue' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricPercentile' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricPercentileRanks' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricFormula' - query: - $ref: '#/components/schemas/Kibana_HTTP_APIs_filterSimple' - references: + searchAfter: items: - $ref: '#/components/schemas/Kibana_HTTP_APIs_kbn-content-management-utils-referenceSchema' + anyOf: + - type: string + - type: number + - type: boolean + - nullable: true + nullable: true + maxItems: 2 type: array - sampling: - default: 1 - description: Sampling factor between 0 (no sampling) and 1 (full sampling). - maximum: 1 - minimum: 0 + total: type: number - styling: - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeStyling' - time_range: - $ref: '#/components/schemas/Kibana_HTTP_APIs_kbn-es-query-server-timeRangeSchema' - title: - type: string - type: - enum: - - gauge - type: string required: - - type - - data_source - - metric - title: Gauge Chart (DSL) + - items + - total + title: get_installed_packages_response type: object - Kibana_HTTP_APIs_gaugeShapeBullet: + Kibana_HTTP_APIs_get_k8s_manifest_response: additionalProperties: false - description: Bullet gauge shape. properties: - orientation: - $ref: '#/components/schemas/Kibana_HTTP_APIs_vis_api_simple_orientation' - type: - enum: - - bullet + item: type: string required: - - type - title: Shape (Bullet) + - item + title: get_k8s_manifest_response type: object - Kibana_HTTP_APIs_gaugeShapeCircular: + Kibana_HTTP_APIs_get_limited_packages_response: additionalProperties: false - description: Circular gauge shape. properties: - type: - enum: - - circle - - semi_circle - - arc - type: string + items: + items: + type: string + maxItems: 10000 + type: array required: - - type - title: Shape (Circular) + - items + title: get_limited_packages_response type: object - Kibana_HTTP_APIs_gaugeStyling: + Kibana_HTTP_APIs_get_list_agent_policy_outputs_request: additionalProperties: false - description: Visual chart styling options properties: - shape: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeShapeBullet' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeShapeCircular' - title: Gauge styling + ids: + description: list of package policy ids + items: + type: string + maxItems: 1000 + type: array + required: + - ids + title: get_list_agent_policy_outputs_request type: object - Kibana_HTTP_APIs_geo-containment-create-rule-body-alerting: + Kibana_HTTP_APIs_get_list_agent_policy_outputs_response: additionalProperties: false properties: - actions: - default: [] + items: items: - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_rule_action' + additionalProperties: false + type: object + properties: + agentPolicyId: + type: string + data: + additionalProperties: false + type: object + properties: + integrations: + items: + additionalProperties: false + type: object + properties: + id: + type: string + integrationPolicyName: + type: string + name: + type: string + pkgName: + type: string + maxItems: 1000 + type: array + output: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + required: + - id + - name + required: + - output + monitoring: + additionalProperties: false + type: object + properties: + output: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + required: + - id + - name + required: + - output + required: + - monitoring + - data + maxItems: 10000 type: array - alert_delay: + required: + - items + title: get_list_agent_policy_outputs_response + type: object + Kibana_HTTP_APIs_get_one_bulk_operation_packages_response: + additionalProperties: false + properties: + error: additionalProperties: false - description: Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions. type: object properties: - active: - description: The number of consecutive runs that must meet the rule conditions. - type: number + message: + type: string required: - - active - artifacts: - additionalProperties: false - type: object - properties: - dashboards: - items: + - message + results: + items: + additionalProperties: false + type: object + properties: + error: additionalProperties: false type: object properties: - id: + message: type: string required: - - id - maxItems: 10 - type: array - investigation_guide: + - message + name: + type: string + success: + type: boolean + required: + - name + - success + maxItems: 10000 + type: array + status: + type: string + required: + - status + title: get_one_bulk_operation_packages_response + type: object + Kibana_HTTP_APIs_get_package_info: + additionalProperties: true + properties: + agent: + additionalProperties: false + type: object + properties: + privileges: additionalProperties: false type: object properties: - blob: - maxLength: 10000 + root: + type: boolean + asset_tags: + items: + additionalProperties: false + type: object + properties: + asset_ids: + items: type: string - required: - - blob - consumer: - description: 'The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.' + maxItems: 1000 + type: array + asset_types: + items: + type: string + maxItems: 100 + type: array + text: + type: string + required: + - text + maxItems: 1000 + type: array + assets: + additionalProperties: + nullable: true + type: object + categories: + items: + type: string + maxItems: 100 + type: array + conditions: + additionalProperties: true + type: object + properties: + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + elastic: + additionalProperties: true + type: object + properties: + capabilities: + items: + type: string + maxItems: 10 + type: array + subscription: + type: string + kibana: + additionalProperties: true + type: object + properties: + version: + type: string + data_streams: + items: + additionalProperties: + nullable: true + type: object + maxItems: 1000 + type: array + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + description: type: string - enabled: - default: true - description: Indicates whether you want the rule to run on an interval basis after it is created. + discovery: + additionalProperties: true + type: object + properties: + datasets: + items: + additionalProperties: true + type: object + properties: + name: + type: string + required: + - name + maxItems: 100 + type: array + fields: + items: + additionalProperties: true + type: object + properties: + name: + type: string + required: + - name + maxItems: 100 + type: array + download: + type: string + elasticsearch: + additionalProperties: + nullable: true + type: object + format_version: + type: string + icons: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_icon' + maxItems: 100 + type: array + installationInfo: + $ref: '#/components/schemas/Kibana_HTTP_APIs_installation_info' + internal: type: boolean - flapping: - allOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_rule_flapping' - nullable: true + keepPoliciesUpToDate: + type: boolean + latestVersion: + type: string + license: + type: string + licensePath: + type: string name: - description: The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule. type: string - notify_when: - description: 'Indicates how frequently rule actions are triggered. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. You cannot specify `notify_when` at both the rule and action level. The recommended approach is to set it for each action individually. If you set `notify_when` at the rule level and then edit the rule, it will automatically be converted to action-specific values.' - enum: - - onActionGroupChange - - onActiveAlert - - onThrottleInterval - nullable: true + notice: type: string - params: - additionalProperties: false - description: The parameters for the geo containment rule. These parameters are appropriate when `rule_type_id` is `.geo-containment`. + owner: + additionalProperties: true + type: object properties: - boundaryGeoField: - minLength: 1 + github: type: string - boundaryIndexId: - minLength: 1 + type: + enum: + - elastic + - partner + - community type: string - boundaryIndexQuery: + path: + type: string + policy_templates: + items: + additionalProperties: nullable: true - boundaryIndexTitle: - minLength: 1 - type: string - boundaryNameField: - minLength: 1 - type: string - boundaryType: - minLength: 1 - type: string - dateField: - minLength: 1 - type: string - entity: - minLength: 1 + type: object + maxItems: 1000 + type: array + readme: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + screenshots: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_icon' + maxItems: 100 + type: array + signature_path: + type: string + source: + additionalProperties: true + type: object + properties: + license: type: string - geoField: - minLength: 1 + required: + - license + status: + type: string + title: + type: string + type: + anyOf: + - enum: + - integration type: string - index: - minLength: 1 + - enum: + - input type: string - indexId: - minLength: 1 + - enum: + - content type: string - indexQuery: + - type: string + var_groups: + items: + additionalProperties: true + type: object + properties: + description: + type: string + name: + type: string + options: + items: + additionalProperties: true + type: object + properties: + description: + type: string + hide_in_deployment_modes: + items: + enum: + - default + - agentless + type: string + maxItems: 2 + type: array + name: + type: string + title: + type: string + vars: + items: + type: string + maxItems: 100 + type: array + required: + - name + - title + - vars + maxItems: 100 + type: array + selector_title: + type: string + title: + type: string + required: + - name + - title + - selector_title + - options + maxItems: 100 + type: array + vars: + items: + additionalProperties: nullable: true - required: - - index - - indexId - - geoField - - entity - - dateField - - boundaryType - - boundaryIndexTitle - - boundaryIndexId - - boundaryGeoField - - indexQuery - - boundaryIndexQuery - title: Geo Containment Rule Params - type: object - rule_type_id: - enum: - - .geo-containment + type: object + maxItems: 1000 + type: array + version: type: string - schedule: + required: + - name + - version + - title + - assets + title: get_package_info + type: object + Kibana_HTTP_APIs_get_packages_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_list_item' + maxItems: 10000 + type: array + required: + - items + title: get_packages_response + type: object + Kibana_HTTP_APIs_get_stats_response: + additionalProperties: false + properties: + response: additionalProperties: false - description: The check interval, which specifies how frequently the rule conditions are checked. type: object properties: - interval: - description: The interval is specified in seconds, minutes, hours, or days. - type: string + agent_policy_count: + type: number + package_policy_count: + type: number required: - - interval - tags: - default: [] - description: The tags for the rule. - items: - type: string - type: array - throttle: - description: Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how frequently rule actions are triggered. You cannot specify the throttle interval at both the rule and action level. If you set the throttle interval at the rule level and then edit the rule, it will automatically be converted to action-specific values. + - agent_policy_count + - package_policy_count + required: + - response + title: get_stats_response + type: object + Kibana_HTTP_APIs_get_verification_key_id_response: + additionalProperties: false + properties: + id: nullable: true type: string required: - - name - - consumer - - schedule - - rule_type_id - - params - title: Geo containment + - id + title: get_verification_key_id_response type: object Kibana_HTTP_APIs_gradientColorMapping: additionalProperties: false @@ -91423,6 +78502,253 @@ components: properties: {} required: - inherit + Kibana_HTTP_APIs_install_kibana_assets_request: + additionalProperties: false + properties: + force: + type: boolean + space_ids: + description: When provided, assets are installed in the specified spaces instead of the current space. + items: + type: string + maxItems: 100 + minItems: 1 + type: array + title: install_kibana_assets_request + type: object + Kibana_HTTP_APIs_install_kibana_assets_response: + additionalProperties: false + properties: + success: + type: boolean + required: + - success + title: install_kibana_assets_response + type: object + Kibana_HTTP_APIs_install_package_from_registry_request: + additionalProperties: false + properties: + force: + default: false + type: boolean + ignore_constraints: + default: false + type: boolean + title: install_package_from_registry_request + type: object + Kibana_HTTP_APIs_install_package_response: + additionalProperties: false + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + name: + type: string + required: + - install_source + - name + items: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_es_asset_reference' + maxItems: 10000 + type: array + required: + - items + - _meta + title: install_package_response + type: object + Kibana_HTTP_APIs_install_rule_assets_request: + additionalProperties: false + properties: + force: + type: boolean + title: install_rule_assets_request + type: object + Kibana_HTTP_APIs_installation_info: + additionalProperties: true + properties: + additional_spaces_installed_kibana: + additionalProperties: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + maxItems: 100 + type: array + type: object + created_at: + type: string + experimental_data_stream_features: + items: + additionalProperties: true + type: object + properties: + data_stream: + type: string + features: + additionalProperties: true + type: object + properties: + doc_value_only_numeric: + type: boolean + doc_value_only_other: + type: boolean + synthetic_source: + type: boolean + tsdb: + type: boolean + required: + - data_stream + - features + maxItems: 100 + type: array + install_format_schema_version: + type: string + install_source: + enum: + - registry + - upload + - bundled + - custom + type: string + install_status: + enum: + - installed + - installing + - install_failed + type: string + installed_es: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_es_asset_reference' + maxItems: 10000 + type: array + installed_kibana: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + maxItems: 10000 + type: array + installed_kibana_space_id: + type: string + is_rollback_ttl_expired: + type: boolean + latest_executed_state: + additionalProperties: true + type: object + properties: + error: + type: string + name: + type: string + started_at: + type: string + latest_install_failed_attempts: + items: + additionalProperties: true + type: object + properties: + created_at: + type: string + error: + additionalProperties: true + type: object + properties: + message: + type: string + name: + type: string + stack: + type: string + required: + - name + - message + target_version: + type: string + required: + - created_at + - target_version + - error + maxItems: 10 + type: array + name: + type: string + namespaces: + items: + type: string + maxItems: 100 + type: array + previous_version: + nullable: true + type: string + rolled_back: + type: boolean + type: + type: string + updated_at: + type: string + verification_key_id: + nullable: true + type: string + verification_status: + enum: + - unverified + - verified + - unknown + type: string + version: + type: string + required: + - type + - installed_kibana + - installed_es + - name + - version + - install_status + - install_source + - verification_status + title: installation_info + type: object + Kibana_HTTP_APIs_installed_package: + additionalProperties: false + properties: + dataStreams: + items: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + required: + - name + - title + maxItems: 10000 + type: array + description: + type: string + icons: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_icon' + maxItems: 100 + type: array + name: + type: string + status: + type: string + title: + type: string + version: + type: string + required: + - name + - version + - status + - dataStreams + title: installed_package + type: object Kibana_HTTP_APIs_kbn-as-code-filters-schema_asCodeConditionFilterSchema: additionalProperties: false description: A filter that evaluates a single field condition such as equality, range, or existence. @@ -94220,6 +81546,37 @@ components: - geo_point title: Type type: string + Kibana_HTTP_APIs_kibana_asset_reference: + additionalProperties: false + properties: + deferred: + type: boolean + id: + type: string + originId: + type: string + type: + anyOf: + - enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + - type: string + required: + - id + - type + title: kibana_asset_reference + type: object Kibana_HTTP_APIs_lastValueOperation: additionalProperties: false properties: @@ -101230,6 +88587,279 @@ components: - keys title: Multi Field Key type: object + Kibana_HTTP_APIs_new_agent_policy: + additionalProperties: false + properties: + advanced_settings: + additionalProperties: false + type: object + properties: + agent_download_target_directory: + nullable: true + agent_download_timeout: + nullable: true + agent_features_disable_policy_change_acks_enabled: + nullable: true + agent_internal: + nullable: true + agent_limits_go_max_procs: + nullable: true + agent_logging_files_interval: + nullable: true + agent_logging_files_keepfiles: + nullable: true + agent_logging_files_rotateeverybytes: + nullable: true + agent_logging_level: + nullable: true + agent_logging_metrics_period: + nullable: true + agent_logging_to_files: + nullable: true + agent_monitoring_runtime_experimental: + nullable: true + agent_features: + items: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + maxItems: 100 + type: array + agentless: + additionalProperties: false + type: object + properties: + cloud_connectors: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + target_csp: + enum: + - aws + - azure + - gcp + type: string + required: + - enabled + cluster_id: + type: string + resources: + additionalProperties: false + type: object + properties: + requests: + additionalProperties: false + type: object + properties: + cpu: + type: string + memory: + type: string + bumpRevision: + type: boolean + data_output_id: + nullable: true + type: string + description: + type: string + download_source_id: + nullable: true + type: string + fleet_server_host_id: + nullable: true + type: string + force: + type: boolean + global_data_tags: + description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. + items: + additionalProperties: false + type: object + properties: + name: + type: string + value: + anyOf: + - type: string + - type: number + required: + - name + - value + maxItems: 100 + type: array + has_agent_version_conditions: + type: boolean + has_fleet_server: + type: boolean + id: + type: string + inactivity_timeout: + default: 1209600 + minimum: 0 + type: number + is_default: + type: boolean + is_default_fleet_server: + type: boolean + is_managed: + type: boolean + is_protected: + type: boolean + is_verifier: + type: boolean + keep_monitoring_alive: + default: false + description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled + nullable: true + type: boolean + min_agent_version: + nullable: true + type: string + monitoring_diagnostics: + additionalProperties: false + type: object + properties: + limit: + additionalProperties: false + type: object + properties: + burst: + type: number + interval: + type: string + uploader: + additionalProperties: false + type: object + properties: + init_dur: + type: string + max_dur: + type: string + max_retries: + type: number + monitoring_enabled: + items: + enum: + - logs + - metrics + - traces + type: string + maxItems: 3 + type: array + monitoring_http: + additionalProperties: false + type: object + properties: + buffer: + additionalProperties: false + type: object + properties: + enabled: + default: false + type: boolean + enabled: + type: boolean + host: + type: string + port: + maximum: 65353 + minimum: 0 + type: number + monitoring_output_id: + nullable: true + type: string + monitoring_pprof_enabled: + type: boolean + name: + minLength: 1 + type: string + namespace: + minLength: 1 + type: string + overrides: + additionalProperties: + nullable: true + description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + package_agent_version_conditions: + items: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + version_condition: + type: string + required: + - name + - title + - version_condition + maxItems: 1000 + nullable: true + type: array + required_versions: + items: + additionalProperties: false + type: object + properties: + percentage: + description: Target percentage of agents to auto upgrade + maximum: 100 + minimum: 0 + type: number + version: + description: Target version for automatic agent upgrade + type: string + required: + - version + - percentage + maxItems: 100 + nullable: true + type: array + space_ids: + items: + type: string + maxItems: 100 + type: array + supports_agentless: + default: false + deprecated: true + description: Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API. + nullable: true + type: boolean + unenroll_timeout: + minimum: 0 + type: number + required: + - name + - namespace + title: new_agent_policy + type: object + Kibana_HTTP_APIs_new_enrollment_api_key: + additionalProperties: false + properties: + expiration: + type: string + name: + type: string + policy_id: + type: string + required: + - policy_id + title: new_enrollment_api_key + type: object Kibana_HTTP_APIs_new_maintenance_window: additionalProperties: false properties: @@ -102924,197 +90554,954 @@ components: type: string required: - name - - type - - hosts - title: output_logstash + - type + - hosts + title: output_logstash + type: object + Kibana_HTTP_APIs_output_remote_elasticsearch: + additionalProperties: true + properties: + allow_edit: + items: + type: string + maxItems: 1000 + type: array + ca_sha256: + nullable: true + type: string + ca_trusted_fingerprint: + nullable: true + type: string + config_yaml: + nullable: true + type: string + hosts: + items: + format: uri + type: string + maxItems: 10 + minItems: 1 + type: array + id: + type: string + is_default: + default: false + type: boolean + is_default_monitoring: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + type: boolean + kibana_api_key: + nullable: true + type: string + kibana_url: + nullable: true + type: string + name: + type: string + otel_disable_beatsauth: + nullable: true + type: boolean + otel_exporter_config_yaml: + nullable: true + type: string + preset: + enum: + - balanced + - custom + - throughput + - scale + - latency + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: true + type: object + properties: + service_token: + anyOf: + - additionalProperties: true + type: object + properties: + hash: + type: string + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: true + type: object + properties: + key: + anyOf: + - additionalProperties: true + type: object + properties: + hash: + type: string + id: + type: string + required: + - id + - type: string + service_token: + nullable: true + type: string + shipper: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_shipper' + nullable: true + ssl: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_ssl' + nullable: true + sync_integrations: + type: boolean + sync_uninstalled_integrations: + type: boolean + type: + enum: + - remote_elasticsearch + type: string + write_to_logs_streams: + nullable: true + type: boolean + required: + - name + - type + - hosts + title: output_remote_elasticsearch + type: object + Kibana_HTTP_APIs_output_shipper: + additionalProperties: true + properties: + compression_level: + nullable: true + type: number + disk_queue_compression_enabled: + nullable: true + type: boolean + disk_queue_enabled: + default: false + nullable: true + type: boolean + disk_queue_encryption_enabled: + nullable: true + type: boolean + disk_queue_max_size: + nullable: true + type: number + disk_queue_path: + nullable: true + type: string + loadbalance: + nullable: true + type: boolean + max_batch_bytes: + nullable: true + type: number + mem_queue_events: + nullable: true + type: number + queue_flush_timeout: + nullable: true + type: number + required: + - disk_queue_path + - disk_queue_max_size + - disk_queue_encryption_enabled + - disk_queue_compression_enabled + - compression_level + - loadbalance + - mem_queue_events + - queue_flush_timeout + - max_batch_bytes + title: output_shipper + type: object + Kibana_HTTP_APIs_output_ssl: + additionalProperties: true + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + key: + type: string + verification_mode: + enum: + - full + - none + - certificate + - strict + type: string + title: output_ssl + type: object + Kibana_HTTP_APIs_package_icon: + additionalProperties: false + properties: + dark_mode: + type: boolean + path: + type: string + size: + type: string + src: + type: string + title: + type: string + type: + type: string + required: + - src + title: package_icon + type: object + Kibana_HTTP_APIs_package_list_item: + additionalProperties: true + properties: + categories: + items: + type: string + maxItems: 100 + type: array + conditions: + additionalProperties: true + type: object + properties: + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + elastic: + additionalProperties: true + type: object + properties: + capabilities: + items: + type: string + maxItems: 10 + type: array + subscription: + type: string + kibana: + additionalProperties: true + type: object + properties: + version: + type: string + data_streams: + items: + additionalProperties: + nullable: true + type: object + maxItems: 1000 + type: array + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + description: + type: string + discovery: + additionalProperties: true + type: object + properties: + datasets: + items: + additionalProperties: true + type: object + properties: + name: + type: string + required: + - name + maxItems: 100 + type: array + fields: + items: + additionalProperties: true + type: object + properties: + name: + type: string + required: + - name + maxItems: 100 + type: array + download: + type: string + format_version: + type: string + icons: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_icon' + maxItems: 100 + type: array + id: + type: string + installationInfo: + $ref: '#/components/schemas/Kibana_HTTP_APIs_installation_info' + integration: + type: string + internal: + type: boolean + latestVersion: + type: string + name: + type: string + owner: + additionalProperties: true + type: object + properties: + github: + type: string + type: + enum: + - elastic + - partner + - community + type: string + path: + type: string + policy_templates: + items: + additionalProperties: + nullable: true + type: object + maxItems: 1000 + type: array + readme: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + signature_path: + type: string + source: + additionalProperties: true + type: object + properties: + license: + type: string + required: + - license + status: + type: string + title: + type: string + type: + anyOf: + - enum: + - integration + type: string + - enum: + - input + type: string + - enum: + - content + type: string + - type: string + var_groups: + items: + additionalProperties: true + type: object + properties: + description: + type: string + name: + type: string + options: + items: + additionalProperties: true + type: object + properties: + description: + type: string + hide_in_deployment_modes: + items: + enum: + - default + - agentless + type: string + maxItems: 2 + type: array + name: + type: string + title: + type: string + vars: + items: + type: string + maxItems: 100 + type: array + required: + - name + - title + - vars + maxItems: 100 + type: array + selector_title: + type: string + title: + type: string + required: + - name + - title + - selector_title + - options + maxItems: 100 + type: array + vars: + items: + additionalProperties: + nullable: true + type: object + maxItems: 1000 + type: array + version: + type: string + required: + - name + - version + - title + - id + title: package_list_item + type: object + Kibana_HTTP_APIs_package_metadata: + additionalProperties: false + properties: + has_policies: + type: boolean + required: + - has_policies + title: package_metadata + type: object + Kibana_HTTP_APIs_package_policy_package: + additionalProperties: false + properties: + experimental_data_stream_features: + items: + additionalProperties: false + type: object + properties: + data_stream: + type: string + features: + additionalProperties: false + type: object + properties: + doc_value_only_numeric: + type: boolean + doc_value_only_other: + type: boolean + synthetic_source: + type: boolean + tsdb: + type: boolean + required: + - data_stream + - features + maxItems: 100 + type: array + fips_compatible: + type: boolean + name: + description: Package name + type: string + requires_root: + type: boolean + title: + type: string + version: + description: Package version + type: string + required: + - name + - version + title: package_policy_package type: object - Kibana_HTTP_APIs_output_remote_elasticsearch: - additionalProperties: true + Kibana_HTTP_APIs_package_policy_response: + additionalProperties: false properties: - allow_edit: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. items: type: string maxItems: 1000 - type: array - ca_sha256: - nullable: true - type: string - ca_trusted_fingerprint: nullable: true - type: string - config_yaml: - nullable: true - type: string - hosts: - items: - format: uri - type: string - maxItems: 10 - minItems: 1 type: array - id: - type: string - is_default: - default: false - type: boolean - is_default_monitoring: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - type: boolean - kibana_api_key: + agents: + type: number + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. nullable: true type: string - kibana_url: + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 nullable: true type: string - name: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' type: string - otel_disable_beatsauth: - nullable: true - type: boolean - otel_exporter_config_yaml: - nullable: true + created_at: type: string - preset: - enum: - - balanced - - custom - - throughput - - scale - - latency + created_by: type: string - proxy_id: - nullable: true + description: + description: Package policy description type: string - secrets: + elasticsearch: additionalProperties: true type: object properties: - service_token: - anyOf: - - additionalProperties: true - type: object - properties: - hash: - type: string - id: - type: string - required: - - id - - type: string - ssl: + privileges: additionalProperties: true type: object properties: - key: - anyOf: - - additionalProperties: true + cluster: + items: + type: string + maxItems: 100 + type: array + enabled: + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + nullable: true + type: array + id: + type: string + inputs: + anyOf: + - items: + additionalProperties: false + type: object + properties: + compiled_input: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + config: + additionalProperties: + additionalProperties: false type: object properties: - hash: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + name: + type: string + policy_template: + type: string + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: + additionalProperties: false + type: object + properties: + dataset: + type: string + elasticsearch: + additionalProperties: false + type: object + properties: + dynamic_dataset: + type: boolean + dynamic_namespace: + type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string + required: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean id: type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - enabled + - data_stream + - compiled_stream + maxItems: 1000 + type: array + type: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true required: - - id - - type: string - service_token: - nullable: true + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - type + - enabled + - streams + - compiled_input + maxItems: 100 + type: array + - additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that input. Defaults to `true` (enabled). + type: boolean + streams: + additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that stream. Defaults to `true` (enabled). + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Input streams. Refer to the integration documentation to know which streams are available. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package policy inputs. Refer to the integration documentation to know which inputs are available. + type: object + description: Package policy inputs. + is_managed: + type: boolean + name: + description: Unique name for the package policy. type: string - shipper: - allOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_shipper' - nullable: true - ssl: - allOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_ssl' + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: nullable: true - sync_integrations: - type: boolean - sync_uninstalled_integrations: - type: boolean - type: - enum: - - remote_elasticsearch type: string - write_to_logs_streams: + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. nullable: true - type: boolean - required: - - name - - type - - hosts - title: output_remote_elasticsearch - type: object - Kibana_HTTP_APIs_output_shipper: - additionalProperties: true - properties: - compression_level: + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + revision: + description: Package policy revision. type: number - disk_queue_compression_enabled: - nullable: true - type: boolean - disk_queue_enabled: + secret_references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 1000 + type: array + spaceIds: + items: + type: string + maxItems: 100 + type: array + supports_agentless: default: false + description: Indicates whether the package policy belongs to an agentless agent policy. nullable: true type: boolean - disk_queue_encryption_enabled: + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. nullable: true type: boolean - disk_queue_max_size: - nullable: true - type: number - disk_queue_path: - nullable: true + updated_at: + type: string + updated_by: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + anyOf: + - additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package level variable. + version: + description: Package policy ES version. type: string - loadbalance: - nullable: true - type: boolean - max_batch_bytes: - nullable: true - type: number - mem_queue_events: - nullable: true - type: number - queue_flush_timeout: - nullable: true - type: number required: - - disk_queue_path - - disk_queue_max_size - - disk_queue_encryption_enabled - - disk_queue_compression_enabled - - compression_level - - loadbalance - - mem_queue_events - - queue_flush_timeout - - max_batch_bytes - title: output_shipper + - name + - enabled + - inputs + - revision + - updated_at + - updated_by + - created_at + - created_by + title: package_policy_response type: object - Kibana_HTTP_APIs_output_ssl: - additionalProperties: true + Kibana_HTTP_APIs_package_policy_status_response: + additionalProperties: false properties: - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - key: + body: + additionalProperties: false + type: object + properties: + message: + type: string + required: + - message + id: type: string - verification_mode: - enum: - - full - - none - - certificate - - strict + name: type: string - title: output_ssl + statusCode: + type: number + success: + type: boolean + required: + - id + - success + title: package_policy_status_response type: object Kibana_HTTP_APIs_percentileOperation: additionalProperties: false @@ -104484,6 +92871,24 @@ components: - ranges title: Ranges Operation type: object + Kibana_HTTP_APIs_reauthorize_transform_request: + additionalProperties: false + properties: + transforms: + items: + additionalProperties: false + type: object + properties: + transformId: + type: string + required: + - transformId + maxItems: 1000 + type: array + required: + - transforms + title: reauthorize_transform_request + type: object Kibana_HTTP_APIs_RecursiveRecord: additionalProperties: anyOf: @@ -105106,6 +93511,43 @@ components: - fields title: Terms Operation type: object + Kibana_HTTP_APIs_review_upgrade_request: + additionalProperties: false + properties: + action: + enum: + - accept + - decline + - pending + type: string + target_version: + type: string + required: + - action + - target_version + title: review_upgrade_request + type: object + Kibana_HTTP_APIs_review_upgrade_response: + additionalProperties: false + properties: + success: + type: boolean + required: + - success + title: review_upgrade_response + type: object + Kibana_HTTP_APIs_rollback_package_response: + additionalProperties: false + properties: + success: + type: boolean + version: + type: string + required: + - version + - success + title: rollback_package_response + type: object Kibana_HTTP_APIs_rule_flapping: additionalProperties: false description: When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced. @@ -105987,6 +94429,206 @@ components: - roles title: security_roles_bulk_create_or_update_payload type: object + Kibana_HTTP_APIs_simplified_create_package_policy_request: + additionalProperties: false + properties: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. + items: + type: string + maxItems: 100 + nullable: true + type: array + cloud_connector: + additionalProperties: false + type: object + properties: + cloud_connector_id: + description: ID of an existing cloud connector to reuse. If not provided, a new connector will be created. + type: string + enabled: + default: false + description: Whether cloud connectors are enabled for this policy. + type: boolean + name: + description: Optional name for the cloud connector. If not provided, will be auto-generated from credentials. + maxLength: 255 + minLength: 1 + type: string + target_csp: + description: Target cloud service provider. If not provided, will be auto-detected from inputs. + enum: + - aws + - azure + - gcp + type: string + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' + type: string + description: + description: Policy description. + type: string + force: + description: Force package policy creation even if the package is not verified, or if the agent policy is managed. + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + type: array + id: + description: Policy unique identifier. + type: string + inputs: + additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that input. Defaults to `true` (enabled). + type: boolean + streams: + additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that stream. Defaults to `true` (enabled). + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Input streams. Refer to the integration documentation to know which streams are available. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package policy inputs. Refer to the integration documentation to know which inputs are available. + type: object + name: + description: Unique name for the policy. + type: string + namespace: + description: Policy namespace. When not specified, it inherits the agent policy namespace. + type: string + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + policy_template: + description: The policy template to use for the agentless package policy. If not provided, the default policy template will be used. + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + required: + - name + - package + title: simplified_create_package_policy_request + type: object Kibana_HTTP_APIs_slo-alerts-embeddable: additionalProperties: false description: SLO Alerts embeddable schema @@ -110622,6 +99264,309 @@ components: type: boolean title: update_output_remote_elasticsearch type: object + Kibana_HTTP_APIs_update_package_policy_request: + additionalProperties: false + properties: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. + items: + type: string + maxItems: 1000 + nullable: true + type: array + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. + nullable: true + type: string + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 + nullable: true + type: string + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' + type: string + description: + description: Package policy description + type: string + enabled: + type: boolean + force: + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + nullable: true + type: array + inputs: + items: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + name: + type: string + policy_template: + type: string + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: + additionalProperties: false + type: object + properties: + dataset: + type: string + elasticsearch: + additionalProperties: false + type: object + properties: + dynamic_dataset: + type: boolean + dynamic_namespace: + type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string + required: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - enabled + - data_stream + - compiled_stream + maxItems: 1000 + type: array + type: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - type + - enabled + maxItems: 1000 + type: array + is_managed: + type: boolean + name: + type: string + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: + nullable: true + type: string + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. + nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + spaceIds: + items: + type: string + maxItems: 100 + type: array + supports_agentless: + default: false + description: Indicates whether the package policy belongs to an agentless agent policy. + nullable: true + type: boolean + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. + nullable: true + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + version: + type: string + title: update_package_policy_request + type: object + Kibana_HTTP_APIs_update_package_request: + additionalProperties: false + properties: + keepPoliciesUpToDate: + type: boolean + namespace_customization_enabled_for: + description: Namespaces for which namespace-level customization is enabled on this package. + items: + type: string + maxItems: 100 + type: array + title: update_package_request + type: object + Kibana_HTTP_APIs_update_package_response: + additionalProperties: false + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_package_info' + required: + - item + title: update_package_response + type: object Kibana_HTTP_APIs_update_rule: additionalProperties: false properties: @@ -110808,6 +99753,18 @@ components: - throttle title: update_rule_action_frequency type: object + Kibana_HTTP_APIs_upgrade_package_policies_request: + additionalProperties: false + properties: + packagePolicyIds: + items: + type: string + maxItems: 1000 + type: array + required: + - packagePolicyIds + title: upgrade_package_policies_request + type: object Kibana_HTTP_APIs_valueDisplay: additionalProperties: false description: Configure the visibility and the format of the values rendered on each chart partition section diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index 0bc7ccb611dbd..b52fd675a9bcf 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -27728,855 +27728,7 @@ paths: properties: items: items: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision + $ref: '#/components/schemas/Kibana_HTTP_APIs_agent_policy_response' maxItems: 10000 type: array page: @@ -28664,273 +27816,224 @@ paths: name: My agent policy namespace: default schema: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fleet_server_host_id: - nullable: true - type: string - force: - type: boolean - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_protected: - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces + $ref: '#/components/schemas/Kibana_HTTP_APIs_new_agent_policy' + responses: + '200': + content: + application/json: + examples: + postAgentPolicyExample: + description: The created agent policy + value: + item: + description: A sample agent policy + id: agent-policy-id-2 + is_managed: false + is_protected: false + name: My agent policy + namespace: default + revision: 1 + status: active + updated_at: '2024-01-15T10:00:00.000Z' + updated_by: user1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Create an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agent_policies/_bulk_get: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agent_policies/_bulk_get
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get multiple agent policies by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup. + operationId: post-fleet-agent-policies-bulk-get + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + requestBody: + content: + application/json: + examples: + postBulkGetAgentPoliciesRequestExample: + description: Retrieve multiple agent policies by ID + value: + ids: + - agent-policy-id-1 + - agent-policy-id-2 + schema: + additionalProperties: false + type: object + properties: + full: + description: get full policies with package policies populated type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - space_ids: + ids: + description: list of package policy ids items: type: string - maxItems: 100 + maxItems: 1000 type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API. - nullable: true + ignoreMissing: type: boolean - unenroll_timeout: - minimum: 0 - type: number required: - - name - - namespace + - ids responses: '200': content: application/json: examples: - postAgentPolicyExample: - description: The created agent policy + postBulkGetAgentPoliciesExample: + description: The requested agent policies + value: + items: + - id: agent-policy-id-1 + is_managed: false + is_protected: false + name: My agent policy + namespace: default + revision: 1 + status: active + updated_at: '2024-01-15T10:00:00.000Z' + updated_by: user1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_get_agent_policies_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: One or more agent policies were not found + value: + error: Not Found + message: An error message describing what went wrong + statusCode: 404 + description: Not Found + summary: Bulk get agent policies + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agent_policies/{agentPolicyId}: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup. + operationId: get-fleet-agent-policies-agentpolicyid + parameters: + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + responses: + '200': + content: + application/json: + examples: + getAgentPolicyExample: + description: An agent policy value: item: description: A sample agent policy - id: agent-policy-id-2 + id: agent-policy-id-1 is_managed: false is_protected: false name: My agent policy @@ -28939,862 +28042,235 @@ paths: status: active updated_at: '2024-01-15T10:00:00.000Z' updated_by: user1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false + description: Generic Error type: object properties: - item: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent policy was found with the given ID + value: + error: Not Found + message: Agent policy not found + statusCode: 404 + description: Not Found + summary: Get an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana + name: product_name + put: + description: |- + **Spaces method and path for this operation:** + +
put /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Update an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. + operationId: put-fleet-agent-policies-agentpolicyid + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + requestBody: + content: + application/json: + examples: + putAgentPolicyRequestExample: + description: Update an agent policy + value: + description: An updated agent policy description + monitoring_enabled: + - logs + name: Updated agent policy + namespace: default + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_new_agent_policy' + responses: + '200': + content: + application/json: + examples: + putAgentPolicyExample: + description: The updated agent policy + value: + item: + description: An updated agent policy description + id: agent-policy-id-1 + is_managed: false + is_protected: false + name: Updated agent policy + namespace: default + revision: 2 + status: active + updated_at: '2024-01-15T11:00:00.000Z' + updated_by: user1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Update an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get the auto-upgrade status for agents assigned to an agent policy.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agent-policies-agentpolicyid-auto-upgrade-agents-status + parameters: + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string + responses: + '200': + content: + application/json: + examples: + getAutoUpgradeAgentsStatusExample: + description: Auto-upgrade status for agents in the policy + value: + agentsCount: 5 + currentVersion: 8.16.0 + failedAgentsCount: 0 + upgradedAgentsCount: 3 + upgradingAgentsCount: 1 + schema: + additionalProperties: false + type: object + properties: + currentVersions: + items: + additionalProperties: false + type: object + properties: + agents: + description: Number of agents that upgraded to this version + type: number + failedUpgradeActionIds: + description: List of action IDs related to failed upgrades + items: + type: string + maxItems: 1000 + type: array + failedUpgradeAgents: + description: Number of agents that failed to upgrade to this version + type: number + inProgressUpgradeActionIds: + description: List of action IDs related to in-progress upgrades + items: + type: string + maxItems: 1000 + type: array + inProgressUpgradeAgents: + description: Number of agents that are upgrading to this version + type: number + version: + description: Agent version type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision + required: + - version + - agents + - failedUpgradeAgents + - inProgressUpgradeAgents + maxItems: 10000 + type: array + totalAgents: + type: number required: - - item + - currentVersions + - totalAgents description: Successful response '400': content: @@ -29825,23 +28301,23 @@ paths: - message - attributes description: Bad Request - summary: Create an agent policy + summary: Get auto upgrade agent status tags: - Elastic Agent policies x-metaTags: - content: Kibana name: product_name - /api/fleet/agent_policies/_bulk_get: + /api/fleet/agent_policies/{agentPolicyId}/copy: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agent_policies/_bulk_get
+
post /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/copy
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get multiple agent policies by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup. - operationId: post-fleet-agent-policies-bulk-get + Copy an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. + operationId: post-fleet-agent-policies-agentpolicyid-copy parameters: - description: A required header to protect against CSRF attacks in: header @@ -29850,6 +28326,12 @@ paths: schema: example: 'true' type: string + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string - description: 'Format for the response: simplified or legacy' in: query name: format @@ -29863,906 +28345,34 @@ paths: content: application/json: examples: - postBulkGetAgentPoliciesRequestExample: - description: Retrieve multiple agent policies by ID + postCopyAgentPolicyRequestExample: + description: Copy an agent policy with a new name value: - ids: - - agent-policy-id-1 - - agent-policy-id-2 + description: A copy of the original agent policy + name: Copy of my agent policy schema: - additionalProperties: false - type: object - properties: - full: - description: get full policies with package policies populated - type: boolean - ids: - description: list of package policy ids - items: - type: string - maxItems: 1000 - type: array - ignoreMissing: - type: boolean - required: - - ids + $ref: '#/components/schemas/Kibana_HTTP_APIs_copy_agent_policy_request' responses: '200': content: application/json: examples: - postBulkGetAgentPoliciesExample: - description: The requested agent policies + postCopyAgentPolicyExample: + description: The copied agent policy value: - items: - - id: agent-policy-id-1 - is_managed: false - is_protected: false - name: My agent policy - namespace: default - revision: 1 - status: active - updated_at: '2024-01-15T10:00:00.000Z' - updated_by: user1 + item: + description: A copy of the original agent policy + id: agent-policy-id-copy-1 + is_managed: false + is_protected: false + name: Copy of my agent policy + namespace: default + revision: 1 + status: active + updated_at: '2024-01-15T11:00:00.000Z' + updated_by: user1 schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_response' description: Successful response '400': content: @@ -30793,34 +28403,23 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: One or more agent policies were not found - value: - error: Not Found - message: An error message describing what went wrong - statusCode: 404 - description: Not Found - summary: Bulk get agent policies + summary: Copy an agent policy tags: - Elastic Agent policies x-metaTags: - content: Kibana name: product_name - /api/fleet/agent_policies/{agentPolicyId}: + /api/fleet/agent_policies/{agentPolicyId}/download: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}
+
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/download
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-agents-read OR fleet-setup. - operationId: get-fleet-agent-policies-agentpolicyid + Download an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. + operationId: get-fleet-agent-policies-agentpolicyid-download parameters: - description: The ID of the agent policy in: path @@ -30828,891 +28427,42 @@ paths: required: true schema: type: string - - description: 'Format for the response: simplified or legacy' + - description: If true, returns the policy as a downloadable file in: query - name: format + name: download required: false schema: - enum: - - simplified - - legacy - type: string + type: boolean + - description: If true, returns the policy formatted for standalone agents + in: query + name: standalone + required: false + schema: + type: boolean + - description: If true, returns the policy formatted for Kubernetes deployment + in: query + name: kubernetes + required: false + schema: + type: boolean + - description: If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags. + in: query + name: revision + required: false + schema: + type: number responses: '200': content: application/json: examples: - getAgentPolicyExample: - description: An agent policy + getDownloadAgentPolicyExample: + description: The agent policy download response value: - item: - description: A sample agent policy - id: agent-policy-id-1 - is_managed: false - is_protected: false - name: My agent policy - namespace: default - revision: 1 - status: active - updated_at: '2024-01-15T10:00:00.000Z' - updated_by: user1 + item: 'id: agent-policy-id-1\nrevision: 1\noutputs:\n default:\n type: elasticsearch\n hosts:\n - https://elasticsearch.example.com:9200\n' schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision - required: - - item - description: Successful response + type: string + description: Successful response — returns the agent policy as a YAML file download '400': content: application/json: @@ -31752,1206 +28502,369 @@ paths: error: Not Found message: Agent policy not found statusCode: 404 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes description: Not Found - summary: Get an agent policy + summary: Download an agent policy tags: - Elastic Agent policies x-metaTags: - content: Kibana name: product_name - put: + /api/fleet/agent_policies/{agentPolicyId}/full: + get: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}
+
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/full
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. - operationId: put-fleet-agent-policies-agentpolicyid + Get a full agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read. + operationId: get-fleet-agent-policies-agentpolicyid-full parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - description: The ID of the agent policy in: path name: agentPolicyId required: true schema: type: string - - description: 'Format for the response: simplified or legacy' + - description: If true, returns the policy as a downloadable file in: query - name: format + name: download required: false schema: - enum: - - simplified - - legacy + type: boolean + - description: If true, returns the policy formatted for standalone agents + in: query + name: standalone + required: false + schema: + type: boolean + - description: If true, returns the policy formatted for Kubernetes deployment + in: query + name: kubernetes + required: false + schema: + type: boolean + - description: If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags. + in: query + name: revision + required: false + schema: + type: number + responses: + '200': + content: + application/json: + examples: + getFullAgentPolicyExample: + description: The full agent policy configuration + value: + item: + agent: + monitoring: + logs: true + metrics: true + id: agent-policy-id-1 + inputs: [] + outputs: + default: + hosts: + - https://elasticsearch.example.com:9200 + type: elasticsearch + revision: 1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_full_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent policy was found with the given ID + value: + error: Not Found + message: Agent policy not found + statusCode: 404 + description: Not Found + summary: Get a full agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agent_policies/{agentPolicyId}/outputs: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/outputs
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get a list of outputs associated with agent policy by policy id.

[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read. + operationId: get-fleet-agent-policies-agentpolicyid-outputs + parameters: + - description: The ID of the agent policy + in: path + name: agentPolicyId + required: true + schema: + type: string + responses: + '200': + content: + application/json: + examples: + getAgentPolicyOutputsExample: + description: Outputs associated with the agent policy + value: + item: + data_output: + id: output-id-1 + name: Default output + type: elasticsearch + monitoring_output: + id: output-id-1 + name: Default output + type: elasticsearch + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_agent_policy_outputs_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent policy was found with the given ID + value: + error: Not Found + message: Agent policy not found + statusCode: 404 + description: Not Found + summary: Get outputs for an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agent_policies/delete: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agent_policies/delete
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Delete an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. + operationId: post-fleet-agent-policies-delete + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' type: string requestBody: content: application/json: examples: - putAgentPolicyRequestExample: - description: Update an agent policy + postDeleteAgentPolicyRequestExample: + description: Delete an agent policy by ID value: - description: An updated agent policy description - monitoring_enabled: - - logs - name: Updated agent policy - namespace: default + agentPolicyId: agent-policy-id-1 schema: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - bumpRevision: - type: boolean - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fleet_server_host_id: - nullable: true - type: string - force: - type: boolean - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_protected: - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_agent_policy_request' + responses: + '200': + content: + application/json: + examples: + postDeleteAgentPolicyExample: + description: The agent policy was successfully deleted + value: + id: agent-policy-id-1 + name: My agent policy + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_agent_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - space_ids: - items: + error: type: string - maxItems: 100 - type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - required: - - name - - namespace + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Delete an agent policy + tags: + - Elastic Agent policies + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agent_policies/outputs: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agent_policies/outputs
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get a list of outputs associated with agent policies.

[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read. + operationId: post-fleet-agent-policies-outputs + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + requestBody: + content: + application/json: + examples: + postListAgentPolicyOutputsRequestExample: + description: Get outputs for multiple agent policies + value: + ids: + - agent-policy-id-1 + - agent-policy-id-2 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_list_agent_policy_outputs_request' responses: '200': content: application/json: examples: - putAgentPolicyExample: - description: The updated agent policy + postListAgentPolicyOutputsExample: + description: Outputs associated with the requested agent policies value: - item: - description: An updated agent policy description - id: agent-policy-id-1 - is_managed: false - is_protected: false - name: Updated agent policy - namespace: default - revision: 2 - status: active - updated_at: '2024-01-15T11:00:00.000Z' - updated_by: user1 + items: + - agent_policy_id: agent-policy-id-1 + data_output: + id: output-id-1 + name: Default output + type: elasticsearch + monitoring_output: + id: output-id-1 + name: Default output + type: elasticsearch + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_list_agent_policy_outputs_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: - items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 - type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string - agents: - type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: - type: string - data_output_id: - nullable: true - type: string - description: - type: string - download_source_id: - nullable: true - type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true - type: string - global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. - items: - additionalProperties: false - type: object - properties: - name: - type: string - value: - anyOf: - - type: string - - type: number - required: - - name - - value - maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: - nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 - type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 - type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by - - revision - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error + description: Generic Error type: object properties: attributes: @@ -32968,28 +28881,43 @@ paths: - message - attributes description: Bad Request - summary: Update an agent policy + summary: Get outputs for agent policies tags: - Elastic Agent policies x-metaTags: - content: Kibana name: product_name - /api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status: + /api/fleet/agent_status: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status
+
get /s/{space_id}/api/fleet/agent_status
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the auto-upgrade status for agents assigned to an agent policy.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agent-policies-agentpolicyid-auto-upgrade-agents-status + Get a summary of agent statuses for a given agent policy. + operationId: get-fleet-agent-status parameters: - - description: The ID of the agent policy - in: path - name: agentPolicyId - required: true + - description: Filter by agent policy ID + in: query + name: policyId + required: false + schema: + type: string + - description: Filter by one or more agent policy IDs + in: query + name: policyIds + required: false + schema: + items: + type: string + maxItems: 1000 + type: array + - description: A KQL query string to filter results + in: query + name: kuery + required: false schema: type: string responses: @@ -32997,59 +28925,177 @@ paths: content: application/json: examples: - getAutoUpgradeAgentsStatusExample: - description: Auto-upgrade status for agents in the policy + getAgentStatusExample: + description: Agent status summary for an agent policy value: - agentsCount: 5 - currentVersion: 8.16.0 - failedAgentsCount: 0 - upgradedAgentsCount: 3 - upgradingAgentsCount: 1 + results: + error: 1 + offline: 2 + online: 5 + other: 0 + updating: 0 + totalInactive: 0 schema: additionalProperties: false type: object properties: - currentVersions: + results: + additionalProperties: false + type: object + properties: + active: + type: number + all: + type: number + error: + type: number + events: + type: number + inactive: + type: number + offline: + type: number + online: + type: number + orphaned: + type: number + other: + type: number + unenrolled: + type: number + uninstalled: + type: number + updating: + type: number + required: + - events + - online + - error + - offline + - other + - updating + - inactive + - unenrolled + - all + - active + required: + - results + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Get an agent status summary + tags: + - Elastic Agent status + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agent_status/data: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/agent_status/data
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get the data streams that an agent is actively sending data to.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agent-status-data + parameters: + - description: Agent IDs to check data for, as an array or comma-separated string + in: query + name: agentsIds + required: true + schema: + items: + type: string + maxItems: 10000 + type: array + - description: Filter by integration package name + in: query + name: pkgName + required: false + schema: + type: string + - description: Filter by integration package version + in: query + name: pkgVersion + required: false + schema: + type: string + - description: When true, return a preview of the ingested data + in: query + name: previewData + required: false + schema: + default: false + type: boolean + responses: + '200': + content: + application/json: + examples: + getAgentDataExample: + description: Data streams the agent is actively sending data to + value: items: - additionalProperties: false + - data: + logs-nginx.access-default: + - id: agent-id-1 + name: my-host + total: 1 + totalMonitoring: 0 + schema: + additionalProperties: false + type: object + properties: + dataPreview: + items: + nullable: true + maxItems: 10000 + type: array + items: + items: + additionalProperties: + additionalProperties: false + type: object + properties: + data: + type: boolean + required: + - data type: object - properties: - agents: - description: Number of agents that upgraded to this version - type: number - failedUpgradeActionIds: - description: List of action IDs related to failed upgrades - items: - type: string - maxItems: 1000 - type: array - failedUpgradeAgents: - description: Number of agents that failed to upgrade to this version - type: number - inProgressUpgradeActionIds: - description: List of action IDs related to in-progress upgrades - items: - type: string - maxItems: 1000 - type: array - inProgressUpgradeAgents: - description: Number of agents that are upgrading to this version - type: number - version: - description: Agent version - type: string - required: - - version - - agents - - failedUpgradeAgents - - inProgressUpgradeAgents maxItems: 10000 type: array - totalAgents: - type: number required: - - currentVersions - - totalAgents + - items + - dataPreview description: Successful response '400': content: @@ -33080,23 +29126,23 @@ paths: - message - attributes description: Bad Request - summary: Get auto upgrade agent status + summary: Get incoming agent data tags: - - Elastic Agent policies + - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agent_policies/{agentPolicyId}/copy: + /api/fleet/agentless_policies: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/copy
+
post /s/{space_id}/api/fleet/agentless_policies
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Copy an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. - operationId: post-fleet-agent-policies-agentpolicyid-copy + Create an agentless policy + operationId: post-fleet-agentless-policies parameters: - description: A required header to protect against CSRF attacks in: header @@ -33105,792 +29151,506 @@ paths: schema: example: 'true' type: string - - description: The ID of the agent policy - in: path - name: agentPolicyId - required: true - schema: - type: string - - description: 'Format for the response: simplified or legacy' + - description: The format of the response package policy. in: query name: format required: false schema: + default: simplified enum: - - simplified - legacy + - simplified type: string requestBody: content: application/json: examples: - postCopyAgentPolicyRequestExample: - description: Copy an agent policy with a new name + createAgentlessPoliciesRequestExample: + description: Example request to create agentless policies value: - description: A copy of the original agent policy - name: Copy of my agent policy + description: test + inputs: + ESS Billing-cel: + enabled: true + streams: + ess_billing.billing: + enabled: true + vars: + hide_sensitive: true + http_client_timeout: 30s + lookbehind: 365 + tags: + - forwarded + - billing + ess_billing.credits: + enabled: false + vars: + api_key: + organization_id: '1234' + name: ess_billing-1 + namespace: default + package: + name: ess_billing + version: 1.6.0 + createAgentlessPoliciesReuseAWSCloudConnectorExample: + description: Example request to create agentless policy reusing an existing AWS cloud connector + value: + cloud_connector: + cloud_connector_id: existing-aws-connector-id + target_csp: aws + description: CSPM integration for AWS reusing existing cloud connector + inputs: + cspm-cloudbeat/cis_aws: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + aws.account_type: organization-account + aws.credentials.type: cloud_connector + aws.supports_cloud_connectors: true + external_id: + id: ABCDEFGHIJKLMNOPQRST + isSecretRef: true + role_arn: arn:aws:iam::123456789012:role/TestRole + vars: + cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml + cspm-cloudbeat/cis_azure: + enabled: false + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-aws-reuse-policy + namespace: default + package: + name: cloud_security_posture + version: 3.1.1 + vars: + deployment: aws + posture: cspm + createAgentlessPoliciesWithAWSCloudConnectorExample: + description: Example request to create agentless policy with AWS cloud connector + value: + cloud_connector: + target_csp: aws + description: CSPM integration for AWS with cloud connector + inputs: + cspm-cloudbeat/cis_aws: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + aws.account_type: organization-account + aws.credentials.type: cloud_connector + aws.supports_cloud_connectors: true + external_id: + id: ABCDEFGHIJKLMNOPQRST + isSecretRef: true + role_arn: arn:aws:iam::123456789012:role/TestRole + vars: + cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml + cspm-cloudbeat/cis_azure: + enabled: false + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-aws-policy + namespace: default + package: + name: cloud_security_posture + version: 3.1.1 + vars: + deployment: aws + posture: cspm + createAgentlessPoliciesWithAzureCloudConnectorExample: + description: Example request to create agentless policy with Azure cloud connector + value: + cloud_connector: + target_csp: azure + description: CSPM integration for Azure with cloud connector + inputs: + cspm-cloudbeat/cis_aws: + enabled: false + cspm-cloudbeat/cis_azure: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + azure_credentials_cloud_connector_id: + type: text + value: existing-azure-credentials-connector-id + azure.account_type: organization-account + client_id: + id: client-secret-id + isSecretRef: true + tenant_id: + id: tenant-secret-id + isSecretRef: true + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-azure-policy + namespace: default + package: + name: cloud_security_posture + version: 3.1.1 + vars: + deployment: azure + posture: cspm schema: - additionalProperties: false - type: object - properties: - description: - type: string - name: - minLength: 1 - type: string - required: - - name + $ref: '#/components/schemas/Kibana_HTTP_APIs_simplified_create_package_policy_request' responses: '200': content: application/json: examples: - postCopyAgentPolicyExample: - description: The copied agent policy + createAgentlessPoliciesResponseExample: + description: Example response showing the successful result of communication initialisation over MCP protocol value: item: - description: A copy of the original agent policy - id: agent-policy-id-copy-1 - is_managed: false - is_protected: false - name: Copy of my agent policy + created_at: '2025-11-06T18:27:43.541Z' + created_by: test_user + description: test + enabled: true + id: d52a7812-5736-4fdc-aed8-72152afa1ffa + inputs: + ESS Billing-cel: + enabled: true + streams: + ess_billing.billing: + enabled: true + vars: + hide_sensitive: true + http_client_timeout: 30s + lookbehind: 365 + tags: + - forwarded + - billing + ess_billing.credits: + enabled: false + vars: + api_key: + id: QY1sWpoBbWcMW-edr0Ee + isSecretRef: true + organization_id: '1234' + url: https://billing.elastic-cloud.com + name: ess_billing-1 namespace: default + package: + name: ess_billing + title: Elasticsearch Service Billing + version: 1.6.0 revision: 1 - status: active - updated_at: '2024-01-15T11:00:00.000Z' - updated_by: user1 + secret_references: + - id: QY1sWpoBbWcMW-edr0Ee + supports_agentless: true + updated_at: '2025-11-06T18:27:43.541Z' + updated_by: test_user + version: WzE0OTgsMV0= + createAgentlessPoliciesWithAWSCloudConnectorResponseExample: + description: Example response for AWS cloud connector integration + value: + item: + cloud_connector_id: aws-connector-67890 + created_at: '2025-11-06T18:27:43.541Z' + created_by: test_user + description: CSPM integration for AWS with cloud connector + enabled: true + id: aws-policy-12345 + inputs: + cspm-cloudbeat/cis_aws: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + aws.account_type: organization-account + aws.credentials.type: cloud_connector + external_id: + id: secret-external-id-123 + isSecretRef: true + role_arn: arn:aws:iam::123456789012:role/TestRole + vars: + cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml + cspm-cloudbeat/cis_azure: + enabled: false + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-aws-policy + namespace: default + package: + name: cloud_security_posture + title: Cloud Security Posture Management + version: 3.1.1 + revision: 1 + secret_references: + - id: secret-external-id-123 + supports_agentless: true + supports_cloud_connector: true + updated_at: '2025-11-06T18:27:43.541Z' + updated_by: test_user + vars: + deployment: aws + posture: cspm + version: WzE0OTgsMV0= + createAgentlessPoliciesWithAzureCloudConnectorResponseExample: + description: Example response for Azure cloud connector integration + value: + item: + cloud_connector_id: azure-connector-67890 + created_at: '2025-11-06T18:27:43.541Z' + created_by: test_user + description: CSPM integration for Azure with cloud connector + enabled: true + id: azure-policy-12345 + inputs: + cspm-cloudbeat/cis_aws: + enabled: false + cspm-cloudbeat/cis_azure: + enabled: true + streams: + cloud_security_posture.findings: + enabled: true + vars: + azure_credentials_cloud_connector_id: + type: text + value: existing-azure-credentials-connector-id + azure.account_type: organization-account + client_id: + id: client-secret-id-456 + isSecretRef: true + tenant_id: + id: tenant-secret-id-123 + isSecretRef: true + cspm-cloudbeat/cis_gcp: + enabled: false + name: cspm-azure-policy + namespace: default + package: + name: cloud_security_posture + title: Cloud Security Posture Management + version: 3.1.1 + revision: 1 + secret_references: + - id: tenant-secret-id-123 + - id: client-secret-id-456 + supports_agentless: true + supports_cloud_connector: true + updated_at: '2025-11-06T18:27:43.541Z' + updated_by: test_user + vars: + deployment: azure + posture: cspm + version: WzE0OTgsMV0= schema: additionalProperties: false type: object properties: item: additionalProperties: false + description: The created agentless package policy. type: object properties: - advanced_settings: - additionalProperties: false - type: object - properties: - agent_download_target_directory: - nullable: true - agent_download_timeout: - nullable: true - agent_features_disable_policy_change_acks_enabled: - nullable: true - agent_internal: - nullable: true - agent_limits_go_max_procs: - nullable: true - agent_logging_files_interval: - nullable: true - agent_logging_files_keepfiles: - nullable: true - agent_logging_files_rotateeverybytes: - nullable: true - agent_logging_level: - nullable: true - agent_logging_metrics_period: - nullable: true - agent_logging_to_files: - nullable: true - agent_monitoring_runtime_experimental: - nullable: true - agent_features: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. items: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - name: - type: string - required: - - name - - enabled - maxItems: 100 + type: string + maxItems: 1000 + nullable: true type: array - agentless: - additionalProperties: false - type: object - properties: - cloud_connectors: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - target_csp: - enum: - - aws - - azure - - gcp - type: string - required: - - enabled - cluster_id: - type: string - resources: - additionalProperties: false - type: object - properties: - requests: - additionalProperties: false - type: object - properties: - cpu: - type: string - memory: - type: string agents: type: number - agents_per_version: - items: - additionalProperties: false - type: object - properties: - count: - type: number - version: - type: string - required: - - version - - count - maxItems: 1000 - type: array - created_at: + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. + nullable: true type: string - data_output_id: + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 nullable: true type: string - description: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' type: string - download_source_id: - nullable: true + created_at: type: string - fips_agents: - type: number - fleet_server_host_id: - nullable: true + created_by: + type: string + description: + description: Package policy description type: string + elasticsearch: + additionalProperties: true + type: object + properties: + privileges: + additionalProperties: true + type: object + properties: + cluster: + items: + type: string + maxItems: 100 + type: array + enabled: + type: boolean global_data_tags: - description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. items: additionalProperties: false type: object properties: name: + description: The name of the custom field. Cannot contain spaces. type: string value: anyOf: - type: string - type: number + description: The value of the custom field. required: - name - value maxItems: 100 - type: array - has_agent_version_conditions: - type: boolean - has_fleet_server: - type: boolean - id: - type: string - inactivity_timeout: - default: 1209600 - minimum: 0 - type: number - is_default: - type: boolean - is_default_fleet_server: - type: boolean - is_managed: - type: boolean - is_preconfigured: - type: boolean - is_protected: - description: Indicates whether the agent policy has tamper protection enabled. Default false. - type: boolean - is_verifier: - type: boolean - keep_monitoring_alive: - default: false - description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled - nullable: true - type: boolean - min_agent_version: nullable: true - type: string - monitoring_diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - monitoring_enabled: - items: - enum: - - logs - - metrics - - traces - type: string - maxItems: 3 type: array - monitoring_http: - additionalProperties: false - type: object - properties: - buffer: - additionalProperties: false - type: object - properties: - enabled: - default: false - type: boolean - enabled: - type: boolean - host: - type: string - port: - maximum: 65353 - minimum: 0 - type: number - monitoring_output_id: - nullable: true - type: string - monitoring_pprof_enabled: - type: boolean - name: - minLength: 1 - type: string - namespace: - minLength: 1 + id: + description: Package policy unique identifier. type: string - overrides: - additionalProperties: - nullable: true - description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - package_agent_version_conditions: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version_condition: - type: string - required: - - name - - title - - version_condition - maxItems: 1000 - nullable: true - type: array - package_policies: + inputs: anyOf: - items: - type: string - maxItems: 10000 - type: array - - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter - items: additionalProperties: false type: object properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 + compiled_input: nullable: true - type: string condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: + config: + additionalProperties: additionalProperties: false type: object properties: - name: - description: The name of the custom field. Cannot contain spaces. + frozen: + type: boolean + type: type: string value: - anyOf: - - type: string - - type: number - description: The value of the custom field. + nullable: true required: - - name - value - maxItems: 100 - nullable: true - type: array + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean id: - description: Package policy unique identifier. type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: + keep_enabled: type: boolean - name: - description: Unique name for the package policy. + migrate_from: type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + name: type: string - output_id: - nullable: true + policy_template: type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: additionalProperties: false type: object properties: - data_stream: + dataset: type: string - features: + elasticsearch: additionalProperties: false type: object properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: + dynamic_dataset: type: boolean - tsdb: + dynamic_namespace: type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean id: type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object required: - - id + - enabled + - data_stream + - compiled_stream maxItems: 1000 type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: + type: type: string var_group_selections: additionalProperties: @@ -33898,124 +29658,249 @@ paths: description: Variable group selections. Maps var_group name to the selected option name within that group. type: object vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string + required: + - value + description: Package variable (see integration documentation for more information) + type: object required: - - name + - type - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 + - streams + - compiled_input + maxItems: 100 type: array - required_versions: - items: - additionalProperties: false - type: object - properties: - percentage: - description: Target percentage of agents to auto upgrade - maximum: 100 - minimum: 0 - type: number - version: - description: Target version for automatic agent upgrade - type: string - required: - - version - - percentage - maxItems: 100 - nullable: true - type: array - revision: - type: number - schema_version: - type: string - space_ids: - items: - type: string - maxItems: 100 - type: array - status: - enum: - - active - - inactive - type: string - supports_agentless: - default: false - description: Indicates whether the agent policy supports agentless integrations. - nullable: true - type: boolean - unenroll_timeout: - minimum: 0 - type: number - unprivileged_agents: - type: number - updated_at: - type: string - updated_by: - type: string - version: - type: string - required: - - id - - name - - namespace - - is_protected - - status - - updated_at - - updated_by + - additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that input. Defaults to `true` (enabled). + type: boolean + streams: + additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that stream. Defaults to `true` (enabled). + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Input streams. Refer to the integration documentation to know which streams are available. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package policy inputs. Refer to the integration documentation to know which inputs are available. + type: object + description: Package policy inputs. + is_managed: + type: boolean + name: + description: Unique name for the package policy. + type: string + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: + nullable: true + type: string + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. + nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + revision: + description: Package policy revision. + type: number + secret_references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 1000 + type: array + spaceIds: + items: + type: string + maxItems: 100 + type: array + supports_agentless: + default: false + description: Indicates whether the package policy belongs to an agentless agent policy. + nullable: true + type: boolean + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. + nullable: true + type: boolean + updated_at: + type: string + updated_by: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + anyOf: + - additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package level variable. + version: + description: Package policy ES version. + type: string + required: + - name + - enabled + - inputs + - id - revision + - updated_at + - updated_by + - created_at + - created_by required: - item - description: Successful response + description: Indicates a successful response '400': content: application/json: @@ -34045,66 +29930,94 @@ paths: - message - attributes description: Bad Request - summary: Copy an agent policy + '409': + content: + application/json: + examples: + conflictErrorResponseExample: + description: Example of a conflict error response + value: + error: Conflict + message: An error message describing what went wrong + statusCode: 409 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Conflict + summary: Create an agentless policy tags: - - Elastic Agent policies + - Fleet agentless policies + x-state: Experimental; added in 9.3.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agent_policies/{agentPolicyId}/download: - get: + /api/fleet/agentless_policies/{policyId}: + delete: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/download
+
delete /s/{space_id}/api/fleet/agentless_policies/{policyId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Download an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. - operationId: get-fleet-agent-policies-agentpolicyid-download + Delete an agentless policy + operationId: delete-fleet-agentless-policies-policyid parameters: - - description: The ID of the agent policy - in: path - name: agentPolicyId + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf required: true schema: + example: 'true' type: string - - description: If true, returns the policy as a downloadable file - in: query - name: download - required: false - schema: - type: boolean - - description: If true, returns the policy formatted for standalone agents - in: query - name: standalone - required: false + - description: The ID of the policy to delete. + in: path + name: policyId + required: true schema: - type: boolean - - description: If true, returns the policy formatted for Kubernetes deployment + type: string + - description: Force delete the policy even if the policy is managed. in: query - name: kubernetes + name: force required: false schema: type: boolean - - description: If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags. - in: query - name: revision - required: false - schema: - type: number responses: '200': content: application/json: examples: - getDownloadAgentPolicyExample: - description: The agent policy download response + createAgentlessPoliciesResponseExample: + description: Example response showing the successful result of communication initialisation over MCP protocol value: - item: 'id: agent-policy-id-1\nrevision: 1\noutputs:\n default:\n type: elasticsearch\n hosts:\n - https://elasticsearch.example.com:9200\n' + item: + id: d52a7812-5736-4fdc-aed8-72152afa1ffa schema: - type: string - description: Successful response — returns the agent policy as a YAML file download + additionalProperties: false + description: Response for deleting an agentless package policy. + type: object + properties: + id: + description: The ID of the deleted agentless package policy. + type: string + required: + - id + description: Indicates a successful response '400': content: application/json: @@ -34134,16 +30047,16 @@ paths: - message - attributes description: Bad Request - '404': + '409': content: application/json: examples: - notFoundExample: - description: No agent policy was found with the given ID + conflictErrorResponseExample: + description: Example of a conflict error response value: - error: Not Found - message: Agent policy not found - statusCode: 404 + error: Conflict + message: An error message describing what went wrong + statusCode: 409 schema: additionalProperties: false description: Generic Error @@ -34162,735 +30075,523 @@ paths: required: - message - attributes - description: Not Found - summary: Download an agent policy + description: Conflict + summary: Delete an agentless policy tags: - - Elastic Agent policies + - Fleet agentless policies + x-state: Experimental; added in 9.3.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agent_policies/{agentPolicyId}/full: + /api/fleet/agents: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/full
+
get /s/{space_id}/api/fleet/agents
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a full agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read. - operationId: get-fleet-agent-policies-agentpolicyid-full + List agents, with optional filtering and pagination.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents parameters: - - description: The ID of the agent policy - in: path - name: agentPolicyId - required: true + - description: Page number + in: query + name: page + required: false + schema: + type: number + - description: Number of results per page + in: query + name: perPage + required: false + schema: + default: 20 + type: number + - description: A KQL query string to filter results + in: query + name: kuery + required: false schema: type: string - - description: If true, returns the policy as a downloadable file + - description: When true, include agentless agents in the results in: query - name: download + name: showAgentless required: false schema: + default: true type: boolean - - description: If true, returns the policy formatted for standalone agents + - description: When true, include inactive agents in the results in: query - name: standalone + name: showInactive required: false schema: + default: false type: boolean - - description: If true, returns the policy formatted for Kubernetes deployment + - description: When true, include CPU and memory metrics in the response in: query - name: kubernetes + name: withMetrics required: false schema: + default: false type: boolean - - description: If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags. + - description: When true, only return agents that are upgradeable in: query - name: revision + name: showUpgradeable required: false schema: - type: number + default: false + type: boolean + - description: When true, return a summary of agent statuses in the response + in: query + name: getStatusSummary + required: false + schema: + default: false + type: boolean + - description: Field to sort results by + in: query + name: sortField + required: false + schema: + type: string + - description: Sort order, ascending or descending + in: query + name: sortOrder + required: false + schema: + enum: + - asc + - desc + type: string + - description: JSON-encoded array of sort values for `search_after` pagination + in: query + name: searchAfter + required: false + schema: + type: string + - description: When true, opens a new point-in-time for pagination + in: query + name: openPit + required: false + schema: + type: boolean + - description: Point-in-time ID for pagination + in: query + name: pitId + required: false + schema: + type: string + - description: Duration to keep the point-in-time alive, for example, `1m` + in: query + name: pitKeepAlive + required: false + schema: + type: string responses: '200': content: application/json: examples: - getFullAgentPolicyExample: - description: The full agent policy configuration + getAgentsExample: + description: List of agents value: - item: - agent: - monitoring: - logs: true - metrics: true - id: agent-policy-id-1 - inputs: [] - outputs: - default: - hosts: - - https://elasticsearch.example.com:9200 - type: elasticsearch - revision: 1 + items: + - active: true + enrolled_at: '2024-01-01T00:00:00.000Z' + id: agent-id-1 + policy_id: agent-policy-id-1 + policy_revision: 1 + status: online + type: PERMANENT + updated_at: '2024-01-01T00:00:00.000Z' + page: 1 + perPage: 20 + total: 1 schema: additionalProperties: false type: object properties: - item: - anyOf: - - type: string - - additionalProperties: false - type: object - properties: - agent: + items: + items: + additionalProperties: false + type: object + properties: + access_api_key: + type: string + access_api_key_id: + type: string + active: + type: boolean + agent: + additionalProperties: true + type: object + properties: + id: + type: string + type: + type: string + version: + type: string + required: + - id + - version + audit_unenrolled_reason: + type: string + capabilities: + items: + type: string + maxItems: 100 + type: array + components: + items: additionalProperties: false type: object properties: - download: - additionalProperties: false - type: object - properties: - auth: - additionalProperties: false - type: object - properties: - api_key: - type: string - headers: - items: - additionalProperties: false - type: object - properties: - key: - type: string - value: - type: string - required: - - key - - value - maxItems: 100 - type: array - password: - type: string - username: - type: string - proxy_headers: - additionalProperties: - anyOf: - - type: string - - type: boolean - - type: number - nullable: true - type: object - proxy_url: - type: string - secrets: - additionalProperties: true - type: object - properties: - ssl: - additionalProperties: true - type: object - properties: - key: - additionalProperties: true - type: object - properties: - id: - type: string - required: - - key - sourceURI: - type: string - ssl: - additionalProperties: false - type: object - properties: - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - key: - type: string - renegotiation: - type: string - verification_mode: - type: string - target_directory: - type: string - timeout: - type: string - required: - - sourceURI - features: - additionalProperties: + id: + type: string + message: + type: string + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + type: string + units: + items: additionalProperties: false type: object properties: - enabled: - type: boolean + id: + type: string + message: + type: string + payload: + additionalProperties: + nullable: true + type: object + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + enum: + - input + - output + - '' + type: string required: - - enabled - type: object - internal: - nullable: true - limits: - additionalProperties: false - type: object - properties: - go_max_procs: - type: number - logging: - additionalProperties: false - type: object - properties: - files: - additionalProperties: false - type: object - properties: - interval: - type: string - keepfiles: - type: number - rotateeverybytes: - type: number - level: - type: string - metrics: - additionalProperties: false - type: object - properties: - period: - type: string - to_files: - type: boolean - monitoring: - additionalProperties: false - type: object - properties: - _runtime_experimental: - type: string - apm: - nullable: true - diagnostics: - additionalProperties: false - type: object - properties: - limit: - additionalProperties: false - type: object - properties: - burst: - type: number - interval: - type: string - uploader: - additionalProperties: false - type: object - properties: - init_dur: - type: string - max_dur: - type: string - max_retries: - type: number - enabled: - type: boolean - http: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - host: - type: string - port: - type: number - logs: - type: boolean - metrics: - type: boolean - namespace: - type: string - pprof: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - required: - - enabled - traces: - type: boolean - use_output: - type: string - required: - - enabled - - metrics - - logs - - traces - - apm - protection: - additionalProperties: false - type: object - properties: - enabled: - type: boolean - signing_key: - type: string - uninstall_token_hash: - type: string - required: - - enabled - - uninstall_token_hash - - signing_key + - id + - type + - status + - message + maxItems: 10000 + type: array required: - - monitoring - - download - - features - - internal - connectors: - additionalProperties: - nullable: true - type: object - exporters: - additionalProperties: - nullable: true + - id + - type + - status + - message + maxItems: 10000 + type: array + default_api_key: + type: string + default_api_key_history: + items: + additionalProperties: false + deprecated: true type: object - extensions: - additionalProperties: - nullable: true + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + default_api_key_id: + type: string + effective_config: + nullable: true + enrolled_at: + type: string + health: + additionalProperties: + nullable: true + type: object + id: + type: string + identifying_attributes: + additionalProperties: + type: string + type: object + last_checkin: + type: string + last_checkin_message: + type: string + last_checkin_status: + enum: + - error + - online + - degraded + - updating + - starting + - disconnected + type: string + last_known_status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + local_metadata: + additionalProperties: + nullable: true + type: object + metrics: + additionalProperties: false + type: object + properties: + cpu_avg: + type: number + memory_size_byte_avg: + type: number + namespaces: + items: + type: string + maxItems: 100 + type: array + non_identifying_attributes: + additionalProperties: + type: string + type: object + outputs: + additionalProperties: + additionalProperties: false type: object - fleet: - anyOf: - - additionalProperties: false - type: object - properties: - hosts: - items: + properties: + api_key_id: + type: string + to_retire_api_key_ids: + items: + additionalProperties: false + type: object + properties: + id: type: string - maxItems: 100 - type: array - proxy_headers: - additionalProperties: - anyOf: - - type: string - - type: boolean - - type: number - nullable: true - type: object - proxy_url: - type: string - secrets: - additionalProperties: true - type: object - properties: - ssl: - additionalProperties: true - type: object - properties: - key: - additionalProperties: true - type: object - properties: - id: - type: string - required: - - key - ssl: - additionalProperties: false - type: object - properties: - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - key: - type: string - renegotiation: - type: string - verification_mode: - type: string - required: - - hosts - - additionalProperties: false + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + type: + type: string + type: object + packages: + items: + type: string + maxItems: 10000 + type: array + policy_id: + type: string + policy_revision: + nullable: true + type: number + sequence_num: + type: number + signals: + items: + type: string + maxItems: 50 + type: array + sort: + items: + nullable: true + maxItems: 10 + type: array + status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + tags: + items: + type: string + maxItems: 100 + type: array + type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + - OPAMP + type: string + unenrolled_at: + type: string + unenrollment_started_at: + type: string + unhealthy_reason: + items: + enum: + - input + - output + - other + type: string + maxItems: 3 + nullable: true + type: array + upgrade: + additionalProperties: false + type: object + properties: + rollbacks: + items: + additionalProperties: false type: object properties: - kibana: - additionalProperties: false - type: object - properties: - hosts: - items: - type: string - maxItems: 100 - type: array - path: - type: string - protocol: - type: string - required: - - hosts - - protocol + valid_until: + type: string + version: + type: string required: - - kibana - id: + - valid_until + - version + maxItems: 100 + type: array + upgrade_attempts: + items: type: string - inputs: - items: - additionalProperties: true + maxItems: 10000 + nullable: true + type: array + upgrade_details: + additionalProperties: false + nullable: true + type: object + properties: + action_id: + type: string + metadata: + additionalProperties: false type: object properties: - data_stream: - additionalProperties: true - type: object - properties: - namespace: - type: string - required: - - namespace - id: - type: string - meta: - additionalProperties: true - type: object - properties: - package: - additionalProperties: true - type: object - properties: - name: - type: string - version: - type: string - required: - - name - - version - name: - type: string - package_policy_id: - type: string - processors: - items: - additionalProperties: true - type: object - properties: - add_fields: - additionalProperties: true - type: object - properties: - fields: - additionalProperties: - anyOf: - - type: string - - type: number - type: object - target: - type: string - required: - - target - - fields - required: - - add_fields - maxItems: 10000 - type: array - revision: + download_percent: type: number - streams: - items: - additionalProperties: true - type: object - properties: - data_stream: - additionalProperties: true - type: object - properties: - dataset: - type: string - type: - type: string - required: - - dataset - id: - type: string - required: - - id - - data_stream - maxItems: 10000 - type: array - type: + download_rate: + type: number + error_msg: type: string - use_output: + failed_state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK type: string - required: - - id - - name - - revision - - type - - data_stream - - use_output - - package_policy_id - maxItems: 10000 - type: array - namespaces: - items: - type: string - maxItems: 100 - type: array - output_permissions: - additionalProperties: - additionalProperties: - nullable: true - type: object - type: object - outputs: - additionalProperties: - additionalProperties: true - type: object - properties: - ca_sha256: - nullable: true + reason: type: string - hosts: - items: - type: string - maxItems: 100 - type: array - proxy_headers: - additionalProperties: - anyOf: - - type: string - - type: boolean - - type: number - nullable: true - type: object - proxy_url: + retry_error_msg: type: string - type: + retry_until: type: string - required: - - type - type: object - processors: - additionalProperties: - nullable: true - type: object - receivers: - additionalProperties: - nullable: true - type: object - revision: - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 10000 - type: array - service: - additionalProperties: false - type: object - properties: - extensions: - items: + scheduled_at: type: string - maxItems: 1000 - type: array - pipelines: - additionalProperties: - additionalProperties: false - type: object - properties: - exporters: - items: - type: string - maxItems: 1000 - type: array - processors: - items: - type: string - maxItems: 1000 - type: array - receivers: - items: - type: string - maxItems: 1000 - type: array - type: object - signed: - additionalProperties: false - type: object - properties: - data: - type: string - signature: - type: string - required: - - data - - signature - required: - - id - - outputs - - inputs - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: + state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + target_version: + type: string + required: + - target_version + - action_id + - state + upgrade_started_at: + nullable: true + type: string + upgraded_at: + nullable: true + type: string + user_provided_metadata: + additionalProperties: + nullable: true + type: object + required: + - id + - packages + - type + - active + - enrolled_at + - local_metadata + - effective_config + maxItems: 10000 + type: array + nextSearchAfter: type: string - statusCode: + page: type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent policy was found with the given ID - value: - error: Not Found - message: Agent policy not found - statusCode: 404 - description: Not Found - summary: Get a full agent policy - tags: - - Elastic Agent policies - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/agent_policies/{agentPolicyId}/outputs: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/outputs
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get a list of outputs associated with agent policy by policy id.

[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read. - operationId: get-fleet-agent-policies-agentpolicyid-outputs - parameters: - - description: The ID of the agent policy - in: path - name: agentPolicyId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getAgentPolicyOutputsExample: - description: Outputs associated with the agent policy - value: - item: - data_output: - id: output-id-1 - name: Default output - type: elasticsearch - monitoring_output: - id: output-id-1 - name: Default output - type: elasticsearch - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false + perPage: + type: number + pit: + type: string + statusSummary: + additionalProperties: + type: number type: object - properties: - agentPolicyId: - type: string - data: - additionalProperties: false - type: object - properties: - integrations: - items: - additionalProperties: false - type: object - properties: - id: - type: string - integrationPolicyName: - type: string - name: - type: string - pkgName: - type: string - maxItems: 1000 - type: array - output: - additionalProperties: false - type: object - properties: - id: - type: string - name: - type: string - required: - - id - - name - required: - - output - monitoring: - additionalProperties: false - type: object - properties: - output: - additionalProperties: false - type: object - properties: - id: - type: string - name: - type: string - required: - - id - - name - required: - - output - required: - - monitoring - - data + total: + type: number required: - - item + - items + - total + - page + - perPage description: Successful response '400': content: @@ -34921,34 +30622,22 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent policy was found with the given ID - value: - error: Not Found - message: Agent policy not found - statusCode: 404 - description: Not Found - summary: Get outputs for an agent policy + summary: Get agents tags: - - Elastic Agent policies + - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agent_policies/delete: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agent_policies/delete
+
post /s/{space_id}/api/fleet/agents
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete an agent policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all. - operationId: post-fleet-agent-policies-delete + Retrieve agents associated with specific action IDs.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: post-fleet-agents parameters: - description: A required header to protect against CSRF attacks in: header @@ -34961,43 +30650,48 @@ paths: content: application/json: examples: - postDeleteAgentPolicyRequestExample: - description: Delete an agent policy by ID + postGetAgentsByActionsRequestExample: + description: Retrieve agents associated with specific action IDs value: - agentPolicyId: agent-policy-id-1 + actionIds: + - action-id-1 + - action-id-2 schema: additionalProperties: false type: object properties: - agentPolicyId: - description: The ID of the agent policy - type: string - force: - description: bypass validation checks that can prevent agent policy deletion - type: boolean + actionIds: + items: + type: string + maxItems: 1000 + type: array required: - - agentPolicyId + - actionIds responses: '200': content: application/json: examples: - postDeleteAgentPolicyExample: - description: The agent policy was successfully deleted + postGetAgentsByActionsExample: + description: Agents associated with the given actions value: - id: agent-policy-id-1 - name: My agent policy + items: + - active: true + id: agent-id-1 + policy_id: agent-policy-id-1 + status: online + total: 1 schema: additionalProperties: false type: object properties: - id: - type: string - name: - type: string + items: + items: + type: string + maxItems: 10000 + type: array required: - - id - - name + - items description: Successful response '400': content: @@ -35028,23 +30722,23 @@ paths: - message - attributes description: Bad Request - summary: Delete an agent policy + summary: Get agents by action ids tags: - - Elastic Agent policies + - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agent_policies/outputs: - post: + /api/fleet/agents/{agentId}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agent_policies/outputs
+
delete /s/{space_id}/api/fleet/agents/{agentId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of outputs associated with agent policies.

[Required authorization] Route required privileges: fleet-agent-policies-read AND fleet-settings-read. - operationId: post-fleet-agent-policies-outputs + Delete an agent by ID.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: delete-fleet-agents-agentid parameters: - description: A required header to protect against CSRF attacks in: header @@ -35053,113 +30747,32 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - postListAgentPolicyOutputsRequestExample: - description: Get outputs for multiple agent policies - value: - ids: - - agent-policy-id-1 - - agent-policy-id-2 - schema: - additionalProperties: false - type: object - properties: - ids: - description: list of package policy ids - items: - type: string - maxItems: 1000 - type: array - required: - - ids + - description: The agent ID + in: path + name: agentId + required: true + schema: + type: string responses: '200': content: application/json: examples: - postListAgentPolicyOutputsExample: - description: Outputs associated with the requested agent policies + deleteAgentExample: + description: Agent successfully deleted value: - items: - - agent_policy_id: agent-policy-id-1 - data_output: - id: output-id-1 - name: Default output - type: elasticsearch - monitoring_output: - id: output-id-1 - name: Default output - type: elasticsearch + id: agent-id-1 + success: true schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - agentPolicyId: - type: string - data: - additionalProperties: false - type: object - properties: - integrations: - items: - additionalProperties: false - type: object - properties: - id: - type: string - integrationPolicyName: - type: string - name: - type: string - pkgName: - type: string - maxItems: 1000 - type: array - output: - additionalProperties: false - type: object - properties: - id: - type: string - name: - type: string - required: - - id - - name - required: - - output - monitoring: - additionalProperties: false - type: object - properties: - output: - additionalProperties: false - type: object - properties: - id: - type: string - name: - type: string - required: - - id - - name - required: - - output - required: - - monitoring - - data - maxItems: 10000 - type: array + action: + enum: + - deleted + type: string required: - - items + - action description: Successful response '400': content: @@ -35190,105 +30803,437 @@ paths: - message - attributes description: Bad Request - summary: Get outputs for agent policies + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent was found with the given ID + value: + error: Not Found + message: Agent agent-id-1 not found + statusCode: 404 + description: Not Found + summary: Delete an agent tags: - - Elastic Agent policies + - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agent_status: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agent_status
+
get /s/{space_id}/api/fleet/agents/{agentId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a summary of agent statuses for a given agent policy. - operationId: get-fleet-agent-status + Get an agent by ID.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-agentid parameters: - - description: Filter by agent policy ID - in: query - name: policyId - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: type: string - - description: Filter by one or more agent policy IDs - in: query - name: policyIds - required: false - schema: - items: - type: string - maxItems: 1000 - type: array - - description: A KQL query string to filter results + - description: When true, include CPU and memory metrics in the response in: query - name: kuery + name: withMetrics required: false schema: - type: string + default: false + type: boolean responses: '200': content: application/json: examples: - getAgentStatusExample: - description: Agent status summary for an agent policy + getAgentExample: + description: Agent details value: - results: - error: 1 - offline: 2 - online: 5 - other: 0 - updating: 0 - totalInactive: 0 + item: + active: true + agent_id: agent-id-1 + enrolled_at: '2024-01-01T00:00:00.000Z' + id: agent-id-1 + local_metadata: + elastic: + agent: + version: 8.17.0 + host: + hostname: my-host + os: + name: linux + policy_id: agent-policy-id-1 + policy_revision: 1 + status: online + type: PERMANENT + updated_at: '2024-01-01T00:00:00.000Z' schema: additionalProperties: false type: object properties: - results: + item: additionalProperties: false type: object properties: + access_api_key: + type: string + access_api_key_id: + type: string active: - type: number - all: - type: number - error: - type: number - events: - type: number - inactive: - type: number - offline: - type: number - online: - type: number - orphaned: - type: number - other: - type: number - unenrolled: - type: number - uninstalled: - type: number - updating: - type: number - required: - - events - - online - - error - - offline - - other - - updating - - inactive - - unenrolled - - all + type: boolean + agent: + additionalProperties: true + type: object + properties: + id: + type: string + type: + type: string + version: + type: string + required: + - id + - version + audit_unenrolled_reason: + type: string + capabilities: + items: + type: string + maxItems: 100 + type: array + components: + items: + additionalProperties: false + type: object + properties: + id: + type: string + message: + type: string + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + type: string + units: + items: + additionalProperties: false + type: object + properties: + id: + type: string + message: + type: string + payload: + additionalProperties: + nullable: true + type: object + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + enum: + - input + - output + - '' + type: string + required: + - id + - type + - status + - message + maxItems: 10000 + type: array + required: + - id + - type + - status + - message + maxItems: 10000 + type: array + default_api_key: + type: string + default_api_key_history: + items: + additionalProperties: false + deprecated: true + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + default_api_key_id: + type: string + effective_config: + nullable: true + enrolled_at: + type: string + health: + additionalProperties: + nullable: true + type: object + id: + type: string + identifying_attributes: + additionalProperties: + type: string + type: object + last_checkin: + type: string + last_checkin_message: + type: string + last_checkin_status: + enum: + - error + - online + - degraded + - updating + - starting + - disconnected + type: string + last_known_status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + local_metadata: + additionalProperties: + nullable: true + type: object + metrics: + additionalProperties: false + type: object + properties: + cpu_avg: + type: number + memory_size_byte_avg: + type: number + namespaces: + items: + type: string + maxItems: 100 + type: array + non_identifying_attributes: + additionalProperties: + type: string + type: object + outputs: + additionalProperties: + additionalProperties: false + type: object + properties: + api_key_id: + type: string + to_retire_api_key_ids: + items: + additionalProperties: false + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + type: + type: string + type: object + packages: + items: + type: string + maxItems: 10000 + type: array + policy_id: + type: string + policy_revision: + nullable: true + type: number + sequence_num: + type: number + signals: + items: + type: string + maxItems: 50 + type: array + sort: + items: + nullable: true + maxItems: 10 + type: array + status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + tags: + items: + type: string + maxItems: 100 + type: array + type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + - OPAMP + type: string + unenrolled_at: + type: string + unenrollment_started_at: + type: string + unhealthy_reason: + items: + enum: + - input + - output + - other + type: string + maxItems: 3 + nullable: true + type: array + upgrade: + additionalProperties: false + type: object + properties: + rollbacks: + items: + additionalProperties: false + type: object + properties: + valid_until: + type: string + version: + type: string + required: + - valid_until + - version + maxItems: 100 + type: array + upgrade_attempts: + items: + type: string + maxItems: 10000 + nullable: true + type: array + upgrade_details: + additionalProperties: false + nullable: true + type: object + properties: + action_id: + type: string + metadata: + additionalProperties: false + type: object + properties: + download_percent: + type: number + download_rate: + type: number + error_msg: + type: string + failed_state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + reason: + type: string + retry_error_msg: + type: string + retry_until: + type: string + scheduled_at: + type: string + state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + target_version: + type: string + required: + - target_version + - action_id + - state + upgrade_started_at: + nullable: true + type: string + upgraded_at: + nullable: true + type: string + user_provided_metadata: + additionalProperties: + nullable: true + type: object + required: + - id + - packages + - type - active + - enrolled_at + - local_metadata + - effective_config required: - - results + - item description: Successful response '400': content: @@ -35319,139 +31264,33 @@ paths: - message - attributes description: Bad Request - summary: Get an agent status summary - tags: - - Elastic Agent status - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/agent_status/data: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/agent_status/data
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get the data streams that an agent is actively sending data to.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agent-status-data - parameters: - - description: Agent IDs to check data for, as an array or comma-separated string - in: query - name: agentsIds - required: true - schema: - items: - type: string - maxItems: 10000 - type: array - - description: Filter by integration package name - in: query - name: pkgName - required: false - schema: - type: string - - description: Filter by integration package version - in: query - name: pkgVersion - required: false - schema: - type: string - - description: When true, return a preview of the ingested data - in: query - name: previewData - required: false - schema: - default: false - type: boolean - responses: - '200': - content: - application/json: - examples: - getAgentDataExample: - description: Data streams the agent is actively sending data to - value: - items: - - data: - logs-nginx.access-default: - - id: agent-id-1 - name: my-host - total: 1 - totalMonitoring: 0 - schema: - additionalProperties: false - type: object - properties: - dataPreview: - items: - nullable: true - maxItems: 10000 - type: array - items: - items: - additionalProperties: - additionalProperties: false - type: object - properties: - data: - type: boolean - required: - - data - type: object - maxItems: 10000 - type: array - required: - - items - - dataPreview - description: Successful response - '400': + '404': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + notFoundExample: + description: No agent was found with the given ID value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get incoming agent data + error: Not Found + message: Agent agent-id-1 not found + statusCode: 404 + description: Not Found + summary: Get an agent tags: - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agentless_policies: - post: + put: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agentless_policies
+
put /s/{space_id}/api/fleet/agents/{agentId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create an agentless policy - operationId: post-fleet-agentless-policies + Update an agent by ID.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: put-fleet-agents-agentid parameters: - description: A required header to protect against CSRF attacks in: header @@ -35460,1107 +31299,614 @@ paths: schema: example: 'true' type: string - - description: The format of the response package policy. - in: query - name: format - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: - default: simplified - enum: - - legacy - - simplified type: string requestBody: content: application/json: examples: - createAgentlessPoliciesRequestExample: - description: Example request to create agentless policies + putAgentRequestExample: + description: Update agent tags value: - description: test - inputs: - ESS Billing-cel: - enabled: true - streams: - ess_billing.billing: - enabled: true - vars: - hide_sensitive: true - http_client_timeout: 30s - lookbehind: 365 - tags: - - forwarded - - billing - ess_billing.credits: - enabled: false - vars: - api_key: - organization_id: '1234' - name: ess_billing-1 - namespace: default - package: - name: ess_billing - version: 1.6.0 - createAgentlessPoliciesReuseAWSCloudConnectorExample: - description: Example request to create agentless policy reusing an existing AWS cloud connector - value: - cloud_connector: - cloud_connector_id: existing-aws-connector-id - target_csp: aws - description: CSPM integration for AWS reusing existing cloud connector - inputs: - cspm-cloudbeat/cis_aws: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - aws.account_type: organization-account - aws.credentials.type: cloud_connector - aws.supports_cloud_connectors: true - external_id: - id: ABCDEFGHIJKLMNOPQRST - isSecretRef: true - role_arn: arn:aws:iam::123456789012:role/TestRole - vars: - cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml - cspm-cloudbeat/cis_azure: - enabled: false - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-aws-reuse-policy - namespace: default - package: - name: cloud_security_posture - version: 3.1.1 - vars: - deployment: aws - posture: cspm - createAgentlessPoliciesWithAWSCloudConnectorExample: - description: Example request to create agentless policy with AWS cloud connector - value: - cloud_connector: - target_csp: aws - description: CSPM integration for AWS with cloud connector - inputs: - cspm-cloudbeat/cis_aws: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - aws.account_type: organization-account - aws.credentials.type: cloud_connector - aws.supports_cloud_connectors: true - external_id: - id: ABCDEFGHIJKLMNOPQRST - isSecretRef: true - role_arn: arn:aws:iam::123456789012:role/TestRole - vars: - cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml - cspm-cloudbeat/cis_azure: - enabled: false - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-aws-policy - namespace: default - package: - name: cloud_security_posture - version: 3.1.1 - vars: - deployment: aws - posture: cspm - createAgentlessPoliciesWithAzureCloudConnectorExample: - description: Example request to create agentless policy with Azure cloud connector - value: - cloud_connector: - target_csp: azure - description: CSPM integration for Azure with cloud connector - inputs: - cspm-cloudbeat/cis_aws: - enabled: false - cspm-cloudbeat/cis_azure: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - azure_credentials_cloud_connector_id: - type: text - value: existing-azure-credentials-connector-id - azure.account_type: organization-account - client_id: - id: client-secret-id - isSecretRef: true - tenant_id: - id: tenant-secret-id - isSecretRef: true - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-azure-policy - namespace: default - package: - name: cloud_security_posture - version: 3.1.1 - vars: - deployment: azure - posture: cspm + tags: + - production + - linux schema: additionalProperties: false type: object properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. + tags: items: type: string - maxItems: 100 - nullable: true + maxItems: 10 type: array - cloud_connector: - additionalProperties: false + user_provided_metadata: + additionalProperties: + nullable: true type: object - properties: - cloud_connector_id: - description: ID of an existing cloud connector to reuse. If not provided, a new connector will be created. - type: string - enabled: - default: false - description: Whether cloud connectors are enabled for this policy. - type: boolean - name: - description: Optional name for the cloud connector. If not provided, will be auto-generated from credentials. - maxLength: 255 - minLength: 1 - type: string - target_csp: - description: Target cloud service provider. If not provided, will be auto-detected from inputs. - enum: - - aws - - azure - - gcp - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Policy description. - type: string - force: - description: Force package policy creation even if the package is not verified, or if the agent policy is managed. - type: boolean - global_data_tags: - items: + responses: + '200': + content: + application/json: + examples: + putAgentExample: + description: Updated agent details + value: + item: + active: true + enrolled_at: '2024-01-01T00:00:00.000Z' + id: agent-id-1 + policy_id: agent-policy-id-1 + policy_revision: 1 + status: online + tags: + - production + - linux + type: PERMANENT + updated_at: '2024-01-01T00:00:00.000Z' + schema: + additionalProperties: false + type: object + properties: + item: additionalProperties: false type: object properties: - name: - description: The name of the custom field. Cannot contain spaces. + access_api_key: type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - type: array - id: - description: Policy unique identifier. - type: string - inputs: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + access_api_key_id: type: string - deprecated: - additionalProperties: false + active: + type: boolean + agent: + additionalProperties: true type: object properties: - description: + id: type: string - replaced_by: - additionalProperties: - type: string - type: object - since: + type: + type: string + version: type: string required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: + - id + - version + audit_unenrolled_reason: + type: string + capabilities: + items: + type: string + maxItems: 100 + type: array + components: + items: additionalProperties: false type: object properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + id: type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: + message: + type: string + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + type: string + units: + items: + additionalProperties: false + type: object + properties: + id: type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false + message: + type: string + payload: + additionalProperties: + nullable: true type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + enum: + - input + - output + - '' + type: string + required: + - id + - type + - status + - message + maxItems: 10000 + type: array + required: + - id + - type + - status + - message + maxItems: 10000 + type: array + default_api_key: + type: string + default_api_key_history: + items: + additionalProperties: false + deprecated: true + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + default_api_key_id: + type: string + effective_config: + nullable: true + enrolled_at: + type: string + health: + additionalProperties: + nullable: true type: object - vars: + id: + type: string + identifying_attributes: + additionalProperties: + type: string + type: object + last_checkin: + type: string + last_checkin_message: + type: string + last_checkin_status: + enum: + - error + - online + - degraded + - updating + - starting + - disconnected + type: string + last_known_status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + local_metadata: additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - name: - description: Unique name for the policy. - type: string - namespace: - description: Policy namespace. When not specified, it inherits the agent policy namespace. - type: string - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: + metrics: additionalProperties: false type: object properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - policy_template: - description: The policy template to use for the agentless package policy. If not provided, the default policy template will be used. - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: + cpu_avg: + type: number + memory_size_byte_avg: + type: number + namespaces: + items: type: string maxItems: 100 type: array - - items: - type: number + non_identifying_attributes: + additionalProperties: + type: string + type: object + outputs: + additionalProperties: + additionalProperties: false + type: object + properties: + api_key_id: + type: string + to_retire_api_key_ids: + items: + additionalProperties: false + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + maxItems: 100 + type: array + type: + type: string + type: object + packages: + items: + type: string + maxItems: 10000 + type: array + policy_id: + type: string + policy_revision: + nullable: true + type: number + sequence_num: + type: number + signals: + items: + type: string + maxItems: 50 + type: array + sort: + items: + nullable: true + maxItems: 10 + type: array + status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + - uninstalled + - orphaned + type: string + tags: + items: + type: string maxItems: 100 type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - required: - - name - - package - responses: - '200': + type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + - OPAMP + type: string + unenrolled_at: + type: string + unenrollment_started_at: + type: string + unhealthy_reason: + items: + enum: + - input + - output + - other + type: string + maxItems: 3 + nullable: true + type: array + upgrade: + additionalProperties: false + type: object + properties: + rollbacks: + items: + additionalProperties: false + type: object + properties: + valid_until: + type: string + version: + type: string + required: + - valid_until + - version + maxItems: 100 + type: array + upgrade_attempts: + items: + type: string + maxItems: 10000 + nullable: true + type: array + upgrade_details: + additionalProperties: false + nullable: true + type: object + properties: + action_id: + type: string + metadata: + additionalProperties: false + type: object + properties: + download_percent: + type: number + download_rate: + type: number + error_msg: + type: string + failed_state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + reason: + type: string + retry_error_msg: + type: string + retry_until: + type: string + scheduled_at: + type: string + state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + target_version: + type: string + required: + - target_version + - action_id + - state + upgrade_started_at: + nullable: true + type: string + upgraded_at: + nullable: true + type: string + user_provided_metadata: + additionalProperties: + nullable: true + type: object + required: + - id + - packages + - type + - active + - enrolled_at + - local_metadata + - effective_config + required: + - item + description: Successful response + '400': content: application/json: examples: - createAgentlessPoliciesResponseExample: - description: Example response showing the successful result of communication initialisation over MCP protocol + genericErrorResponseExample: + description: Example of a generic error response value: - item: - created_at: '2025-11-06T18:27:43.541Z' - created_by: test_user - description: test - enabled: true - id: d52a7812-5736-4fdc-aed8-72152afa1ffa - inputs: - ESS Billing-cel: - enabled: true - streams: - ess_billing.billing: - enabled: true - vars: - hide_sensitive: true - http_client_timeout: 30s - lookbehind: 365 - tags: - - forwarded - - billing - ess_billing.credits: - enabled: false - vars: - api_key: - id: QY1sWpoBbWcMW-edr0Ee - isSecretRef: true - organization_id: '1234' - url: https://billing.elastic-cloud.com - name: ess_billing-1 - namespace: default - package: - name: ess_billing - title: Elasticsearch Service Billing - version: 1.6.0 - revision: 1 - secret_references: - - id: QY1sWpoBbWcMW-edr0Ee - supports_agentless: true - updated_at: '2025-11-06T18:27:43.541Z' - updated_by: test_user - version: WzE0OTgsMV0= - createAgentlessPoliciesWithAWSCloudConnectorResponseExample: - description: Example response for AWS cloud connector integration + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No agent was found with the given ID value: - item: - cloud_connector_id: aws-connector-67890 - created_at: '2025-11-06T18:27:43.541Z' - created_by: test_user - description: CSPM integration for AWS with cloud connector - enabled: true - id: aws-policy-12345 - inputs: - cspm-cloudbeat/cis_aws: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - aws.account_type: organization-account - aws.credentials.type: cloud_connector - external_id: - id: secret-external-id-123 - isSecretRef: true - role_arn: arn:aws:iam::123456789012:role/TestRole - vars: - cloud_formation_template: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml - cspm-cloudbeat/cis_azure: - enabled: false - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-aws-policy - namespace: default - package: - name: cloud_security_posture - title: Cloud Security Posture Management - version: 3.1.1 - revision: 1 - secret_references: - - id: secret-external-id-123 - supports_agentless: true - supports_cloud_connector: true - updated_at: '2025-11-06T18:27:43.541Z' - updated_by: test_user - vars: - deployment: aws - posture: cspm - version: WzE0OTgsMV0= - createAgentlessPoliciesWithAzureCloudConnectorResponseExample: - description: Example response for Azure cloud connector integration + error: Not Found + message: Agent agent-id-1 not found + statusCode: 404 + description: Not Found + summary: Update an agent by ID + tags: + - Elastic Agents + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agents/{agentId}/actions: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/actions
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Create a new action for a specific agent.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-actions + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The agent ID + in: path + name: agentId + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + postAgentActionRequestExample: + description: Create a UNENROLL action for an agent + value: + action: + type: UNENROLL + schema: + additionalProperties: false + type: object + properties: + action: + anyOf: + - additionalProperties: false + type: object + properties: + ack_data: + nullable: true + data: + nullable: true + type: + enum: + - UNENROLL + - UPGRADE + - POLICY_REASSIGN + type: string + required: + - type + - data + - ack_data + - additionalProperties: false + type: object + properties: + data: + additionalProperties: false + type: object + properties: + log_level: + enum: + - debug + - info + - warning + - error + nullable: true + type: string + required: + - log_level + type: + enum: + - SETTINGS + type: string + required: + - type + - data + required: + - action + responses: + '200': + content: + application/json: + examples: + postAgentActionExample: + description: Created agent action value: item: - cloud_connector_id: azure-connector-67890 - created_at: '2025-11-06T18:27:43.541Z' - created_by: test_user - description: CSPM integration for Azure with cloud connector - enabled: true - id: azure-policy-12345 - inputs: - cspm-cloudbeat/cis_aws: - enabled: false - cspm-cloudbeat/cis_azure: - enabled: true - streams: - cloud_security_posture.findings: - enabled: true - vars: - azure_credentials_cloud_connector_id: - type: text - value: existing-azure-credentials-connector-id - azure.account_type: organization-account - client_id: - id: client-secret-id-456 - isSecretRef: true - tenant_id: - id: tenant-secret-id-123 - isSecretRef: true - cspm-cloudbeat/cis_gcp: - enabled: false - name: cspm-azure-policy - namespace: default - package: - name: cloud_security_posture - title: Cloud Security Posture Management - version: 3.1.1 - revision: 1 - secret_references: - - id: tenant-secret-id-123 - - id: client-secret-id-456 - supports_agentless: true - supports_cloud_connector: true - updated_at: '2025-11-06T18:27:43.541Z' - updated_by: test_user - vars: - deployment: azure - posture: cspm - version: WzE0OTgsMV0= + agents: + - agent-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: action-id-1 + type: UNENROLL schema: additionalProperties: false type: object properties: item: additionalProperties: false - description: The created agentless package policy. type: object properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. + ack_data: + nullable: true + agents: items: type: string - maxItems: 1000 - nullable: true + maxItems: 10000 type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string created_at: type: string - created_by: + data: + nullable: true + expiration: type: string - description: - description: Package policy description + id: type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: + minimum_execution_duration: + type: number + namespaces: items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value + type: string maxItems: 100 - nullable: true type: array - id: - description: Package policy unique identifier. + rollout_duration_seconds: + type: number + sent_at: type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: + source_uri: type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true + start_time: type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. + total: type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. + type: type: string required: - - name - - enabled - - inputs - id - - revision - - updated_at - - updated_by + - type + - data - created_at - - created_by + - ack_data required: - item - description: Indicates a successful response + description: Successful response '400': content: application/json: @@ -36590,133 +31936,54 @@ paths: - message - attributes description: Bad Request - '409': - content: - application/json: - examples: - conflictErrorResponseExample: - description: Example of a conflict error response - value: - error: Conflict - message: An error message describing what went wrong - statusCode: 409 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Conflict - summary: Create an agentless policy + summary: Create an agent action tags: - - Fleet agentless policies - x-state: Experimental; added in 9.3.0 + - Elastic Agent actions x-metaTags: - content: Kibana name: product_name - /api/fleet/agentless_policies/{policyId}: - delete: + /api/fleet/agents/{agentId}/effective_config: + get: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/agentless_policies/{policyId}
+
get /s/{space_id}/api/fleet/agents/{agentId}/effective_config
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete an agentless policy - operationId: delete-fleet-agentless-policies-policyid + Get an agent's effective config by ID.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-agentid-effective-config parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the policy to delete. + - description: The agent ID to get effective config of in: path - name: policyId + name: agentId required: true schema: type: string - - description: Force delete the policy even if the policy is managed. - in: query - name: force - required: false - schema: - type: boolean responses: '200': content: application/json: examples: - createAgentlessPoliciesResponseExample: - description: Example response showing the successful result of communication initialisation over MCP protocol - value: - item: - id: d52a7812-5736-4fdc-aed8-72152afa1ffa - schema: - additionalProperties: false - description: Response for deleting an agentless package policy. - type: object - properties: - id: - description: The ID of the deleted agentless package policy. - type: string - required: - - id - description: Indicates a successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response + successResponse: value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 + effective_config: {} schema: additionalProperties: false - description: Generic Error type: object properties: - attributes: + effective_config: nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number required: - - message - - attributes - description: Bad Request - '409': + - effective_config + description: 'OK: A successful request.' + '400': content: application/json: examples: - conflictErrorResponseExample: - description: Example of a conflict error response + badRequestResponse: value: - error: Conflict - message: An error message describing what went wrong - statusCode: 409 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -36735,523 +32002,451 @@ paths: required: - message - attributes - description: Conflict - summary: Delete an agentless policy + description: A bad request. + summary: Get an agent's effective config tags: - - Fleet agentless policies - x-state: Experimental; added in 9.3.0 + - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agents: - get: - description: |- + /api/fleet/agents/{agentId}/migrate: + post: + description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents
+
post /s/{space_id}/api/fleet/agents/{agentId}/migrate
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - List agents, with optional filtering and pagination.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents + Migrate a single agent to another cluster.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-migrate parameters: - - description: Page number - in: query - name: page - required: false - schema: - type: number - - description: Number of results per page - in: query - name: perPage - required: false - schema: - default: 20 - type: number - - description: A KQL query string to filter results - in: query - name: kuery - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: When true, include agentless agents in the results - in: query - name: showAgentless - required: false - schema: - default: true - type: boolean - - description: When true, include inactive agents in the results - in: query - name: showInactive - required: false - schema: - default: false - type: boolean - - description: When true, include CPU and memory metrics in the response - in: query - name: withMetrics - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: - default: false - type: boolean - - description: When true, only return agents that are upgradeable - in: query - name: showUpgradeable - required: false + type: string + requestBody: + content: + application/json: + examples: + postMigrateAgentRequestExample: + description: Migrate a single agent to another cluster + value: + enrollment_token: enrollment-token-value + settings: + retry_max: 5 + uri: https://fleet-server.example.com:8220 + schema: + additionalProperties: false + type: object + properties: + enrollment_token: + type: string + settings: + additionalProperties: false + type: object + properties: + ca_sha256: + type: string + certificate_authorities: + type: string + elastic_agent_cert: + type: string + elastic_agent_cert_key: + type: string + elastic_agent_cert_key_passphrase: + type: string + headers: + additionalProperties: + type: string + type: object + insecure: + type: boolean + proxy_disabled: + type: boolean + proxy_headers: + additionalProperties: + type: string + type: object + proxy_url: + type: string + replace_token: + type: string + staging: + type: string + tags: + items: + type: string + maxItems: 10 + type: array + uri: + format: uri + type: string + required: + - uri + - enrollment_token + responses: + '200': + content: + application/json: + examples: + postMigrateAgentExample: + description: Agent migration initiated + value: + actionId: action-id-1 + schema: + additionalProperties: false + type: object + properties: + actionId: + type: string + required: + - actionId + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Migrate a single agent + tags: + - Elastic Agents + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agents/{agentId}/privilege_level_change: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/privilege_level_change
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Change the privilege level of a single agent to unprivileged.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-privilege-level-change + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: - default: false - type: boolean - - description: When true, return a summary of agent statuses in the response - in: query - name: getStatusSummary - required: false + example: 'true' + type: string + - description: The agent ID to change privilege level for + in: path + name: agentId + required: true schema: - default: false - type: boolean - - description: Field to sort results by - in: query - name: sortField - required: false + type: string + requestBody: + content: + application/json: + examples: + changeAgentPrivilegeLevelRequest: + value: + user_info: + groupname: groupname + password: password + username: username + schema: + additionalProperties: false + nullable: true + type: object + properties: + user_info: + additionalProperties: false + type: object + properties: + groupname: + type: string + password: + type: string + username: + type: string + responses: + '200': + content: + application/json: + examples: + successResponse: + value: + actionId: actionId + schema: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_action_id_response' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_action_message_response' + description: 'OK: A successful request.' + '400': + content: + application/json: + examples: + badRequestResponse: + value: + message: Bad Request + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: A bad request. + summary: Change agent privilege level + tags: + - Elastic Agents + x-state: Experimental; added in 9.3.0 + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agents/{agentId}/reassign: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/reassign
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Reassign an agent to a different agent policy.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-reassign + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: Sort order, ascending or descending - in: query - name: sortOrder - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: - enum: - - asc - - desc type: string - - description: JSON-encoded array of sort values for `search_after` pagination - in: query - name: searchAfter - required: false + requestBody: + content: + application/json: + examples: + postReassignAgentRequestExample: + description: Reassign an agent to a different policy + value: + policy_id: agent-policy-id-2 + schema: + additionalProperties: false + type: object + properties: + policy_id: + type: string + required: + - policy_id + responses: + '200': + content: + application/json: + examples: + postReassignAgentExample: + description: Agent successfully reassigned + value: {} + schema: + additionalProperties: false + type: object + properties: {} + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Reassign an agent + tags: + - Elastic Agent actions + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agents/{agentId}/remove_collector: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/remove_collector
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Remove a specific OpAMP collector from the Fleet agents list. Marks the collector as unenrolled. This action does not invalidate API keys, so the collector can reconnect on its own.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-remove-collector + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: When true, opens a new point-in-time for pagination - in: query - name: openPit - required: false + - description: The collector agent ID + in: path + name: agentId + required: true schema: - type: boolean - - description: Point-in-time ID for pagination - in: query - name: pitId - required: false + type: string + responses: + '200': + content: + application/json: + examples: + postRemoveCollectorExample: + description: Collector successfully removed + value: {} + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + description: Bad Request + summary: Remove an OpAMP collector + tags: + - Elastic Agent actions + x-state: Experimental; added in 9.5.0 + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agents/{agentId}/request_diagnostics: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/{agentId}/request_diagnostics
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Request a diagnostics bundle from a specific agent.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: post-fleet-agents-agentid-request-diagnostics + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: Duration to keep the point-in-time alive, for example, `1m` - in: query - name: pitKeepAlive - required: false + - description: The agent ID + in: path + name: agentId + required: true schema: type: string + requestBody: + content: + application/json: + examples: + postRequestDiagnosticsRequestExample: + description: Request a diagnostics bundle from an agent + value: + additional_metrics: + - CPU + schema: + additionalProperties: false + nullable: true + type: object + properties: + additional_metrics: + items: + enum: + - CPU + type: string + maxItems: 1 + type: array responses: '200': content: application/json: examples: - getAgentsExample: - description: List of agents + postRequestDiagnosticsExample: + description: Diagnostics action result value: - items: - - active: true - enrolled_at: '2024-01-01T00:00:00.000Z' - id: agent-id-1 - policy_id: agent-policy-id-1 - policy_revision: 1 - status: online - type: PERMANENT - updated_at: '2024-01-01T00:00:00.000Z' - page: 1 - perPage: 20 - total: 1 + actionId: action-id-1 schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - access_api_key: - type: string - access_api_key_id: - type: string - active: - type: boolean - agent: - additionalProperties: true - type: object - properties: - id: - type: string - type: - type: string - version: - type: string - required: - - id - - version - audit_unenrolled_reason: - type: string - capabilities: - items: - type: string - maxItems: 100 - type: array - components: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - type: string - units: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - payload: - additionalProperties: - nullable: true - type: object - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - enum: - - input - - output - - '' - type: string - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - default_api_key: - type: string - default_api_key_history: - items: - additionalProperties: false - deprecated: true - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - default_api_key_id: - type: string - effective_config: - nullable: true - enrolled_at: - type: string - health: - additionalProperties: - nullable: true - type: object - id: - type: string - identifying_attributes: - additionalProperties: - type: string - type: object - last_checkin: - type: string - last_checkin_message: - type: string - last_checkin_status: - enum: - - error - - online - - degraded - - updating - - starting - - disconnected - type: string - last_known_status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - local_metadata: - additionalProperties: - nullable: true - type: object - metrics: - additionalProperties: false - type: object - properties: - cpu_avg: - type: number - memory_size_byte_avg: - type: number - namespaces: - items: - type: string - maxItems: 100 - type: array - non_identifying_attributes: - additionalProperties: - type: string - type: object - outputs: - additionalProperties: - additionalProperties: false - type: object - properties: - api_key_id: - type: string - to_retire_api_key_ids: - items: - additionalProperties: false - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - type: - type: string - type: object - packages: - items: - type: string - maxItems: 10000 - type: array - policy_id: - type: string - policy_revision: - nullable: true - type: number - sequence_num: - type: number - signals: - items: - type: string - maxItems: 50 - type: array - sort: - items: - nullable: true - maxItems: 10 - type: array - status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - tags: - items: - type: string - maxItems: 100 - type: array - type: - enum: - - PERMANENT - - EPHEMERAL - - TEMPORARY - - OPAMP - type: string - unenrolled_at: - type: string - unenrollment_started_at: - type: string - unhealthy_reason: - items: - enum: - - input - - output - - other - type: string - maxItems: 3 - nullable: true - type: array - upgrade: - additionalProperties: false - type: object - properties: - rollbacks: - items: - additionalProperties: false - type: object - properties: - valid_until: - type: string - version: - type: string - required: - - valid_until - - version - maxItems: 100 - type: array - upgrade_attempts: - items: - type: string - maxItems: 10000 - nullable: true - type: array - upgrade_details: - additionalProperties: false - nullable: true - type: object - properties: - action_id: - type: string - metadata: - additionalProperties: false - type: object - properties: - download_percent: - type: number - download_rate: - type: number - error_msg: - type: string - failed_state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - reason: - type: string - retry_error_msg: - type: string - retry_until: - type: string - scheduled_at: - type: string - state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - target_version: - type: string - required: - - target_version - - action_id - - state - upgrade_started_at: - nullable: true - type: string - upgraded_at: - nullable: true - type: string - user_provided_metadata: - additionalProperties: - nullable: true - type: object - required: - - id - - packages - - type - - active - - enrolled_at - - local_metadata - - effective_config - maxItems: 10000 - type: array - nextSearchAfter: - type: string - page: - type: number - perPage: - type: number - pit: + actionId: type: string - statusSummary: - additionalProperties: - type: number - type: object - total: - type: number required: - - items - - total - - page - - perPage + - actionId description: Successful response '400': content: @@ -37261,7 +32456,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: An error message describing what went wrong + message: Agent agent-id-1 does not support request diagnostics action. statusCode: 400 schema: additionalProperties: false @@ -37282,22 +32477,23 @@ paths: - message - attributes description: Bad Request - summary: Get agents + summary: Request agent diagnostics tags: - - Elastic Agents + - Elastic Agent actions x-metaTags: - content: Kibana name: product_name + /api/fleet/agents/{agentId}/rollback: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents
+
post /s/{space_id}/api/fleet/agents/{agentId}/rollback
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Retrieve agents associated with specific action IDs.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: post-fleet-agents + Rollback an agent to the previous version.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-rollback parameters: - description: A required header to protect against CSRF attacks in: header @@ -37306,63 +32502,32 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - postGetAgentsByActionsRequestExample: - description: Retrieve agents associated with specific action IDs - value: - actionIds: - - action-id-1 - - action-id-2 - schema: - additionalProperties: false - type: object - properties: - actionIds: - items: - type: string - maxItems: 1000 - type: array - required: - - actionIds + - description: The agent ID to rollback + in: path + name: agentId + required: true + schema: + type: string responses: '200': content: application/json: examples: - postGetAgentsByActionsExample: - description: Agents associated with the given actions + successResponse: value: - items: - - active: true - id: agent-id-1 - policy_id: agent-policy-id-1 - status: online - total: 1 + actionId: actionId schema: - additionalProperties: false - type: object - properties: - items: - items: - type: string - maxItems: 10000 - type: array - required: - - items - description: Successful response + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_action_id_response' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_action_message_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -37381,24 +32546,25 @@ paths: required: - message - attributes - description: Bad Request - summary: Get agents by action ids + description: A bad request. + summary: Rollback an agent tags: - - Elastic Agents + - Elastic Agent actions + x-state: Experimental; added in 9.4.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}: - delete: + /api/fleet/agents/{agentId}/unenroll: + post: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/agents/{agentId}
+
post /s/{space_id}/api/fleet/agents/{agentId}/unenroll
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete an agent by ID.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: delete-fleet-agents-agentid + Unenroll a specific agent, optionally revoking its enrollment API key.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-unenroll parameters: - description: A required header to protect against CSRF attacks in: header @@ -37413,26 +32579,31 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + examples: + postUnenrollAgentRequestExample: + description: Unenroll an agent, optionally revoking the enrollment API key + value: + revoke: false + schema: + additionalProperties: false + nullable: true + type: object + properties: + force: + type: boolean + revoke: + type: boolean responses: '200': content: application/json: examples: - deleteAgentExample: - description: Agent successfully deleted - value: - id: agent-id-1 - success: true - schema: - additionalProperties: false - type: object - properties: - action: - enum: - - deleted - type: string - required: - - action + postUnenrollAgentExample: + description: Agent successfully unenrolled + value: {} description: Successful response '400': content: @@ -37444,456 +32615,72 @@ paths: error: Bad Request message: An error message describing what went wrong statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent was found with the given ID - value: - error: Not Found - message: Agent agent-id-1 not found - statusCode: 404 - description: Not Found - summary: Delete an agent + summary: Unenroll an agent tags: - - Elastic Agents + - Elastic Agent actions x-metaTags: - content: Kibana name: product_name - get: + /api/fleet/agents/{agentId}/upgrade: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/{agentId}
+
post /s/{space_id}/api/fleet/agents/{agentId}/upgrade
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an agent by ID.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-agentid + Upgrade a specific agent to a newer version.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-agentid-upgrade parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string - description: The agent ID in: path name: agentId required: true schema: type: string - - description: When true, include CPU and memory metrics in the response - in: query - name: withMetrics - required: false - schema: - default: false - type: boolean + requestBody: + content: + application/json: + examples: + postUpgradeAgentRequestExample: + description: Upgrade an agent to a specific version + value: + version: 8.17.0 + schema: + additionalProperties: false + type: object + properties: + force: + type: boolean + skipRateLimitCheck: + type: boolean + source_uri: + type: string + version: + type: string + required: + - version responses: '200': content: application/json: examples: - getAgentExample: - description: Agent details - value: - item: - active: true - agent_id: agent-id-1 - enrolled_at: '2024-01-01T00:00:00.000Z' - id: agent-id-1 - local_metadata: - elastic: - agent: - version: 8.17.0 - host: - hostname: my-host - os: - name: linux - policy_id: agent-policy-id-1 - policy_revision: 1 - status: online - type: PERMANENT - updated_at: '2024-01-01T00:00:00.000Z' + postUpgradeAgentExample: + description: Agent upgrade initiated + value: {} schema: additionalProperties: false type: object - properties: - item: - additionalProperties: false - type: object - properties: - access_api_key: - type: string - access_api_key_id: - type: string - active: - type: boolean - agent: - additionalProperties: true - type: object - properties: - id: - type: string - type: - type: string - version: - type: string - required: - - id - - version - audit_unenrolled_reason: - type: string - capabilities: - items: - type: string - maxItems: 100 - type: array - components: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - type: string - units: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - payload: - additionalProperties: - nullable: true - type: object - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - enum: - - input - - output - - '' - type: string - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - default_api_key: - type: string - default_api_key_history: - items: - additionalProperties: false - deprecated: true - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - default_api_key_id: - type: string - effective_config: - nullable: true - enrolled_at: - type: string - health: - additionalProperties: - nullable: true - type: object - id: - type: string - identifying_attributes: - additionalProperties: - type: string - type: object - last_checkin: - type: string - last_checkin_message: - type: string - last_checkin_status: - enum: - - error - - online - - degraded - - updating - - starting - - disconnected - type: string - last_known_status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - local_metadata: - additionalProperties: - nullable: true - type: object - metrics: - additionalProperties: false - type: object - properties: - cpu_avg: - type: number - memory_size_byte_avg: - type: number - namespaces: - items: - type: string - maxItems: 100 - type: array - non_identifying_attributes: - additionalProperties: - type: string - type: object - outputs: - additionalProperties: - additionalProperties: false - type: object - properties: - api_key_id: - type: string - to_retire_api_key_ids: - items: - additionalProperties: false - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - type: - type: string - type: object - packages: - items: - type: string - maxItems: 10000 - type: array - policy_id: - type: string - policy_revision: - nullable: true - type: number - sequence_num: - type: number - signals: - items: - type: string - maxItems: 50 - type: array - sort: - items: - nullable: true - maxItems: 10 - type: array - status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - tags: - items: - type: string - maxItems: 100 - type: array - type: - enum: - - PERMANENT - - EPHEMERAL - - TEMPORARY - - OPAMP - type: string - unenrolled_at: - type: string - unenrollment_started_at: - type: string - unhealthy_reason: - items: - enum: - - input - - output - - other - type: string - maxItems: 3 - nullable: true - type: array - upgrade: - additionalProperties: false - type: object - properties: - rollbacks: - items: - additionalProperties: false - type: object - properties: - valid_until: - type: string - version: - type: string - required: - - valid_until - - version - maxItems: 100 - type: array - upgrade_attempts: - items: - type: string - maxItems: 10000 - nullable: true - type: array - upgrade_details: - additionalProperties: false - nullable: true - type: object - properties: - action_id: - type: string - metadata: - additionalProperties: false - type: object - properties: - download_percent: - type: number - download_rate: - type: number - error_msg: - type: string - failed_state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - reason: - type: string - retry_error_msg: - type: string - retry_until: - type: string - scheduled_at: - type: string - state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - target_version: - type: string - required: - - target_version - - action_id - - state - upgrade_started_at: - nullable: true - type: string - upgraded_at: - nullable: true - type: string - user_provided_metadata: - additionalProperties: - nullable: true - type: object - required: - - id - - packages - - type - - active - - enrolled_at - - local_metadata - - effective_config - required: - - item + properties: {} description: Successful response '400': content: @@ -37924,454 +32711,86 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent was found with the given ID - value: - error: Not Found - message: Agent agent-id-1 not found - statusCode: 404 - description: Not Found - summary: Get an agent + summary: Upgrade an agent tags: - - Elastic Agents + - Elastic Agent actions x-metaTags: - content: Kibana name: product_name - put: + /api/fleet/agents/{agentId}/uploads: + get: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/agents/{agentId}
+
get /s/{space_id}/api/fleet/agents/{agentId}/uploads
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update an agent by ID.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: put-fleet-agents-agentid + Get a list of files uploaded by a specific agent.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-agentid-uploads parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - description: The agent ID in: path name: agentId required: true schema: type: string - requestBody: - content: - application/json: - examples: - putAgentRequestExample: - description: Update agent tags - value: - tags: - - production - - linux - schema: - additionalProperties: false - type: object - properties: - tags: - items: - type: string - maxItems: 10 - type: array - user_provided_metadata: - additionalProperties: - nullable: true - type: object responses: '200': content: application/json: examples: - putAgentExample: - description: Updated agent details + getAgentUploadsExample: + description: List of files uploaded by the agent value: - item: - active: true - enrolled_at: '2024-01-01T00:00:00.000Z' - id: agent-id-1 - policy_id: agent-policy-id-1 - policy_revision: 1 - status: online - tags: - - production - - linux - type: PERMANENT - updated_at: '2024-01-01T00:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - access_api_key: - type: string - access_api_key_id: - type: string - active: - type: boolean - agent: - additionalProperties: true - type: object - properties: - id: - type: string - type: - type: string - version: - type: string - required: - - id - - version - audit_unenrolled_reason: - type: string - capabilities: - items: - type: string - maxItems: 100 - type: array - components: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - type: string - units: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - payload: - additionalProperties: - nullable: true - type: object - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - enum: - - input - - output - - '' - type: string - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - required: - - id - - type - - status - - message - maxItems: 10000 - type: array - default_api_key: - type: string - default_api_key_history: - items: - additionalProperties: false - deprecated: true - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - default_api_key_id: - type: string - effective_config: - nullable: true - enrolled_at: - type: string - health: - additionalProperties: - nullable: true - type: object - id: - type: string - identifying_attributes: - additionalProperties: + items: + - actionId: action-id-1 + createTime: '2024-01-01T00:00:00.000Z' + filePath: /tmp/diagnostics-2024-01-01.zip + id: file-id-1 + name: diagnostics-2024-01-01.zip + status: READY + schema: + additionalProperties: false + type: object + properties: + items: + items: + additionalProperties: false + type: object + properties: + actionId: type: string - type: object - last_checkin: - type: string - last_checkin_message: - type: string - last_checkin_status: - enum: - - error - - online - - degraded - - updating - - starting - - disconnected - type: string - last_known_status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - local_metadata: - additionalProperties: - nullable: true - type: object - metrics: - additionalProperties: false - type: object - properties: - cpu_avg: - type: number - memory_size_byte_avg: - type: number - namespaces: - items: + createTime: type: string - maxItems: 100 - type: array - non_identifying_attributes: - additionalProperties: + error: type: string - type: object - outputs: - additionalProperties: - additionalProperties: false - type: object - properties: - api_key_id: - type: string - to_retire_api_key_ids: - items: - additionalProperties: false - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - maxItems: 100 - type: array - type: - type: string - type: object - packages: - items: + filePath: type: string - maxItems: 10000 - type: array - policy_id: - type: string - policy_revision: - nullable: true - type: number - sequence_num: - type: number - signals: - items: + id: type: string - maxItems: 50 - type: array - sort: - items: - nullable: true - maxItems: 10 - type: array - status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - - uninstalled - - orphaned - type: string - tags: - items: + name: type: string - maxItems: 100 - type: array - type: - enum: - - PERMANENT - - EPHEMERAL - - TEMPORARY - - OPAMP - type: string - unenrolled_at: - type: string - unenrollment_started_at: - type: string - unhealthy_reason: - items: + status: enum: - - input - - output - - other - type: string - maxItems: 3 - nullable: true - type: array - upgrade: - additionalProperties: false - type: object - properties: - rollbacks: - items: - additionalProperties: false - type: object - properties: - valid_until: - type: string - version: - type: string - required: - - valid_until - - version - maxItems: 100 - type: array - upgrade_attempts: - items: + - READY + - AWAITING_UPLOAD + - DELETED + - EXPIRED + - IN_PROGRESS + - FAILED type: string - maxItems: 10000 - nullable: true - type: array - upgrade_details: - additionalProperties: false - nullable: true - type: object - properties: - action_id: - type: string - metadata: - additionalProperties: false - type: object - properties: - download_percent: - type: number - download_rate: - type: number - error_msg: - type: string - failed_state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - reason: - type: string - retry_error_msg: - type: string - retry_until: - type: string - scheduled_at: - type: string - state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - target_version: - type: string - required: - - target_version - - action_id - - state - upgrade_started_at: - nullable: true - type: string - upgraded_at: - nullable: true - type: string - user_provided_metadata: - additionalProperties: - nullable: true - type: object - required: - - id - - packages - - type - - active - - enrolled_at - - local_metadata - - effective_config + required: + - id + - name + - filePath + - createTime + - status + - actionId + maxItems: 10000 + type: array required: - - item + - items description: Successful response '400': content: @@ -38402,120 +32821,265 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No agent was found with the given ID - value: - error: Not Found - message: Agent agent-id-1 not found - statusCode: 404 - description: Not Found - summary: Update an agent by ID + summary: Get agent uploads tags: - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/actions: - post: + /api/fleet/agents/action_status: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/actions
+
get /s/{space_id}/api/fleet/agents/action_status
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create a new action for a specific agent.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-actions + Get the current status of recent agent actions.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-action-status parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: Page number + in: query + name: page + required: false schema: - example: 'true' - type: string - - description: The agent ID - in: path - name: agentId - required: true + default: 0 + type: number + - description: Number of results per page + in: query + name: perPage + required: false + schema: + default: 20 + type: number + - description: Return actions created before this date + in: query + name: date + required: false schema: type: string - requestBody: - content: - application/json: - examples: - postAgentActionRequestExample: - description: Create a UNENROLL action for an agent - value: - action: - type: UNENROLL - schema: - additionalProperties: false - type: object - properties: - action: - anyOf: - - additionalProperties: false - type: object - properties: - ack_data: - nullable: true - data: - nullable: true - type: - enum: - - UNENROLL - - UPGRADE - - POLICY_REASSIGN - type: string - required: - - type - - data - - ack_data - - additionalProperties: false - type: object - properties: - data: - additionalProperties: false - type: object - properties: - log_level: - enum: - - debug - - info - - warning - - error - nullable: true - type: string - required: - - log_level - type: - enum: - - SETTINGS - type: string - required: - - type - - data - required: - - action + - description: Return only the latest N actions + in: query + name: latest + required: false + schema: + type: number + - description: Number of error details to include per action + in: query + name: errorSize + required: false + schema: + default: 5 + type: number responses: '200': content: application/json: examples: - postAgentActionExample: - description: Created agent action - value: + getActionStatusExample: + description: Status of recent agent actions + value: + items: + - actionId: action-id-1 + completionTime: '2024-01-01T00:05:00.000Z' + creationTime: '2024-01-01T00:00:00.000Z' + nbAgentsAck: 2 + nbAgentsActioned: 2 + nbAgentsFailed: 0 + status: COMPLETE + type: UPGRADE + schema: + additionalProperties: false + type: object + properties: + items: + items: + additionalProperties: false + type: object + properties: + actionId: + type: string + cancellationTime: + type: string + completionTime: + type: string + creationTime: + description: creation time of action + type: string + expiration: + type: string + hasRolloutPeriod: + type: boolean + is_automatic: + type: boolean + latestErrors: + items: + additionalProperties: false + description: latest errors that happened when the agents executed the action + type: object + properties: + agentId: + type: string + error: + type: string + hostname: + type: string + timestamp: + type: string + required: + - agentId + - error + - timestamp + maxItems: 10 + type: array + nbAgentsAck: + description: number of agents that acknowledged the action + type: number + nbAgentsActionCreated: + description: number of agents included in action from kibana + type: number + nbAgentsActioned: + description: number of agents actioned + type: number + nbAgentsFailed: + description: number of agents that failed to execute the action + type: number + newPolicyId: + description: new policy id (POLICY_REASSIGN action) + type: string + policyId: + description: policy id (POLICY_CHANGE action) + type: string + revision: + description: new policy revision (POLICY_CHANGE action) + type: number + startTime: + description: start time of action (scheduled actions) + type: string + status: + enum: + - COMPLETE + - EXPIRED + - CANCELLED + - FAILED + - IN_PROGRESS + - ROLLOUT_PASSED + type: string + type: + enum: + - UPGRADE + - UNENROLL + - SETTINGS + - POLICY_REASSIGN + - CANCEL + - FORCE_UNENROLL + - REQUEST_DIAGNOSTICS + - UPDATE_TAGS + - POLICY_CHANGE + - INPUT_ACTION + - MIGRATE + - PRIVILEGE_LEVEL_CHANGE + - ROLLBACK + type: string + version: + description: agent version number (UPGRADE action) + type: string + required: + - actionId + - nbAgentsActionCreated + - nbAgentsAck + - nbAgentsFailed + - type + - nbAgentsActioned + - status + - creationTime + maxItems: 10000 + type: array + required: + - items + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Get an agent action status + tags: + - Elastic Agent actions + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/agents/actions/{actionId}/cancel: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/agents/actions/{actionId}/cancel
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Cancel a pending action for a specific agent.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-actions-actionid-cancel + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The ID of the action to cancel + in: path + name: actionId + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + postCancelActionRequestExample: + description: Cancel an agent action + value: {} + responses: + '200': + content: + application/json: + examples: + postCancelActionExample: + description: Cancellation action created + value: item: agents: - agent-id-1 created_at: '2024-01-01T00:00:00.000Z' - id: action-id-1 - type: UNENROLL + id: cancel-action-id-1 + type: CANCEL schema: additionalProperties: false type: object @@ -38596,54 +33160,58 @@ paths: - message - attributes description: Bad Request - summary: Create an agent action + summary: Cancel an agent action tags: - Elastic Agent actions x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/effective_config: + /api/fleet/agents/available_versions: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/{agentId}/effective_config
+
get /s/{space_id}/api/fleet/agents/available_versions
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an agent's effective config by ID.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-agentid-effective-config - parameters: - - description: The agent ID to get effective config of - in: path - name: agentId - required: true - schema: - type: string + Get a list of Elastic Agent versions available for upgrade.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-available-versions + parameters: [] responses: '200': content: application/json: examples: - successResponse: + getAvailableVersionsExample: + description: List of available agent versions for upgrade value: - effective_config: {} + items: + - 8.17.0 + - 8.16.3 + - 8.16.2 schema: additionalProperties: false type: object properties: - effective_config: - nullable: true + items: + items: + type: string + maxItems: 10000 + type: array required: - - effective_config - description: 'OK: A successful request.' + - items + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -38662,24 +33230,24 @@ paths: required: - message - attributes - description: A bad request. - summary: Get an agent's effective config + description: Bad Request + summary: Get available agent versions tags: - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/migrate: + /api/fleet/agents/bulk_migrate: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/migrate
+
post /s/{space_id}/api/fleet/agents/bulk_migrate
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Migrate a single agent to another cluster.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-migrate + Bulk migrate agents to another cluster.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-migrate parameters: - description: A required header to protect against CSRF attacks in: header @@ -38688,19 +33256,16 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postMigrateAgentRequestExample: - description: Migrate a single agent to another cluster + postBulkMigrateAgentsRequestExample: + description: Migrate multiple agents to another cluster value: + agents: + - agent-id-1 + - agent-id-2 enrollment_token: enrollment-token-value settings: retry_max: 5 @@ -38709,6 +33274,15 @@ paths: additionalProperties: false type: object properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number enrollment_token: type: string settings: @@ -38739,8 +33313,6 @@ paths: type: object proxy_url: type: string - replace_token: - type: string staging: type: string tags: @@ -38752,6 +33324,7 @@ paths: format: uri type: string required: + - agents - uri - enrollment_token responses: @@ -38759,8 +33332,8 @@ paths: content: application/json: examples: - postMigrateAgentExample: - description: Agent migration initiated + postBulkMigrateAgentsExample: + description: Bulk agent migration initiated value: actionId: action-id-1 schema: @@ -38801,23 +33374,23 @@ paths: - message - attributes description: Bad Request - summary: Migrate a single agent + summary: Migrate multiple agents tags: - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/privilege_level_change: + /api/fleet/agents/bulk_privilege_level_change: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/privilege_level_change
+
post /s/{space_id}/api/fleet/agents/bulk_privilege_level_change
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Change the privilege level of a single agent to unprivileged.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-privilege-level-change + Change multiple agents' privilege level to unprivileged.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-privilege-level-change parameters: - description: A required header to protect against CSRF attacks in: header @@ -38826,27 +33399,30 @@ paths: schema: example: 'true' type: string - - description: The agent ID to change privilege level for - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - changeAgentPrivilegeLevelRequest: + bulkChangeAgentPrivilegeLevelRequest: value: + agents: agent user_info: groupname: groupname password: password username: username schema: additionalProperties: false - nullable: true type: object properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number user_info: additionalProperties: false type: object @@ -38857,6 +33433,8 @@ paths: type: string username: type: string + required: + - agents responses: '200': content: @@ -38866,21 +33444,13 @@ paths: value: actionId: actionId schema: - anyOf: - - additionalProperties: false - type: object - properties: - actionId: - type: string - required: - - actionId - - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message + additionalProperties: false + type: object + properties: + actionId: + type: string + required: + - actionId description: 'OK: A successful request.' '400': content: @@ -38908,24 +33478,24 @@ paths: - message - attributes description: A bad request. - summary: Change agent privilege level + summary: Bulk change agent privilege level tags: - Elastic Agents x-state: Experimental; added in 9.3.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/reassign: + /api/fleet/agents/bulk_reassign: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/reassign
+
post /s/{space_id}/api/fleet/agents/bulk_reassign
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Reassign an agent to a different agent policy.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-reassign + Reassign multiple agents to a different agent policy.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-reassign parameters: - description: A required header to protect against CSRF attacks in: header @@ -38934,40 +33504,55 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postReassignAgentRequestExample: - description: Reassign an agent to a different policy + postBulkReassignAgentsRequestExample: + description: Reassign multiple agents to a different policy value: + agents: + - agent-id-1 + - agent-id-2 policy_id: agent-policy-id-2 schema: additionalProperties: false type: object properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + includeInactive: + default: false + type: boolean policy_id: type: string required: - policy_id + - agents responses: '200': content: application/json: examples: - postReassignAgentExample: - description: Agent successfully reassigned - value: {} + postBulkReassignAgentsExample: + description: Bulk reassign action result + value: + actionId: action-id-1 schema: additionalProperties: false type: object - properties: {} + properties: + actionId: + type: string + required: + - actionId description: Successful response '400': content: @@ -38998,23 +33583,23 @@ paths: - message - attributes description: Bad Request - summary: Reassign an agent + summary: Bulk reassign agents tags: - Elastic Agent actions x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/remove_collector: + /api/fleet/agents/bulk_remove_collectors: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/remove_collector
+
post /s/{space_id}/api/fleet/agents/bulk_remove_collectors
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Remove a specific OpAMP collector from the Fleet agents list. Marks the collector as unenrolled. This action does not invalidate API keys, so the collector can reconnect on its own.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-remove-collector + Remove multiple OpAMP collectors from the Fleet agents list. Marks the collectors as unenrolled. This action does not invalidate API keys, so collectors can reconnect on their own.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-remove-collectors parameters: - description: A required header to protect against CSRF attacks in: header @@ -39023,20 +33608,51 @@ paths: schema: example: 'true' type: string - - description: The collector agent ID - in: path - name: agentId - required: true - schema: - type: string + requestBody: + content: + application/json: + examples: + postBulkRemoveCollectorsRequestExample: + description: Remove multiple OpAMP collectors + value: + agents: + - collector-id-1 + - collector-id-2 + schema: + additionalProperties: false + type: object + properties: + agents: + anyOf: + - items: + description: List of collector agent IDs + type: string + maxItems: 10000 + type: array + - description: KQL query string. Leave empty to target all collectors + type: string + includeInactive: + description: When passing collectors by KQL query, also removes inactive collectors + type: boolean + required: + - agents responses: '200': content: application/json: examples: - postRemoveCollectorExample: - description: Collector successfully removed - value: {} + postBulkRemoveCollectorsExample: + description: Bulk remove collectors action result + value: + actionId: action-id-1 + schema: + additionalProperties: false + type: object + properties: + actionId: + type: string + required: + - actionId description: Successful response '400': content: @@ -39048,25 +33664,43 @@ paths: error: Bad Request message: An error message describing what went wrong statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes description: Bad Request - summary: Remove an OpAMP collector + summary: Bulk remove OpAMP collectors tags: - Elastic Agent actions x-state: Experimental; added in 9.5.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/request_diagnostics: + /api/fleet/agents/bulk_request_diagnostics: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/request_diagnostics
+
post /s/{space_id}/api/fleet/agents/bulk_request_diagnostics
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Request a diagnostics bundle from a specific agent.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: post-fleet-agents-agentid-request-diagnostics + Request diagnostics bundles from multiple agents.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: post-fleet-agents-bulk-request-diagnostics parameters: - description: A required header to protect against CSRF attacks in: header @@ -39075,24 +33709,20 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postRequestDiagnosticsRequestExample: - description: Request a diagnostics bundle from an agent + postBulkRequestDiagnosticsRequestExample: + description: Request diagnostics bundles from multiple agents value: additional_metrics: - CPU + agents: + - agent-id-1 + - agent-id-2 schema: additionalProperties: false - nullable: true type: object properties: additional_metrics: @@ -39102,13 +33732,24 @@ paths: type: string maxItems: 1 type: array + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + required: + - agents responses: '200': content: application/json: examples: - postRequestDiagnosticsExample: - description: Diagnostics action result + postBulkRequestDiagnosticsExample: + description: Bulk diagnostics action result value: actionId: action-id-1 schema: @@ -39128,7 +33769,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: Agent agent-id-1 does not support request diagnostics action. + message: An error message describing what went wrong statusCode: 400 schema: additionalProperties: false @@ -39149,23 +33790,23 @@ paths: - message - attributes description: Bad Request - summary: Request agent diagnostics + summary: Bulk request diagnostics from agents tags: - Elastic Agent actions x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/rollback: + /api/fleet/agents/bulk_rollback: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/rollback
+
post /s/{space_id}/api/fleet/agents/bulk_rollback
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Rollback an agent to the previous version.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-rollback + Rollback multiple agents to the previous version.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-rollback parameters: - description: A required header to protect against CSRF attacks in: header @@ -39174,12 +33815,35 @@ paths: schema: example: 'true' type: string - - description: The agent ID to rollback - in: path - name: agentId - required: true - schema: - type: string + requestBody: + content: + application/json: + examples: + bulkRollbackAgentsRequest: + value: + agents: + - agent-1 + - agent-2 + batchSize: 100 + includeInactive: false + schema: + additionalProperties: false + type: object + properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + includeInactive: + default: false + type: boolean + required: + - agents responses: '200': content: @@ -39187,23 +33851,20 @@ paths: examples: successResponse: value: - actionId: actionId + actionIds: + - actionId1 + - actionId2 schema: - anyOf: - - additionalProperties: false - type: object - properties: - actionId: - type: string - required: - - actionId - - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message + additionalProperties: false + type: object + properties: + actionIds: + items: + type: string + maxItems: 10000 + type: array + required: + - actionIds description: 'OK: A successful request.' '400': content: @@ -39231,24 +33892,24 @@ paths: - message - attributes description: A bad request. - summary: Rollback an agent + summary: Bulk rollback agents tags: - Elastic Agent actions x-state: Experimental; added in 9.4.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/unenroll: + /api/fleet/agents/bulk_unenroll: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/unenroll
+
post /s/{space_id}/api/fleet/agents/bulk_unenroll
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Unenroll a specific agent, optionally revoking its enrollment API key.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-unenroll + Unenroll multiple agents, optionally revoking their enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-unenroll parameters: - description: A required header to protect against CSRF attacks in: header @@ -39257,37 +33918,60 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postUnenrollAgentRequestExample: - description: Unenroll an agent, optionally revoking the enrollment API key + postBulkUnenrollAgentsRequestExample: + description: Unenroll multiple agents value: + agents: + - agent-id-1 + - agent-id-2 revoke: false schema: additionalProperties: false - nullable: true type: object properties: + agents: + anyOf: + - items: + description: list of agent IDs + type: string + maxItems: 10000 + type: array + - description: KQL query string, leave empty to action all agents + type: string + batchSize: + type: number force: + description: Unenrolls hosted agents too + type: boolean + includeInactive: + description: When passing agents by KQL query, unenrolls inactive agents too type: boolean revoke: + description: Revokes API keys of agents type: boolean + required: + - agents responses: '200': content: application/json: examples: - postUnenrollAgentExample: - description: Agent successfully unenrolled - value: {} + postBulkUnenrollAgentsExample: + description: Bulk unenroll action result + value: + actionId: action-id-1 + schema: + additionalProperties: false + type: object + properties: + actionId: + type: string + required: + - actionId description: Successful response '400': content: @@ -39299,24 +33983,42 @@ paths: error: Bad Request message: An error message describing what went wrong statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes description: Bad Request - summary: Unenroll an agent + summary: Bulk unenroll agents tags: - Elastic Agent actions x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/upgrade: + /api/fleet/agents/bulk_update_agent_tags: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/{agentId}/upgrade
+
post /s/{space_id}/api/fleet/agents/bulk_update_agent_tags
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Upgrade a specific agent to a newer version.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-agentid-upgrade + Add or remove tags across multiple agents.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-update-agent-tags parameters: - description: A required header to protect against CSRF attacks in: header @@ -39325,46 +34027,65 @@ paths: schema: example: 'true' type: string - - description: The agent ID - in: path - name: agentId - required: true - schema: - type: string requestBody: content: application/json: examples: - postUpgradeAgentRequestExample: - description: Upgrade an agent to a specific version + postBulkUpdateAgentTagsRequestExample: + description: Add and remove tags across multiple agents value: - version: 8.17.0 + agents: + - agent-id-1 + - agent-id-2 + tagsToAdd: + - production + tagsToRemove: + - staging schema: additionalProperties: false type: object properties: - force: - type: boolean - skipRateLimitCheck: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + includeInactive: + default: false type: boolean - source_uri: - type: string - version: - type: string + tagsToAdd: + items: + type: string + maxItems: 10 + type: array + tagsToRemove: + items: + type: string + maxItems: 10 + type: array required: - - version + - agents responses: '200': content: application/json: examples: - postUpgradeAgentExample: - description: Agent upgrade initiated - value: {} + postBulkUpdateAgentTagsExample: + description: Bulk action result + value: + actionId: action-id-1 schema: additionalProperties: false type: object - properties: {} + properties: + actionId: + type: string + required: + - actionId description: Successful response '400': content: @@ -39395,86 +34116,92 @@ paths: - message - attributes description: Bad Request - summary: Upgrade an agent + summary: Bulk update agent tags tags: - Elastic Agent actions x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/{agentId}/uploads: - get: + /api/fleet/agents/bulk_upgrade: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/{agentId}/uploads
+
post /s/{space_id}/api/fleet/agents/bulk_upgrade
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of files uploaded by a specific agent.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-agentid-uploads + Upgrade multiple agents to a newer version, with optional rollout controls.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-agents-bulk-upgrade parameters: - - description: The agent ID - in: path - name: agentId + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf required: true schema: + example: 'true' type: string + requestBody: + content: + application/json: + examples: + postBulkUpgradeAgentsRequestExample: + description: Upgrade multiple agents to a specific version + value: + agents: + - agent-id-1 + - agent-id-2 + rollout_duration_seconds: 3600 + version: 8.17.0 + schema: + additionalProperties: false + type: object + properties: + agents: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - type: string + batchSize: + type: number + force: + type: boolean + includeInactive: + default: false + type: boolean + rollout_duration_seconds: + minimum: 600 + type: number + skipRateLimitCheck: + type: boolean + source_uri: + type: string + start_time: + type: string + version: + type: string + required: + - agents + - version responses: '200': content: application/json: examples: - getAgentUploadsExample: - description: List of files uploaded by the agent + postBulkUpgradeAgentsExample: + description: Bulk upgrade action result value: - items: - - actionId: action-id-1 - createTime: '2024-01-01T00:00:00.000Z' - filePath: /tmp/diagnostics-2024-01-01.zip - id: file-id-1 - name: diagnostics-2024-01-01.zip - status: READY + actionId: action-id-1 schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - actionId: - type: string - createTime: - type: string - error: - type: string - filePath: - type: string - id: - type: string - name: - type: string - status: - enum: - - READY - - AWAITING_UPLOAD - - DELETED - - EXPIRED - - IN_PROGRESS - - FAILED - type: string - required: - - id - - name - - filePath - - createTime - - status - - actionId - maxItems: 10000 - type: array + actionId: + type: string required: - - items + - actionId description: Successful response '400': content: @@ -39505,183 +34232,58 @@ paths: - message - attributes description: Bad Request - summary: Get agent uploads + summary: Bulk upgrade agents tags: - - Elastic Agents + - Elastic Agent actions x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/action_status: - get: + /api/fleet/agents/files/{fileId}: + delete: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/action_status
+
delete /s/{space_id}/api/fleet/agents/files/{fileId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the current status of recent agent actions.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-action-status + Delete a file uploaded by an agent.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: delete-fleet-agents-files-fileid parameters: - - description: Page number - in: query - name: page - required: false - schema: - default: 0 - type: number - - description: Number of results per page - in: query - name: perPage - required: false - schema: - default: 20 - type: number - - description: Return actions created before this date - in: query - name: date - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: Return only the latest N actions - in: query - name: latest - required: false - schema: - type: number - - description: Number of error details to include per action - in: query - name: errorSize - required: false + - description: The ID of the uploaded file + in: path + name: fileId + required: true schema: - default: 5 - type: number + type: string responses: '200': content: application/json: examples: - getActionStatusExample: - description: Status of recent agent actions + deleteAgentUploadFileExample: + description: Uploaded file successfully deleted value: - items: - - actionId: action-id-1 - completionTime: '2024-01-01T00:05:00.000Z' - creationTime: '2024-01-01T00:00:00.000Z' - nbAgentsAck: 2 - nbAgentsActioned: 2 - nbAgentsFailed: 0 - status: COMPLETE - type: UPGRADE + deleted: true + id: file-id-1 schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - actionId: - type: string - cancellationTime: - type: string - completionTime: - type: string - creationTime: - description: creation time of action - type: string - expiration: - type: string - hasRolloutPeriod: - type: boolean - is_automatic: - type: boolean - latestErrors: - items: - additionalProperties: false - description: latest errors that happened when the agents executed the action - type: object - properties: - agentId: - type: string - error: - type: string - hostname: - type: string - timestamp: - type: string - required: - - agentId - - error - - timestamp - maxItems: 10 - type: array - nbAgentsAck: - description: number of agents that acknowledged the action - type: number - nbAgentsActionCreated: - description: number of agents included in action from kibana - type: number - nbAgentsActioned: - description: number of agents actioned - type: number - nbAgentsFailed: - description: number of agents that failed to execute the action - type: number - newPolicyId: - description: new policy id (POLICY_REASSIGN action) - type: string - policyId: - description: policy id (POLICY_CHANGE action) - type: string - revision: - description: new policy revision (POLICY_CHANGE action) - type: number - startTime: - description: start time of action (scheduled actions) - type: string - status: - enum: - - COMPLETE - - EXPIRED - - CANCELLED - - FAILED - - IN_PROGRESS - - ROLLOUT_PASSED - type: string - type: - enum: - - UPGRADE - - UNENROLL - - SETTINGS - - POLICY_REASSIGN - - CANCEL - - FORCE_UNENROLL - - REQUEST_DIAGNOSTICS - - UPDATE_TAGS - - POLICY_CHANGE - - INPUT_ACTION - - MIGRATE - - PRIVILEGE_LEVEL_CHANGE - - ROLLBACK - type: string - version: - description: agent version number (UPGRADE action) - type: string - required: - - actionId - - nbAgentsActionCreated - - nbAgentsAck - - nbAgentsFailed - - type - - nbAgentsActioned - - status - - creationTime - maxItems: 10000 - type: array + deleted: + type: boolean + id: + type: string required: - - items + - id + - deleted description: Successful response '400': content: @@ -39712,109 +34314,47 @@ paths: - message - attributes description: Bad Request - summary: Get an agent action status + summary: Delete an uploaded file tags: - - Elastic Agent actions + - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/actions/{actionId}/cancel: - post: + /api/fleet/agents/files/{fileId}/{fileName}: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/actions/{actionId}/cancel
+
get /s/{space_id}/api/fleet/agents/files/{fileId}/{fileName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Cancel a pending action for a specific agent.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-actions-actionid-cancel + Get a file uploaded by an agent.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-files-fileid-filename parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: The ID of the uploaded file + in: path + name: fileId required: true schema: - example: 'true' type: string - - description: The ID of the action to cancel + - description: The name of the uploaded file in: path - name: actionId + name: fileName required: true schema: type: string - requestBody: - content: - application/json: - examples: - postCancelActionRequestExample: - description: Cancel an agent action - value: {} responses: '200': content: application/json: examples: - postCancelActionExample: - description: Cancellation action created - value: - item: - agents: - - agent-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: cancel-action-id-1 - type: CANCEL + getAgentUploadFileExample: + description: The uploaded file content as a stream + value: schema: - additionalProperties: false type: object - properties: - item: - additionalProperties: false - type: object - properties: - ack_data: - nullable: true - agents: - items: - type: string - maxItems: 10000 - type: array - created_at: - type: string - data: - nullable: true - expiration: - type: string - id: - type: string - minimum_execution_duration: - type: number - namespaces: - items: - type: string - maxItems: 100 - type: array - rollout_duration_seconds: - type: number - sent_at: - type: string - source_uri: - type: string - start_time: - type: string - total: - type: number - type: - type: string - required: - - id - - type - - data - - created_at - - ack_data - required: - - item - description: Successful response + description: Successful response — returns the uploaded file content '400': content: application/json: @@ -39844,48 +34384,93 @@ paths: - message - attributes description: Bad Request - summary: Cancel an agent action + summary: Get an uploaded file tags: - - Elastic Agent actions + - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/available_versions: + /api/fleet/agents/setup: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/available_versions
+
get /s/{space_id}/api/fleet/agents/setup
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of Elastic Agent versions available for upgrade.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-available-versions + Get the current Fleet setup status, including whether Fleet is ready to enroll agents and which requirements or optional features are missing.

[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup. + operationId: get-fleet-agents-setup parameters: [] responses: '200': content: application/json: examples: - getAvailableVersionsExample: - description: List of available agent versions for upgrade + agentsSetupNotReadyExample: + description: Fleet is not ready — a Fleet Server and API keys are required value: - items: - - 8.17.0 - - 8.16.3 - - 8.16.2 + is_action_secrets_storage_enabled: false + is_secrets_storage_enabled: false + is_space_awareness_enabled: false + is_ssl_secrets_storage_enabled: false + isReady: false + missing_optional_features: + - encrypted_saved_object_encryption_key_required + missing_requirements: + - fleet_server + - api_keys + agentsSetupReadyExample: + description: Fleet is ready to enroll agents — all requirements are met + value: + is_action_secrets_storage_enabled: true + is_secrets_storage_enabled: true + is_space_awareness_enabled: false + is_ssl_secrets_storage_enabled: false + isReady: true + missing_optional_features: [] + missing_requirements: [] + package_verification_key_id: D88DB4CC schema: additionalProperties: false + description: A summary of the agent setup status. `isReady` indicates whether the setup is ready. If the setup is not ready, `missing_requirements` lists which requirements are missing. type: object properties: - items: + is_action_secrets_storage_enabled: + type: boolean + is_secrets_storage_enabled: + type: boolean + is_space_awareness_enabled: + type: boolean + is_ssl_secrets_storage_enabled: + type: boolean + isReady: + type: boolean + missing_optional_features: items: + enum: + - encrypted_saved_object_encryption_key_required type: string - maxItems: 10000 + maxItems: 1 + type: array + missing_requirements: + items: + enum: + - security_required + - tls_required + - api_keys + - fleet_admin_user + - fleet_server + type: string + maxItems: 5 type: array + package_verification_key_id: + type: string required: - - items - description: Successful response + - isReady + - missing_requirements + - missing_optional_features + description: Fleet setup status '400': content: application/json: @@ -39915,23 +34500,22 @@ paths: - message - attributes description: Bad Request - summary: Get available agent versions + summary: Get agent setup info tags: - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/bulk_migrate: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_migrate
+
post /s/{space_id}/api/fleet/agents/setup
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Bulk migrate agents to another cluster.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-migrate + Initialize Fleet. This endpoint is used by Elastic Agents to trigger Fleet setup. Safe to call multiple times; subsequent calls are idempotent.

[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup. + operationId: post-fleet-agents-setup parameters: - description: A required header to protect against CSRF attacks in: header @@ -39940,95 +34524,41 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkMigrateAgentsRequestExample: - description: Migrate multiple agents to another cluster - value: - agents: - - agent-id-1 - - agent-id-2 - enrollment_token: enrollment-token-value - settings: - retry_max: 5 - uri: https://fleet-server.example.com:8220 - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - enrollment_token: - type: string - settings: - additionalProperties: false - type: object - properties: - ca_sha256: - type: string - certificate_authorities: - type: string - elastic_agent_cert: - type: string - elastic_agent_cert_key: - type: string - elastic_agent_cert_key_passphrase: - type: string - headers: - additionalProperties: - type: string - type: object - insecure: - type: boolean - proxy_disabled: - type: boolean - proxy_headers: - additionalProperties: - type: string - type: object - proxy_url: - type: string - staging: - type: string - tags: - items: - type: string - maxItems: 10 - type: array - uri: - format: uri - type: string - required: - - agents - - uri - - enrollment_token responses: '200': content: application/json: examples: - postBulkMigrateAgentsExample: - description: Bulk agent migration initiated + agentsSetupSuccessExample: + description: Fleet setup initialized successfully with no non-fatal errors value: - actionId: action-id-1 + isInitialized: true + nonFatalErrors: [] schema: additionalProperties: false + description: A summary of the result of Fleet's `setup` lifecycle. If `isInitialized` is true, Fleet is ready to accept agent enrollment. `nonFatalErrors` may include useful insight into non-blocking issues with Fleet setup. type: object properties: - actionId: - type: string + isInitialized: + type: boolean + nonFatalErrors: + items: + additionalProperties: false + type: object + properties: + message: + type: string + name: + type: string + required: + - name + - message + maxItems: 10000 + type: array required: - - actionId - description: Successful response + - isInitialized + - nonFatalErrors + description: Fleet setup completed '400': content: application/json: @@ -40058,91 +34588,71 @@ paths: - message - attributes description: Bad Request - summary: Migrate multiple agents + summary: Initiate Fleet setup tags: - Elastic Agents x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/bulk_privilege_level_change: - post: + /api/fleet/agents/tags: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_privilege_level_change
+
get /s/{space_id}/api/fleet/agents/tags
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Change multiple agents' privilege level to unprivileged.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-privilege-level-change + Get a list of all tags used across enrolled agents.

[Required authorization] Route required privileges: fleet-agents-read. + operationId: get-fleet-agents-tags parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: A KQL query string to filter results + in: query + name: kuery + required: false schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - bulkChangeAgentPrivilegeLevelRequest: - value: - agents: agent - user_info: - groupname: groupname - password: password - username: username - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - user_info: - additionalProperties: false - type: object - properties: - groupname: - type: string - password: - type: string - username: - type: string - required: - - agents + - description: When true, include tags from inactive agents + in: query + name: showInactive + required: false + schema: + default: false + type: boolean responses: '200': content: application/json: examples: - successResponse: + getAgentTagsExample: + description: List of tags used across agents value: - actionId: actionId + items: + - production + - linux + - datacenter-1 schema: additionalProperties: false type: object properties: - actionId: - type: string + items: + items: + type: string + maxItems: 10000 + type: array required: - - actionId - description: 'OK: A successful request.' + - items + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -40161,82 +34671,59 @@ paths: required: - message - attributes - description: A bad request. - summary: Bulk change agent privilege level + description: Bad Request + summary: Get agent tags tags: - Elastic Agents - x-state: Experimental; added in 9.3.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/bulk_reassign: - post: + /api/fleet/check-permissions: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_reassign
+
get /s/{space_id}/api/fleet/check-permissions
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Reassign multiple agents to a different agent policy.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-reassign + Check whether the current user has the required permissions to use Fleet. Optionally verifies Fleet Server setup privileges. + operationId: get-fleet-check-permissions parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: When true, check Fleet Server setup privileges in addition to standard Fleet privileges + in: query + name: fleetServerSetup + required: false schema: - example: 'true' - type: string - requestBody: - content: - application/json: - examples: - postBulkReassignAgentsRequestExample: - description: Reassign multiple agents to a different policy - value: - agents: - - agent-id-1 - - agent-id-2 - policy_id: agent-policy-id-2 - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - includeInactive: - default: false - type: boolean - policy_id: - type: string - required: - - policy_id - - agents + type: boolean responses: '200': content: application/json: examples: - postBulkReassignAgentsExample: - description: Bulk reassign action result + checkPermissionsMissingPrivilegesExample: + description: The current user is missing Fleet privileges value: - actionId: action-id-1 + error: MISSING_PRIVILEGES + success: false + checkPermissionsSuccessExample: + description: The current user has all required Fleet permissions + value: + success: true schema: additionalProperties: false type: object properties: - actionId: + error: + enum: + - MISSING_SECURITY + - MISSING_PRIVILEGES + - MISSING_FLEET_SERVER_SETUP_PRIVILEGES type: string + success: + type: boolean required: - - actionId + - success description: Successful response '400': content: @@ -40267,76 +34754,106 @@ paths: - message - attributes description: Bad Request - summary: Bulk reassign agents + summary: Check permissions tags: - - Elastic Agent actions + - Fleet internals x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/bulk_remove_collectors: - post: + /api/fleet/cloud_connectors: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_remove_collectors
+
get /s/{space_id}/api/fleet/cloud_connectors
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Remove multiple OpAMP collectors from the Fleet agents list. Marks the collectors as unenrolled. This action does not invalidate API keys, so collectors can reconnect on their own.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-remove-collectors + List all Fleet cloud connectors.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. + operationId: get-fleet-cloud-connectors parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: The page number for pagination. + in: query + name: page + required: false + schema: + type: string + - description: The number of items per page. + in: query + name: perPage + required: false + schema: + type: string + - description: KQL query to filter cloud connectors. + in: query + name: kuery + required: false schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkRemoveCollectorsRequestExample: - description: Remove multiple OpAMP collectors - value: - agents: - - collector-id-1 - - collector-id-2 - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - description: List of collector agent IDs - type: string - maxItems: 10000 - type: array - - description: KQL query string. Leave empty to target all collectors - type: string - includeInactive: - description: When passing collectors by KQL query, also removes inactive collectors - type: boolean - required: - - agents responses: '200': content: application/json: examples: - postBulkRemoveCollectorsExample: - description: Bulk remove collectors action result + getCloudConnectorsExample: + description: List of Fleet cloud connectors value: - actionId: action-id-1 - schema: - additionalProperties: false + items: + - accountType: single-account + cloudProvider: aws + created_at: '2024-01-15T10:00:00.000Z' + id: cloud-connector-id-1 + name: My AWS connector + packagePolicyCount: 2 + updated_at: '2024-01-15T10:00:00.000Z' + vars: {} + schema: + additionalProperties: false type: object properties: - actionId: - type: string + items: + items: + additionalProperties: false + type: object + properties: + accountType: + type: string + cloudProvider: + type: string + created_at: + type: string + id: + type: string + name: + type: string + namespace: + type: string + packagePolicyCount: + type: number + updated_at: + type: string + vars: + additionalProperties: + nullable: true + type: object + verification_failed_at: + type: string + verification_started_at: + type: string + verification_status: + type: string + required: + - id + - name + - cloudProvider + - vars + - packagePolicyCount + - created_at + - updated_at + maxItems: 10000 + type: array required: - - actionId + - items description: Successful response '400': content: @@ -40367,24 +34884,23 @@ paths: - message - attributes description: Bad Request - summary: Bulk remove OpAMP collectors + summary: Get cloud connectors tags: - - Elastic Agent actions - x-state: Experimental; added in 9.5.0 + - Fleet cloud connectors + x-state: Experimental; added in 9.2.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/bulk_request_diagnostics: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_request_diagnostics
+
post /s/{space_id}/api/fleet/cloud_connectors
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Request diagnostics bundles from multiple agents.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: post-fleet-agents-bulk-request-diagnostics + Create a new Fleet cloud connector.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. + operationId: post-fleet-cloud-connectors parameters: - description: A required header to protect against CSRF attacks in: header @@ -40397,53 +34913,134 @@ paths: content: application/json: examples: - postBulkRequestDiagnosticsRequestExample: - description: Request diagnostics bundles from multiple agents + postCloudConnectorRequestExample: + description: Create a new AWS cloud connector value: - additional_metrics: - - CPU - agents: - - agent-id-1 - - agent-id-2 + accountType: single-account + cloudProvider: aws + name: My AWS connector + vars: {} schema: additionalProperties: false type: object properties: - additional_metrics: - items: - enum: - - CPU - type: string - maxItems: 1 - type: array - agents: - anyOf: - - items: + accountType: + description: 'The account type: single-account (single account/subscription) or organization-account (organization-wide).' + enum: + - single-account + - organization-account + type: string + cloudProvider: + description: 'The cloud provider type: aws, azure, or gcp.' + enum: + - aws + - azure + - gcp + type: string + name: + description: The name of the cloud connector. + maxLength: 255 + minLength: 1 + type: string + vars: + additionalProperties: + anyOf: + - maxLength: 1000 type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number + - type: number + - type: boolean + - additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + maxLength: 50 + type: string + value: + anyOf: + - maxLength: 1000 + type: string + - additionalProperties: false + type: object + properties: + id: + maxLength: 255 + type: string + isSecretRef: + type: boolean + required: + - isSecretRef + - id + required: + - type + - value + type: object required: - - agents + - name + - cloudProvider + - vars responses: '200': content: application/json: examples: - postBulkRequestDiagnosticsExample: - description: Bulk diagnostics action result + postCloudConnectorExample: + description: The created Fleet cloud connector value: - actionId: action-id-1 + item: + accountType: single-account + cloudProvider: aws + created_at: '2024-01-15T10:00:00.000Z' + id: cloud-connector-id-2 + name: My AWS connector + packagePolicyCount: 0 + updated_at: '2024-01-15T10:00:00.000Z' + vars: {} schema: additionalProperties: false type: object properties: - actionId: - type: string + item: + additionalProperties: false + type: object + properties: + accountType: + type: string + cloudProvider: + type: string + created_at: + type: string + id: + type: string + name: + type: string + namespace: + type: string + packagePolicyCount: + type: number + updated_at: + type: string + vars: + additionalProperties: + nullable: true + type: object + verification_failed_at: + type: string + verification_started_at: + type: string + verification_status: + type: string + required: + - id + - name + - cloudProvider + - vars + - packagePolicyCount + - created_at + - updated_at required: - - actionId + - item description: Successful response '400': content: @@ -40474,23 +35071,24 @@ paths: - message - attributes description: Bad Request - summary: Bulk request diagnostics from agents + summary: Create cloud connector tags: - - Elastic Agent actions + - Fleet cloud connectors + x-state: Experimental; added in 9.2.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/bulk_rollback: - post: + /api/fleet/cloud_connectors/{cloudConnectorId}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_rollback
+
delete /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Rollback multiple agents to the previous version.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-rollback + Delete a cloud connector by ID. Use the `force` query parameter to delete even if package policies are still using it.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. + operationId: delete-fleet-cloud-connectors-cloudconnectorid parameters: - description: A required header to protect against CSRF attacks in: header @@ -40499,64 +35097,46 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - bulkRollbackAgentsRequest: - value: - agents: - - agent-1 - - agent-2 - batchSize: 100 - includeInactive: false - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - includeInactive: - default: false - type: boolean - required: - - agents + - description: The unique identifier of the cloud connector to delete. + in: path + name: cloudConnectorId + required: true + schema: + type: string + - description: If true, forces deletion even if the cloud connector is in use. + in: query + name: force + required: false + schema: + type: boolean responses: '200': content: application/json: examples: - successResponse: + deleteCloudConnectorExample: + description: The cloud connector was successfully deleted value: - actionIds: - - actionId1 - - actionId2 + id: cloud-connector-id-1 schema: additionalProperties: false type: object properties: - actionIds: - items: - type: string - maxItems: 10000 - type: array + id: + type: string required: - - actionIds - description: 'OK: A successful request.' + - id + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -40575,87 +35155,92 @@ paths: required: - message - attributes - description: A bad request. - summary: Bulk rollback agents + description: Bad Request + summary: Delete cloud connector (supports force deletion) tags: - - Elastic Agent actions - x-state: Experimental; added in 9.4.0 + - Fleet cloud connectors + x-state: Experimental; added in 9.2.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/bulk_unenroll: - post: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_unenroll
+
get /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Unenroll multiple agents, optionally revoking their enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-unenroll + Get a cloud connector by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. + operationId: get-fleet-cloud-connectors-cloudconnectorid parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: The unique identifier of the cloud connector. + in: path + name: cloudConnectorId required: true schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkUnenrollAgentsRequestExample: - description: Unenroll multiple agents - value: - agents: - - agent-id-1 - - agent-id-2 - revoke: false - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - description: list of agent IDs - type: string - maxItems: 10000 - type: array - - description: KQL query string, leave empty to action all agents - type: string - batchSize: - type: number - force: - description: Unenrolls hosted agents too - type: boolean - includeInactive: - description: When passing agents by KQL query, unenrolls inactive agents too - type: boolean - revoke: - description: Revokes API keys of agents - type: boolean - required: - - agents responses: '200': content: application/json: examples: - postBulkUnenrollAgentsExample: - description: Bulk unenroll action result + getCloudConnectorExample: + description: A Fleet cloud connector value: - actionId: action-id-1 + item: + accountType: single-account + cloudProvider: aws + created_at: '2024-01-15T10:00:00.000Z' + id: cloud-connector-id-1 + name: My AWS connector + packagePolicyCount: 2 + updated_at: '2024-01-15T10:00:00.000Z' + vars: {} schema: additionalProperties: false type: object properties: - actionId: - type: string + item: + additionalProperties: false + type: object + properties: + accountType: + type: string + cloudProvider: + type: string + created_at: + type: string + id: + type: string + name: + type: string + namespace: + type: string + packagePolicyCount: + type: number + updated_at: + type: string + vars: + additionalProperties: + nullable: true + type: object + verification_failed_at: + type: string + verification_started_at: + type: string + verification_status: + type: string + required: + - id + - name + - cloudProvider + - vars + - packagePolicyCount + - created_at + - updated_at required: - - actionId + - item description: Successful response '400': content: @@ -40686,23 +35271,23 @@ paths: - message - attributes description: Bad Request - summary: Bulk unenroll agents + summary: Get cloud connector tags: - - Elastic Agent actions + - Fleet cloud connectors + x-state: Experimental; added in 9.2.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/bulk_update_agent_tags: - post: + put: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_update_agent_tags
+
put /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Add or remove tags across multiple agents.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-update-agent-tags + Update a cloud connector by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. + operationId: put-fleet-cloud-connectors-cloudconnectorid parameters: - description: A required header to protect against CSRF attacks in: header @@ -40711,65 +35296,131 @@ paths: schema: example: 'true' type: string + - description: The unique identifier of the cloud connector to update. + in: path + name: cloudConnectorId + required: true + schema: + type: string requestBody: content: application/json: examples: - postBulkUpdateAgentTagsRequestExample: - description: Add and remove tags across multiple agents + putCloudConnectorRequestExample: + description: Update a Fleet cloud connector value: - agents: - - agent-id-1 - - agent-id-2 - tagsToAdd: - - production - tagsToRemove: - - staging + name: Updated AWS connector + vars: {} schema: additionalProperties: false type: object properties: - agents: - anyOf: - - items: + accountType: + description: 'The account type: single-account (single account/subscription) or organization-account (organization-wide).' + enum: + - single-account + - organization-account + type: string + name: + description: The name of the cloud connector. + maxLength: 255 + minLength: 1 + type: string + vars: + additionalProperties: + anyOf: + - maxLength: 1000 type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - includeInactive: - default: false - type: boolean - tagsToAdd: - items: - type: string - maxItems: 10 - type: array - tagsToRemove: - items: - type: string - maxItems: 10 - type: array - required: - - agents + - type: number + - type: boolean + - additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + maxLength: 50 + type: string + value: + anyOf: + - maxLength: 1000 + type: string + - additionalProperties: false + type: object + properties: + id: + maxLength: 255 + type: string + isSecretRef: + type: boolean + required: + - isSecretRef + - id + required: + - type + - value + type: object responses: '200': content: application/json: examples: - postBulkUpdateAgentTagsExample: - description: Bulk action result + putCloudConnectorExample: + description: The updated Fleet cloud connector value: - actionId: action-id-1 - schema: + item: + accountType: single-account + cloudProvider: aws + created_at: '2024-01-15T10:00:00.000Z' + id: cloud-connector-id-1 + name: Updated AWS connector + packagePolicyCount: 2 + updated_at: '2024-01-15T11:00:00.000Z' + vars: {} + schema: additionalProperties: false type: object properties: - actionId: - type: string + item: + additionalProperties: false + type: object + properties: + accountType: + type: string + cloudProvider: + type: string + created_at: + type: string + id: + type: string + name: + type: string + namespace: + type: string + packagePolicyCount: + type: number + updated_at: + type: string + vars: + additionalProperties: + nullable: true + type: object + verification_failed_at: + type: string + verification_started_at: + type: string + verification_status: + type: string + required: + - id + - name + - cloudProvider + - vars + - packagePolicyCount + - created_at + - updated_at required: - - actionId + - item description: Successful response '400': content: @@ -40800,93 +35451,124 @@ paths: - message - attributes description: Bad Request - summary: Bulk update agent tags + summary: Update cloud connector tags: - - Elastic Agent actions + - Fleet cloud connectors + x-state: Experimental; added in 9.2.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/bulk_upgrade: - post: + /api/fleet/cloud_connectors/{cloudConnectorId}/usage: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/bulk_upgrade
+
get /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}/usage
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Upgrade multiple agents to a newer version, with optional rollout controls.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-agents-bulk-upgrade + Get a list of package policies that are using a given cloud connector.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. + operationId: get-fleet-cloud-connectors-cloudconnectorid-usage parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: The unique identifier of the cloud connector. + in: path + name: cloudConnectorId required: true schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkUpgradeAgentsRequestExample: - description: Upgrade multiple agents to a specific version - value: - agents: - - agent-id-1 - - agent-id-2 - rollout_duration_seconds: 3600 - version: 8.17.0 - schema: - additionalProperties: false - type: object - properties: - agents: - anyOf: - - items: - type: string - maxItems: 10000 - type: array - - type: string - batchSize: - type: number - force: - type: boolean - includeInactive: - default: false - type: boolean - rollout_duration_seconds: - minimum: 600 - type: number - skipRateLimitCheck: - type: boolean - source_uri: - type: string - start_time: - type: string - version: - type: string - required: - - agents - - version + - description: The page number for pagination. + in: query + name: page + required: false + schema: + minimum: 1 + type: number + - description: The number of items per page. + in: query + name: perPage + required: false + schema: + minimum: 1 + type: number responses: '200': content: application/json: examples: - postBulkUpgradeAgentsExample: - description: Bulk upgrade action result + getCloudConnectorUsageResponseExample: + description: Example response showing package policies using the cloud connector value: - actionId: action-id-1 + items: + - created_at: '2025-01-16T09:00:00.000Z' + id: package-policy-1 + name: CSPM AWS Policy + package: + name: cloud_security_posture + title: Cloud Security Posture Management + version: 3.1.1 + policy_ids: + - policy-id-123 + - policy-id-456 + updated_at: '2025-01-16T09:00:00.000Z' + page: 1 + perPage: 20 + total: 2 schema: additionalProperties: false type: object properties: - actionId: - type: string + items: + items: + additionalProperties: false + type: object + properties: + created_at: + type: string + id: + type: string + name: + type: string + package: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + version: + type: string + required: + - name + - title + - version + policy_ids: + items: + type: string + maxItems: 10000 + type: array + updated_at: + type: string + required: + - id + - name + - policy_ids + - created_at + - updated_at + maxItems: 10000 + type: array + page: + type: number + perPage: + type: number + total: + type: number required: - - actionId - description: Successful response + - items + - total + - page + - perPage + description: 'OK: A successful request.' '400': content: application/json: @@ -40895,7 +35577,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: An error message describing what went wrong + message: Cloud connector not found statusCode: 400 schema: additionalProperties: false @@ -40915,59 +35597,130 @@ paths: required: - message - attributes - description: Bad Request - summary: Bulk upgrade agents + description: A bad request. + summary: Get cloud connector usage (package policies using the connector) tags: - - Elastic Agent actions + - Fleet cloud connectors + x-state: Experimental; added in 9.2.0 x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/files/{fileId}: - delete: + /api/fleet/data_streams: + get: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/agents/files/{fileId}
+
get /s/{space_id}/api/fleet/data_streams
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete a file uploaded by an agent.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: delete-fleet-agents-files-fileid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the uploaded file - in: path - name: fileId - required: true - schema: - type: string + List all Fleet-managed data streams with metadata including package, namespace, size, and last activity.

[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all. + operationId: get-fleet-data-streams + parameters: [] responses: '200': content: application/json: examples: - deleteAgentUploadFileExample: - description: Uploaded file successfully deleted + getDataStreamsExample: + description: List of Fleet-managed data streams value: - deleted: true - id: file-id-1 + data_streams: + - dashboards: + - id: nginx-overview + title: Nginx Overview + dataset: nginx.access + index: logs-nginx.access-default + last_activity_ms: 1700000000000 + namespace: default + package: nginx + package_version: 1.20.0 + serviceDetails: null + size_in_bytes: 1048576 + size_in_bytes_formatted: 1mb + type: logs + - dashboards: [] + dataset: system.cpu + index: metrics-system.cpu-default + last_activity_ms: 1699999000000 + namespace: default + package: system + package_version: 1.38.0 + serviceDetails: null + size_in_bytes: 524288 + size_in_bytes_formatted: 512kb + type: metrics schema: additionalProperties: false type: object properties: - deleted: - type: boolean - id: - type: string + data_streams: + items: + additionalProperties: false + type: object + properties: + dashboards: + items: + additionalProperties: false + type: object + properties: + id: + type: string + title: + type: string + required: + - id + - title + maxItems: 10000 + type: array + dataset: + type: string + index: + type: string + last_activity_ms: + type: number + namespace: + type: string + package: + type: string + package_version: + type: string + serviceDetails: + additionalProperties: false + nullable: true + type: object + properties: + environment: + type: string + serviceName: + type: string + required: + - environment + - serviceName + size_in_bytes: + type: number + size_in_bytes_formatted: + anyOf: + - type: number + - type: string + type: + type: string + required: + - index + - dataset + - namespace + - type + - package + - package_version + - last_activity_ms + - size_in_bytes + - size_in_bytes_formatted + - dashboards + - serviceDetails + maxItems: 10000 + type: array required: - - id - - deleted + - data_streams description: Successful response '400': content: @@ -40998,34 +35751,42 @@ paths: - message - attributes description: Bad Request - summary: Delete an uploaded file + summary: Get data streams tags: - - Elastic Agents + - Data streams x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/files/{fileId}/{fileName}: + /api/fleet/enrollment_api_keys: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/files/{fileId}/{fileName}
+
get /s/{space_id}/api/fleet/enrollment_api_keys
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a file uploaded by an agent.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-files-fileid-filename + List all enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup. + operationId: get-fleet-enrollment-api-keys parameters: - - description: The ID of the uploaded file - in: path - name: fileId - required: true + - description: Page number + in: query + name: page + required: false schema: - type: string - - description: The name of the uploaded file - in: path - name: fileName - required: true + default: 1 + type: number + - description: Number of results per page + in: query + name: perPage + required: false + schema: + default: 20 + type: number + - description: A KQL query string to filter results + in: query + name: kuery + required: false schema: type: string responses: @@ -41033,12 +35794,56 @@ paths: content: application/json: examples: - getAgentUploadFileExample: - description: The uploaded file content as a stream - value: + getEnrollmentApiKeysExample: + description: List of enrollment API keys + value: + items: + - active: true + api_key: api-key-value-1 + api_key_id: api-key-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: key-id-1 + name: Default policy enrollment key + policy_id: policy-id-1 + list: + - active: true + api_key: api-key-value-1 + api_key_id: api-key-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: key-id-1 + name: Default policy enrollment key + policy_id: policy-id-1 + page: 1 + perPage: 20 + total: 1 schema: + additionalProperties: false type: object - description: Successful response — returns the uploaded file content + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key' + maxItems: 10000 + type: array + list: + deprecated: true + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key' + maxItems: 10000 + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - total + - page + - perPage + - list + description: Successful response '400': content: application/json: @@ -41068,93 +35873,149 @@ paths: - message - attributes description: Bad Request - summary: Get an uploaded file + summary: Get enrollment API keys tags: - - Elastic Agents + - Fleet enrollment API keys x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/setup: - get: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/setup
+
post /s/{space_id}/api/fleet/enrollment_api_keys
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the current Fleet setup status, including whether Fleet is ready to enroll agents and which requirements or optional features are missing.

[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup. - operationId: get-fleet-agents-setup - parameters: [] + Create an enrollment API key for a given agent policy.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-enrollment-api-keys + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + requestBody: + content: + application/json: + examples: + postEnrollmentApiKeyRequestExample: + description: Create an enrollment API key for an agent policy + value: + expiration: '2025-01-01T00:00:00.000Z' + name: My enrollment key + policy_id: policy-id-1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_new_enrollment_api_key' responses: '200': content: application/json: examples: - agentsSetupNotReadyExample: - description: Fleet is not ready — a Fleet Server and API keys are required + postEnrollmentApiKeyExample: + description: The created enrollment API key value: - is_action_secrets_storage_enabled: false - is_secrets_storage_enabled: false - is_space_awareness_enabled: false - is_ssl_secrets_storage_enabled: false - isReady: false - missing_optional_features: - - encrypted_saved_object_encryption_key_required - missing_requirements: - - fleet_server - - api_keys - agentsSetupReadyExample: - description: Fleet is ready to enroll agents — all requirements are met + action: created + item: + active: true + api_key: api-key-value-1 + api_key_id: api-key-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: key-id-1 + name: My enrollment key + policy_id: policy-id-1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response value: - is_action_secrets_storage_enabled: true - is_secrets_storage_enabled: true - is_space_awareness_enabled: false - is_ssl_secrets_storage_enabled: false - isReady: true - missing_optional_features: [] - missing_requirements: [] - package_verification_key_id: D88DB4CC + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false - description: A summary of the agent setup status. `isReady` indicates whether the setup is ready. If the setup is not ready, `missing_requirements` lists which requirements are missing. + description: Generic Error type: object properties: - is_action_secrets_storage_enabled: - type: boolean - is_secrets_storage_enabled: - type: boolean - is_space_awareness_enabled: - type: boolean - is_ssl_secrets_storage_enabled: - type: boolean - isReady: - type: boolean - missing_optional_features: - items: - enum: - - encrypted_saved_object_encryption_key_required - type: string - maxItems: 1 - type: array - missing_requirements: - items: - enum: - - security_required - - tls_required - - api_keys - - fleet_admin_user - - fleet_server - type: string - maxItems: 5 - type: array - package_verification_key_id: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: type: string + statusCode: + type: number required: - - isReady - - missing_requirements - - missing_optional_features - description: Fleet setup status + - message + - attributes + description: Bad Request + summary: Create an enrollment API key + tags: + - Fleet enrollment API keys + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/enrollment_api_keys/_bulk_delete: + post: + description: |- + **Spaces method and path for this operation:** + +
post /s/{space_id}/api/fleet/enrollment_api_keys/_bulk_delete
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Revoke or delete multiple enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: post-fleet-enrollment-api-keys-bulk-delete + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + requestBody: + content: + application/json: + examples: + bulkDeleteByIdsExample: + description: Bulk delete enrollment API keys by IDs + value: + forceDelete: true + tokenIds: + - token-id-1 + - token-id-2 + bulkDeleteByKueryExample: + description: Bulk delete enrollment API keys by KQL query + value: + forceDelete: false + kuery: policy_id:"policy-id-1" + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_delete_enrollment_api_keys_request' + responses: + '200': + content: + application/json: + examples: + bulkDeleteEnrollmentApiKeysExample: + description: The enrollment API keys were successfully processed + value: + action: deleted + count: 2 + errorCount: 0 + successCount: 2 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_delete_enrollment_api_keys_response' + description: Successful response '400': content: application/json: @@ -41163,7 +36024,7 @@ paths: description: Example of a generic error response value: error: Bad Request - message: An error message describing what went wrong + message: Either tokenIds or kuery must be provided statusCode: 400 schema: additionalProperties: false @@ -41184,22 +36045,24 @@ paths: - message - attributes description: Bad Request - summary: Get agent setup info + summary: Bulk revoke or delete enrollment API keys tags: - - Elastic Agents + - Fleet enrollment API keys + x-state: Generally available; added in 9.5.0 x-metaTags: - content: Kibana name: product_name - post: + /api/fleet/enrollment_api_keys/{keyId}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/agents/setup
+
delete /s/{space_id}/api/fleet/enrollment_api_keys/{keyId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Initialize Fleet. This endpoint is used by Elastic Agents to trigger Fleet setup. Safe to call multiple times; subsequent calls are idempotent.

[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup. - operationId: post-fleet-agents-setup + Revoke or delete an enrollment API key by ID. Use `forceDelete=true` to remove the document.

[Required authorization] Route required privileges: fleet-agents-all. + operationId: delete-fleet-enrollment-api-keys-keyid parameters: - description: A required header to protect against CSRF attacks in: header @@ -41208,41 +36071,38 @@ paths: schema: example: 'true' type: string + - description: The ID of the enrollment API key + in: path + name: keyId + required: true + schema: + type: string + - description: When false (default), invalidate the API key and mark the token as inactive. When true, also delete the token document. + in: query + name: forceDelete + required: false + schema: + default: false + type: boolean + - description: When true, allow deletion of hidden enrollment tokens (managed/agentless policies). Defaults to false. + in: query + name: includeHidden + required: false + schema: + default: false + type: boolean responses: '200': content: application/json: examples: - agentsSetupSuccessExample: - description: Fleet setup initialized successfully with no non-fatal errors + deleteEnrollmentApiKeyExample: + description: The enrollment API key was successfully revoked value: - isInitialized: true - nonFatalErrors: [] + action: deleted schema: - additionalProperties: false - description: A summary of the result of Fleet's `setup` lifecycle. If `isInitialized` is true, Fleet is ready to accept agent enrollment. `nonFatalErrors` may include useful insight into non-blocking issues with Fleet setup. - type: object - properties: - isInitialized: - type: boolean - nonFatalErrors: - items: - additionalProperties: false - type: object - properties: - message: - type: string - name: - type: string - required: - - name - - message - maxItems: 10000 - type: array - required: - - isInitialized - - nonFatalErrors - description: Fleet setup completed + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_enrollment_api_key_response' + description: Successful response '400': content: application/json: @@ -41272,60 +36132,58 @@ paths: - message - attributes description: Bad Request - summary: Initiate Fleet setup + '404': + content: + application/json: + examples: + notFoundExample: + description: No enrollment API key was found with the given ID + value: + error: Not Found + message: EnrollmentAPIKey key-id-1 not found + statusCode: 404 + description: Not Found + summary: Revoke or delete an enrollment API key tags: - - Elastic Agents + - Fleet enrollment API keys x-metaTags: - content: Kibana name: product_name - /api/fleet/agents/tags: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/agents/tags
+
get /s/{space_id}/api/fleet/enrollment_api_keys/{keyId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of all tags used across enrolled agents.

[Required authorization] Route required privileges: fleet-agents-read. - operationId: get-fleet-agents-tags + Get an enrollment API key by ID.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup. + operationId: get-fleet-enrollment-api-keys-keyid parameters: - - description: A KQL query string to filter results - in: query - name: kuery - required: false + - description: The ID of the enrollment API key + in: path + name: keyId + required: true schema: type: string - - description: When true, include tags from inactive agents - in: query - name: showInactive - required: false - schema: - default: false - type: boolean responses: '200': content: application/json: examples: - getAgentTagsExample: - description: List of tags used across agents + getEnrollmentApiKeyExample: + description: An enrollment API key value: - items: - - production - - linux - - datacenter-1 + item: + active: true + api_key: api-key-value-1 + api_key_id: api-key-id-1 + created_at: '2024-01-01T00:00:00.000Z' + id: key-id-1 + name: Default policy enrollment key + policy_id: policy-id-1 schema: - additionalProperties: false - type: object - properties: - items: - items: - type: string - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key_response' description: Successful response '400': content: @@ -41356,58 +36214,72 @@ paths: - message - attributes description: Bad Request - summary: Get agent tags + '404': + content: + application/json: + examples: + notFoundExample: + description: No enrollment API key was found with the given ID + value: + error: Not Found + message: EnrollmentAPIKey key-id-1 not found + statusCode: 404 + description: Not Found + summary: Get an enrollment API key tags: - - Elastic Agents + - Fleet enrollment API keys x-metaTags: - content: Kibana name: product_name - /api/fleet/check-permissions: - get: + /api/fleet/epm/bulk_assets: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/check-permissions
+
post /s/{space_id}/api/fleet/epm/bulk_assets
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Check whether the current user has the required permissions to use Fleet. Optionally verifies Fleet Server setup privileges. - operationId: get-fleet-check-permissions + Retrieve multiple Kibana saved object assets by their IDs and types.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: post-fleet-epm-bulk-assets parameters: - - description: When true, check Fleet Server setup privileges in addition to standard Fleet privileges - in: query - name: fleetServerSetup - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: - type: boolean + example: 'true' + type: string + requestBody: + content: + application/json: + examples: + postBulkGetAssetsRequestExample: + description: Retrieve multiple assets by their IDs and types + value: + assetIds: + - id: dashboard-id-1 + type: dashboard + - id: index-pattern-id-1 + type: index_pattern + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_bulk_assets_request' responses: '200': content: application/json: examples: - checkPermissionsMissingPrivilegesExample: - description: The current user is missing Fleet privileges - value: - error: MISSING_PRIVILEGES - success: false - checkPermissionsSuccessExample: - description: The current user has all required Fleet permissions + postBulkGetAssetsExample: + description: Requested assets value: - success: true + items: + - appLink: /app/dashboards#/view/dashboard-id-1 + attributes: + title: My Dashboard + id: dashboard-id-1 + type: dashboard schema: - additionalProperties: false - type: object - properties: - error: - enum: - - MISSING_SECURITY - - MISSING_PRIVILEGES - - MISSING_FLEET_SERVER_SETUP_PRIVILEGES - type: string - success: - type: boolean - required: - - success + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_bulk_assets_response' description: Successful response '400': content: @@ -41438,106 +36310,53 @@ paths: - message - attributes description: Bad Request - summary: Check permissions + summary: Bulk get assets tags: - - Fleet internals + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/cloud_connectors: + /api/fleet/epm/categories: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/cloud_connectors
+
get /s/{space_id}/api/fleet/epm/categories
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - List all Fleet cloud connectors.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. - operationId: get-fleet-cloud-connectors + Get a list of integration categories.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-categories parameters: - - description: The page number for pagination. - in: query - name: page - required: false - schema: - type: string - - description: The number of items per page. + - description: When true, include prerelease packages in the results in: query - name: perPage + name: prerelease required: false schema: - type: string - - description: KQL query to filter cloud connectors. + type: boolean + - description: When true, include categories that only contain policy templates in: query - name: kuery + name: include_policy_templates required: false schema: - type: string + type: boolean responses: '200': content: application/json: examples: - getCloudConnectorsExample: - description: List of Fleet cloud connectors + getCategoriesExample: + description: List of integration categories value: items: - - accountType: single-account - cloudProvider: aws - created_at: '2024-01-15T10:00:00.000Z' - id: cloud-connector-id-1 - name: My AWS connector - packagePolicyCount: 2 - updated_at: '2024-01-15T10:00:00.000Z' - vars: {} + - count: 42 + id: security + title: Security + - count: 38 + id: observability + title: Observability schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - accountType: - type: string - cloudProvider: - type: string - created_at: - type: string - id: - type: string - name: - type: string - namespace: - type: string - packagePolicyCount: - type: number - updated_at: - type: string - vars: - additionalProperties: - nullable: true - type: object - verification_failed_at: - type: string - verification_started_at: - type: string - verification_status: - type: string - required: - - id - - name - - cloudProvider - - vars - - packagePolicyCount - - created_at - - updated_at - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_categories_response' description: Successful response '400': content: @@ -41568,23 +36387,23 @@ paths: - message - attributes description: Bad Request - summary: Get cloud connectors + summary: Get package categories tags: - - Fleet cloud connectors - x-state: Experimental; added in 9.2.0 + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name + /api/fleet/epm/custom_integrations: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/cloud_connectors
+
post /s/{space_id}/api/fleet/epm/custom_integrations
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create a new Fleet cloud connector.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. - operationId: post-fleet-cloud-connectors + Create a new custom integration package with user-defined data streams.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-custom-integrations parameters: - description: A required header to protect against CSRF attacks in: header @@ -41597,134 +36416,30 @@ paths: content: application/json: examples: - postCloudConnectorRequestExample: - description: Create a new AWS cloud connector + postCreateCustomIntegrationRequestExample: + description: Create a new custom integration value: - accountType: single-account - cloudProvider: aws - name: My AWS connector - vars: {} + datasets: + - name: my_custom_logs.access + type: logs + integrationName: my_custom_logs schema: - additionalProperties: false - type: object - properties: - accountType: - description: 'The account type: single-account (single account/subscription) or organization-account (organization-wide).' - enum: - - single-account - - organization-account - type: string - cloudProvider: - description: 'The cloud provider type: aws, azure, or gcp.' - enum: - - aws - - azure - - gcp - type: string - name: - description: The name of the cloud connector. - maxLength: 255 - minLength: 1 - type: string - vars: - additionalProperties: - anyOf: - - maxLength: 1000 - type: string - - type: number - - type: boolean - - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - maxLength: 50 - type: string - value: - anyOf: - - maxLength: 1000 - type: string - - additionalProperties: false - type: object - properties: - id: - maxLength: 255 - type: string - isSecretRef: - type: boolean - required: - - isSecretRef - - id - required: - - type - - value - type: object - required: - - name - - cloudProvider - - vars + $ref: '#/components/schemas/Kibana_HTTP_APIs_create_custom_integration_request' responses: '200': content: application/json: examples: - postCloudConnectorExample: - description: The created Fleet cloud connector + postCreateCustomIntegrationExample: + description: Custom integration successfully created value: - item: - accountType: single-account - cloudProvider: aws - created_at: '2024-01-15T10:00:00.000Z' - id: cloud-connector-id-2 - name: My AWS connector - packagePolicyCount: 0 - updated_at: '2024-01-15T10:00:00.000Z' - vars: {} + _meta: + install_source: custom + items: + - id: my_custom_logs-logs-my_custom_logs.access + type: index_template schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - accountType: - type: string - cloudProvider: - type: string - created_at: - type: string - id: - type: string - name: - type: string - namespace: - type: string - packagePolicyCount: - type: number - updated_at: - type: string - vars: - additionalProperties: - nullable: true - type: object - verification_failed_at: - type: string - verification_started_at: - type: string - verification_status: - type: string - required: - - id - - name - - cloudProvider - - vars - - packagePolicyCount - - created_at - - updated_at - required: - - item + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_response' description: Successful response '400': content: @@ -41755,24 +36470,23 @@ paths: - message - attributes description: Bad Request - summary: Create cloud connector + summary: Create a custom integration tags: - - Fleet cloud connectors - x-state: Experimental; added in 9.2.0 + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/cloud_connectors/{cloudConnectorId}: - delete: + /api/fleet/epm/custom_integrations/{pkgName}: + put: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
+
put /s/{space_id}/api/fleet/epm/custom_integrations/{pkgName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete a cloud connector by ID. Use the `force` query parameter to delete even if package policies are still using it.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. - operationId: delete-fleet-cloud-connectors-cloudconnectorid + Update the datasets of an existing custom integration package.

[Required authorization] Route required privileges: fleet-settings-all AND integrations-all. + operationId: put-fleet-epm-custom-integrations-pkgname parameters: - description: A required header to protect against CSRF attacks in: header @@ -41781,35 +36495,44 @@ paths: schema: example: 'true' type: string - - description: The unique identifier of the cloud connector to delete. + - description: Package name in: path - name: cloudConnectorId + name: pkgName required: true schema: type: string - - description: If true, forces deletion even if the cloud connector is in use. - in: query - name: force - required: false - schema: - type: boolean + requestBody: + content: + application/json: + examples: + putUpdateCustomIntegrationRequestExample: + description: Update a custom integration + value: + datasets: + - name: my_custom_logs.access + type: logs + integrationName: my_custom_logs + schema: + additionalProperties: false + type: object + properties: + categories: + items: + type: string + maxItems: 10 + type: array + readMeData: + type: string + required: + - readMeData responses: '200': content: application/json: examples: - deleteCloudConnectorExample: - description: The cloud connector was successfully deleted - value: - id: cloud-connector-id-1 - schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id + putUpdateCustomIntegrationExample: + description: Custom integration successfully updated + value: {} description: Successful response '400': content: @@ -41840,91 +36563,76 @@ paths: - message - attributes description: Bad Request - summary: Delete cloud connector (supports force deletion) + summary: Update a custom integration tags: - - Fleet cloud connectors - x-state: Experimental; added in 9.2.0 + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name + /api/fleet/epm/data_streams: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
+
get /s/{space_id}/api/fleet/epm/data_streams
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a cloud connector by ID.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. - operationId: get-fleet-cloud-connectors-cloudconnectorid + Get a list of data streams created by installed integration packages.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-data-streams parameters: - - description: The unique identifier of the cloud connector. - in: path - name: cloudConnectorId - required: true + - description: Filter by data stream type + in: query + name: type + required: false + schema: + enum: + - logs + - metrics + - traces + - synthetics + - profiling + type: string + - description: Filter data streams by dataset name + in: query + name: datasetQuery + required: false + schema: + type: string + - description: Sort order, ascending or descending + in: query + name: sortOrder + required: false schema: + default: asc + enum: + - asc + - desc type: string + - description: When true, only return data streams that are not associated with a package + in: query + name: uncategorisedOnly + required: false + schema: + default: false + type: boolean responses: '200': content: application/json: examples: - getCloudConnectorExample: - description: A Fleet cloud connector + getDataStreamsExample: + description: List of data streams from installed packages value: - item: - accountType: single-account - cloudProvider: aws - created_at: '2024-01-15T10:00:00.000Z' - id: cloud-connector-id-1 - name: My AWS connector - packagePolicyCount: 2 - updated_at: '2024-01-15T10:00:00.000Z' - vars: {} + data_streams: + - ilm_policy: logs-default + index_template: logs-system.syslog + name: logs-system.syslog-default + package: system + package_version: 1.55.0 + title: System syslog logs schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - accountType: - type: string - cloudProvider: - type: string - created_at: - type: string - id: - type: string - name: - type: string - namespace: - type: string - packagePolicyCount: - type: number - updated_at: - type: string - vars: - additionalProperties: - nullable: true - type: object - verification_failed_at: - type: string - verification_started_at: - type: string - verification_status: - type: string - required: - - id - - name - - cloudProvider - - vars - - packagePolicyCount - - created_at - - updated_at - required: - - item + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_data_streams_response' description: Successful response '400': content: @@ -41955,156 +36663,69 @@ paths: - message - attributes description: Bad Request - summary: Get cloud connector + summary: Get data streams tags: - - Fleet cloud connectors - x-state: Experimental; added in 9.2.0 + - Data streams x-metaTags: - content: Kibana name: product_name - put: + /api/fleet/epm/packages: + get: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}
+
get /s/{space_id}/api/fleet/epm/packages
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update a cloud connector by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all. - operationId: put-fleet-cloud-connectors-cloudconnectorid + Get a list of integration packages available in the registry.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: Filter packages by category + in: query + name: category + required: false schema: - example: 'true' type: string - - description: The unique identifier of the cloud connector to update. - in: path - name: cloudConnectorId - required: true + - description: When true, include prerelease packages in the results + in: query + name: prerelease + required: false schema: - type: string - requestBody: - content: - application/json: - examples: - putCloudConnectorRequestExample: - description: Update a Fleet cloud connector - value: - name: Updated AWS connector - vars: {} - schema: - additionalProperties: false - type: object - properties: - accountType: - description: 'The account type: single-account (single account/subscription) or organization-account (organization-wide).' - enum: - - single-account - - organization-account - type: string - name: - description: The name of the cloud connector. - maxLength: 255 - minLength: 1 - type: string - vars: - additionalProperties: - anyOf: - - maxLength: 1000 - type: string - - type: number - - type: boolean - - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - maxLength: 50 - type: string - value: - anyOf: - - maxLength: 1000 - type: string - - additionalProperties: false - type: object - properties: - id: - maxLength: 255 - type: string - isSecretRef: - type: boolean - required: - - isSecretRef - - id - required: - - type - - value - type: object + type: boolean + - description: When true, exclude the install status from the response + in: query + name: excludeInstallStatus + required: false + schema: + type: boolean + - description: When true, include the number of package policies per package + in: query + name: withPackagePoliciesCount + required: false + schema: + type: boolean responses: '200': content: application/json: examples: - putCloudConnectorExample: - description: The updated Fleet cloud connector + getPackagesExample: + description: List of available integration packages value: - item: - accountType: single-account - cloudProvider: aws - created_at: '2024-01-15T10:00:00.000Z' - id: cloud-connector-id-1 - name: Updated AWS connector - packagePolicyCount: 2 - updated_at: '2024-01-15T11:00:00.000Z' - vars: {} + items: + - categories: + - cloud + description: Collect logs and metrics from Amazon Web Services + id: aws + name: aws + status: not_installed + title: AWS + version: 2.10.0 + searchExcluded: 0 + total: 1 schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - accountType: - type: string - cloudProvider: - type: string - created_at: - type: string - id: - type: string - name: - type: string - namespace: - type: string - packagePolicyCount: - type: number - updated_at: - type: string - vars: - additionalProperties: - nullable: true - type: object - verification_failed_at: - type: string - verification_started_at: - type: string - verification_status: - type: string - required: - - id - - name - - cloudProvider - - vars - - packagePolicyCount - - created_at - - updated_at - required: - - item + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_packages_response' description: Successful response '400': content: @@ -42135,137 +36756,98 @@ paths: - message - attributes description: Bad Request - summary: Update cloud connector + summary: Get packages tags: - - Fleet cloud connectors - x-state: Experimental; added in 9.2.0 + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/cloud_connectors/{cloudConnectorId}/usage: - get: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/cloud_connectors/{cloudConnectorId}/usage
+
post /s/{space_id}/api/fleet/epm/packages
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of package policies that are using a given cloud connector.

[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read. - operationId: get-fleet-cloud-connectors-cloudconnectorid-usage + Install a package by uploading a .zip or .tar.gz archive (max 100MB). Only available to superusers.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages parameters: - - description: The unique identifier of the cloud connector. - in: path - name: cloudConnectorId + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf required: true schema: + example: 'true' type: string - - description: The page number for pagination. + - description: When true, ignore mapping update errors during installation in: query - name: page + name: ignoreMappingUpdateErrors required: false schema: - minimum: 1 - type: number - - description: The number of items per page. + default: false + type: boolean + - description: When true, skip data stream rollover after installation in: query - name: perPage + name: skipDataStreamRollover required: false schema: - minimum: 1 - type: number + default: false + type: boolean + requestBody: + content: + application/gzip: + examples: + postInstallByUploadRequestExample: + description: Upload a .zip or .tar.gz package archive (max 100MB) + value: + application/gzip; application/zip: + examples: + postInstallByUploadRequestExample: + description: Upload a .zip or .tar.gz package archive (max 100MB) + value: + schema: + format: binary + type: string responses: '200': content: + application/gzip; application/zip: + examples: + postInstallByUploadExample: + description: Package successfully installed from upload + value: + _meta: + install_source: upload + items: + - id: my-custom-package-logs-default + type: index_template + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_response' application/json: examples: - getCloudConnectorUsageResponseExample: - description: Example response showing package policies using the cloud connector + postInstallByUploadExample: + description: Package successfully installed from upload value: + _meta: + install_source: upload items: - - created_at: '2025-01-16T09:00:00.000Z' - id: package-policy-1 - name: CSPM AWS Policy - package: - name: cloud_security_posture - title: Cloud Security Posture Management - version: 3.1.1 - policy_ids: - - policy-id-123 - - policy-id-456 - updated_at: '2025-01-16T09:00:00.000Z' - page: 1 - perPage: 20 - total: 2 + - id: my-custom-package-logs-default + type: index_template + description: Successful response + '400': + content: + application/gzip; application/zip: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - created_at: - type: string - id: - type: string - name: - type: string - package: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version: - type: string - required: - - name - - title - - version - policy_ids: - items: - type: string - maxItems: 10000 - type: array - updated_at: - type: string - required: - - id - - name - - policy_ids - - created_at - - updated_at - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage - description: 'OK: A successful request.' - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: Cloud connector not found - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error + description: Generic Error type: object properties: attributes: @@ -42281,130 +36863,77 @@ paths: required: - message - attributes - description: A bad request. - summary: Get cloud connector usage (package policies using the connector) + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + description: Bad Request + summary: Install a package by upload tags: - - Fleet cloud connectors - x-state: Experimental; added in 9.2.0 + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/data_streams: - get: + /api/fleet/epm/packages/_bulk: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/data_streams
+
post /s/{space_id}/api/fleet/epm/packages/_bulk
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - List all Fleet-managed data streams with metadata including package, namespace, size, and last activity.

[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all. - operationId: get-fleet-data-streams - parameters: [] + Install multiple packages from the Elastic Package Registry in a single request.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: When true, allow installing prerelease versions + in: query + name: prerelease + required: false + schema: + type: boolean + requestBody: + content: + application/json: + examples: + postBulkInstallPackagesRequestExample: + description: Install multiple packages from the registry + value: + packages: + - system + - aws + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_install_packages_from_registry_request' responses: '200': content: application/json: examples: - getDataStreamsExample: - description: List of Fleet-managed data streams + postBulkInstallPackagesExample: + description: Bulk install results value: - data_streams: - - dashboards: - - id: nginx-overview - title: Nginx Overview - dataset: nginx.access - index: logs-nginx.access-default - last_activity_ms: 1700000000000 - namespace: default - package: nginx - package_version: 1.20.0 - serviceDetails: null - size_in_bytes: 1048576 - size_in_bytes_formatted: 1mb - type: logs - - dashboards: [] - dataset: system.cpu - index: metrics-system.cpu-default - last_activity_ms: 1699999000000 - namespace: default - package: system - package_version: 1.38.0 - serviceDetails: null - size_in_bytes: 524288 - size_in_bytes_formatted: 512kb - type: metrics - schema: - additionalProperties: false - type: object - properties: - data_streams: items: - additionalProperties: false - type: object - properties: - dashboards: - items: - additionalProperties: false - type: object - properties: - id: - type: string - title: - type: string - required: - - id - - title - maxItems: 10000 - type: array - dataset: - type: string - index: - type: string - last_activity_ms: - type: number - namespace: - type: string - package: - type: string - package_version: - type: string - serviceDetails: - additionalProperties: false - nullable: true - type: object - properties: - environment: - type: string - serviceName: - type: string - required: - - environment - - serviceName - size_in_bytes: - type: number - size_in_bytes_formatted: - anyOf: - - type: number - - type: string - type: - type: string - required: - - index - - dataset - - namespace - - type - - package - - package_version - - last_activity_ms - - size_in_bytes - - size_in_bytes_formatted - - dashboards - - serviceDetails - maxItems: 10000 - type: array - required: - - data_streams + - name: system + result: + assets: [] + status: installed + - name: aws + result: + assets: [] + status: installed + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_install_packages_from_registry_response' description: Successful response '400': content: @@ -42435,166 +36964,74 @@ paths: - message - attributes description: Bad Request - summary: Get data streams + summary: Bulk install packages tags: - - Data streams + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/enrollment_api_keys: - get: + /api/fleet/epm/packages/_bulk_namespace_customization: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/enrollment_api_keys
+
post /s/{space_id}/api/fleet/epm/packages/_bulk_namespace_customization
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - List all enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup. - operationId: get-fleet-enrollment-api-keys + Enable or disable namespace-level index template customization for a list of packages in one call. Use this for IaC-style declarative flows.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk-namespace-customization parameters: - - description: Page number - in: query - name: page - required: false - schema: - default: 1 - type: number - - description: Number of results per page - in: query - name: perPage - required: false - schema: - default: 20 - type: number - - description: A KQL query string to filter results - in: query - name: kuery - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string + requestBody: + content: + application/json: + examples: + bulkNamespaceCustomizationRequest: + value: + disable: + - dev + enable: + - production + - staging + packages: + - system + - nginx + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_namespace_customization_request' responses: '200': content: application/json: examples: - getEnrollmentApiKeysExample: - description: List of enrollment API keys + successResponse: value: items: - - active: true - api_key: api-key-value-1 - api_key_id: api-key-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: key-id-1 - name: Default policy enrollment key - policy_id: policy-id-1 - list: - - active: true - api_key: api-key-value-1 - api_key_id: api-key-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: key-id-1 - name: Default policy enrollment key - policy_id: policy-id-1 - page: 1 - perPage: 20 - total: 1 + - name: system + namespace_customization_enabled_for: + - production + - staging + success: true + - error: Package nginx is not installed + name: nginx + success: false schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - active: - description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: The enrollment API key (token) used for enrolling Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - hidden: - type: boolean - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: The ID of the agent policy the Elastic Agent will be enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - maxItems: 10000 - type: array - list: - deprecated: true - items: - additionalProperties: false - type: object - properties: - active: - description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: The enrollment API key (token) used for enrolling Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - hidden: - type: boolean - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: The ID of the agent policy the Elastic Agent will be enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage - - list - description: Successful response + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_namespace_customization_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: error: Bad Request - message: An error message describing what went wrong + message: 'Namespaces must not appear in both enable and disable: production' statusCode: 400 schema: additionalProperties: false @@ -42614,23 +37051,24 @@ paths: required: - message - attributes - description: Bad Request - summary: Get enrollment API keys + description: A bad request. + summary: Bulk enable/disable namespace-level customization for packages tags: - - Fleet enrollment API keys + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name + /api/fleet/epm/packages/_bulk_rollback: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/enrollment_api_keys
+
post /s/{space_id}/api/fleet/epm/packages/_bulk_rollback
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create an enrollment API key for a given agent policy.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-enrollment-api-keys + Rollback multiple packages to their previous versions.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk-rollback parameters: - description: A required header to protect against CSRF attacks in: header @@ -42643,94 +37081,30 @@ paths: content: application/json: examples: - postEnrollmentApiKeyRequestExample: - description: Create an enrollment API key for an agent policy + bulkRollbackRequest: value: - expiration: '2025-01-01T00:00:00.000Z' - name: My enrollment key - policy_id: policy-id-1 + packages: + - name: system schema: - additionalProperties: false - type: object - properties: - expiration: - type: string - name: - type: string - policy_id: - type: string - required: - - policy_id + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_rollback_packages_request' responses: '200': content: application/json: examples: - postEnrollmentApiKeyExample: - description: The created enrollment API key + successResponse: value: - action: created - item: - active: true - api_key: api-key-value-1 - api_key_id: api-key-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: key-id-1 - name: My enrollment key - policy_id: policy-id-1 + taskId: taskId schema: - additionalProperties: false - type: object - properties: - action: - enum: - - created - type: string - item: - additionalProperties: false - type: object - properties: - active: - description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: The enrollment API key (token) used for enrolling Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - hidden: - type: boolean - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: The ID of the agent policy the Elastic Agent will be enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - required: - - item - - action - description: Successful response + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_rollback_packages_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -42749,109 +37123,49 @@ paths: required: - message - attributes - description: Bad Request - summary: Create an enrollment API key + description: A bad request. + summary: Bulk rollback packages tags: - - Fleet enrollment API keys + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/enrollment_api_keys/_bulk_delete: - post: + /api/fleet/epm/packages/_bulk_rollback/{taskId}: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/enrollment_api_keys/_bulk_delete
+
get /s/{space_id}/api/fleet/epm/packages/_bulk_rollback/{taskId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Revoke or delete multiple enrollment API keys.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: post-fleet-enrollment-api-keys-bulk-delete + Get the status and results of a bulk package rollback operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: get-fleet-epm-packages-bulk-rollback-taskid parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: Task ID of the bulk operation + in: path + name: taskId required: true schema: - example: 'true' type: string - requestBody: - content: - application/json: - examples: - bulkDeleteByIdsExample: - description: Bulk delete enrollment API keys by IDs - value: - forceDelete: true - tokenIds: - - token-id-1 - - token-id-2 - bulkDeleteByKueryExample: - description: Bulk delete enrollment API keys by KQL query - value: - forceDelete: false - kuery: policy_id:"policy-id-1" - schema: - additionalProperties: false - type: object - properties: - forceDelete: - default: false - description: When false (default), invalidate the API key and mark the token as inactive. When true, also delete the token document. - type: boolean - includeHidden: - default: false - description: When true, allow deletion of hidden enrollment tokens (managed/agentless policies). Defaults to false. - type: boolean - kuery: - description: KQL query to select enrollment tokens to delete. - type: string - tokenIds: - description: List of enrollment token IDs to delete. - items: - type: string - maxItems: 10000 - type: array responses: '200': content: application/json: examples: - bulkDeleteEnrollmentApiKeysExample: - description: The enrollment API keys were successfully processed + successResponse: value: - action: deleted - count: 2 - errorCount: 0 - successCount: 2 + status: success schema: - additionalProperties: false - type: object - properties: - action: - type: string - count: - type: number - errorCount: - type: number - successCount: - type: number - required: - - action - - count - - successCount - - errorCount - description: Successful response + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_one_bulk_operation_packages_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: - error: Bad Request - message: Either tokenIds or kuery must be provided - statusCode: 400 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -42870,25 +37184,24 @@ paths: required: - message - attributes - description: Bad Request - summary: Bulk revoke or delete enrollment API keys + description: A bad request. + summary: Get Bulk rollback packages details tags: - - Fleet enrollment API keys - x-state: Generally available; added in 9.5.0 + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/enrollment_api_keys/{keyId}: - delete: + /api/fleet/epm/packages/_bulk_uninstall: + post: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/enrollment_api_keys/{keyId}
+
post /s/{space_id}/api/fleet/epm/packages/_bulk_uninstall
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Revoke or delete an enrollment API key by ID. Use `forceDelete=true` to remove the document.

[Required authorization] Route required privileges: fleet-agents-all. - operationId: delete-fleet-enrollment-api-keys-keyid + Uninstall multiple packages in a single operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk-uninstall parameters: - description: A required header to protect against CSRF attacks in: header @@ -42897,45 +37210,29 @@ paths: schema: example: 'true' type: string - - description: The ID of the enrollment API key - in: path - name: keyId - required: true - schema: - type: string - - description: When false (default), invalidate the API key and mark the token as inactive. When true, also delete the token document. - in: query - name: forceDelete - required: false - schema: - default: false - type: boolean - - description: When true, allow deletion of hidden enrollment tokens (managed/agentless policies). Defaults to false. - in: query - name: includeHidden - required: false - schema: - default: false - type: boolean + requestBody: + content: + application/json: + examples: + postBulkUninstallPackagesRequestExample: + description: Uninstall multiple packages + value: + packages: + - name: aws + - name: gcp + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_uninstall_packages_request' responses: '200': content: application/json: examples: - deleteEnrollmentApiKeyExample: - description: The enrollment API key was successfully revoked + postBulkUninstallPackagesExample: + description: Bulk uninstall task initiated value: - action: deleted + taskId: task-id-1 schema: - additionalProperties: false - type: object - properties: - action: - enum: - - deleted - type: string - required: - - action + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_upgrade_packages_response' description: Successful response '400': content: @@ -42966,37 +37263,27 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No enrollment API key was found with the given ID - value: - error: Not Found - message: EnrollmentAPIKey key-id-1 not found - statusCode: 404 - description: Not Found - summary: Revoke or delete an enrollment API key + summary: Bulk uninstall packages tags: - - Fleet enrollment API keys + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name + /api/fleet/epm/packages/_bulk_uninstall/{taskId}: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/enrollment_api_keys/{keyId}
+
get /s/{space_id}/api/fleet/epm/packages/_bulk_uninstall/{taskId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an enrollment API key by ID.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup. - operationId: get-fleet-enrollment-api-keys-keyid + Get the status and results of a bulk package uninstall operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: get-fleet-epm-packages-bulk-uninstall-taskid parameters: - - description: The ID of the enrollment API key + - description: Task ID of the bulk operation in: path - name: keyId + name: taskId required: true schema: type: string @@ -43005,54 +37292,17 @@ paths: content: application/json: examples: - getEnrollmentApiKeyExample: - description: An enrollment API key + getBulkOperationDetailsExample: + description: Details of the bulk operation task value: - item: - active: true - api_key: api-key-value-1 - api_key_id: api-key-id-1 - created_at: '2024-01-01T00:00:00.000Z' - id: key-id-1 - name: Default policy enrollment key - policy_id: policy-id-1 + packages: + - name: system + result: installed + - name: elastic_agent + result: installed + status: success schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - active: - description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: The enrollment API key (token) used for enrolling Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - hidden: - type: boolean - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: The ID of the agent policy the Elastic Agent will be enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - required: - - item + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_one_bulk_operation_packages_response' description: Successful response '400': content: @@ -43083,34 +37333,23 @@ paths: - message - attributes description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No enrollment API key was found with the given ID - value: - error: Not Found - message: EnrollmentAPIKey key-id-1 not found - statusCode: 404 - description: Not Found - summary: Get an enrollment API key + summary: Get Bulk uninstall packages details tags: - - Fleet enrollment API keys + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/bulk_assets: + /api/fleet/epm/packages/_bulk_upgrade: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/bulk_assets
+
post /s/{space_id}/api/fleet/epm/packages/_bulk_upgrade
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Retrieve multiple Kibana saved object assets by their IDs and types.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: post-fleet-epm-bulk-assets + Upgrade multiple packages to their latest versions.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-bulk-upgrade parameters: - description: A required header to protect against CSRF attacks in: header @@ -43123,83 +37362,25 @@ paths: content: application/json: examples: - postBulkGetAssetsRequestExample: - description: Retrieve multiple assets by their IDs and types + postBulkUpgradePackagesRequestExample: + description: Upgrade multiple packages to their latest versions value: - assetIds: - - id: dashboard-id-1 - type: dashboard - - id: index-pattern-id-1 - type: index_pattern + packages: + - name: system + - name: elastic_agent schema: - additionalProperties: false - type: object - properties: - assetIds: - items: - additionalProperties: false - type: object - properties: - id: - type: string - type: - type: string - required: - - id - - type - maxItems: 10000 - type: array - required: - - assetIds + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_upgrade_packages_request' responses: '200': content: application/json: examples: - postBulkGetAssetsExample: - description: Requested assets + postBulkUpgradePackagesExample: + description: Bulk upgrade task initiated value: - items: - - appLink: /app/dashboards#/view/dashboard-id-1 - attributes: - title: My Dashboard - id: dashboard-id-1 - type: dashboard + taskId: task-id-1 schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - appLink: - type: string - attributes: - additionalProperties: false - type: object - properties: - description: - type: string - service: - type: string - title: - type: string - id: - type: string - type: - type: string - updatedAt: - type: string - required: - - id - - type - - attributes - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_upgrade_packages_response' description: Successful response '400': content: @@ -43230,78 +37411,46 @@ paths: - message - attributes description: Bad Request - summary: Bulk get assets + summary: Bulk upgrade packages tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/categories: + /api/fleet/epm/packages/_bulk_upgrade/{taskId}: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/categories
+
get /s/{space_id}/api/fleet/epm/packages/_bulk_upgrade/{taskId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of integration categories.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-categories + Get the status and results of a bulk package upgrade operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: get-fleet-epm-packages-bulk-upgrade-taskid parameters: - - description: When true, include prerelease packages in the results - in: query - name: prerelease - required: false - schema: - type: boolean - - description: When true, include categories that only contain policy templates - in: query - name: include_policy_templates - required: false + - description: Task ID of the bulk operation + in: path + name: taskId + required: true schema: - type: boolean + type: string responses: '200': content: application/json: examples: - getCategoriesExample: - description: List of integration categories + getBulkOperationDetailsExample: + description: Details of the bulk operation task value: - items: - - count: 42 - id: security - title: Security - - count: 38 - id: observability - title: Observability + packages: + - name: system + result: installed + - name: elastic_agent + result: installed + status: success schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - count: - type: number - id: - type: string - parent_id: - type: string - parent_title: - type: string - title: - type: string - required: - - id - - title - - count - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_one_bulk_operation_packages_response' description: Successful response '400': content: @@ -43332,23 +37481,23 @@ paths: - message - attributes description: Bad Request - summary: Get package categories + summary: Get Bulk upgrade packages details tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/custom_integrations: - post: + /api/fleet/epm/packages/{pkgName}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/custom_integrations
+
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create a new custom integration package with user-defined data streams.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-custom-integrations + Uninstall a package and remove all its assets.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: delete-fleet-epm-packages-pkgname parameters: - description: A required header to protect against CSRF attacks in: header @@ -43357,138 +37506,31 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - postCreateCustomIntegrationRequestExample: - description: Create a new custom integration - value: - datasets: - - name: my_custom_logs.access - type: logs - integrationName: my_custom_logs - schema: - additionalProperties: false - type: object - properties: - datasets: - items: - additionalProperties: false - type: object - properties: - name: - type: string - type: - enum: - - logs - - metrics - - traces - - synthetics - - profiling - type: string - required: - - name - - type - maxItems: 10 - type: array - force: - type: boolean - integrationName: - type: string - required: - - integrationName - - datasets + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: When true, delete the package even if it has active package policies + in: query + name: force + required: false + schema: + type: boolean responses: '200': content: application/json: examples: - postCreateCustomIntegrationExample: - description: Custom integration successfully created + deletePackageExample: + description: Package successfully deleted value: - _meta: - install_source: custom items: - - id: my_custom_logs-logs-my_custom_logs.access + - id: aws-logs-aws.cloudwatch_logs-default type: index_template schema: - additionalProperties: false - type: object - properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - name: - type: string - required: - - install_source - - name - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - required: - - items - - _meta + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_package_response' description: Successful response '400': content: @@ -43519,69 +37561,76 @@ paths: - message - attributes description: Bad Request - summary: Create a custom integration + summary: Delete a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/custom_integrations/{pkgName}: - put: + get: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/epm/custom_integrations/{pkgName}
+
get /s/{space_id}/api/fleet/epm/packages/{pkgName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update the datasets of an existing custom integration package.

[Required authorization] Route required privileges: fleet-settings-all AND integrations-all. - operationId: put-fleet-epm-custom-integrations-pkgname + Get information about a package by name, returning the latest installed or available version. + operationId: get-fleet-epm-packages-pkgname parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - description: Package name in: path name: pkgName required: true schema: type: string - requestBody: - content: - application/json: - examples: - putUpdateCustomIntegrationRequestExample: - description: Update a custom integration - value: - datasets: - - name: my_custom_logs.access - type: logs - integrationName: my_custom_logs - schema: - additionalProperties: false - type: object - properties: - categories: - items: - type: string - maxItems: 10 - type: array - readMeData: - type: string - required: - - readMeData + - description: When true, returns the package even if the signature cannot be verified + in: query + name: ignoreUnverified + required: false + schema: + type: boolean + - description: When true, include prerelease versions + in: query + name: prerelease + required: false + schema: + type: boolean + - description: When true, return the full package info including assets + in: query + name: full + required: false + schema: + type: boolean + - description: When true, include package metadata such as whether it has package policies + in: query + name: withMetadata + required: false + schema: + default: false + type: boolean responses: '200': content: application/json: examples: - putUpdateCustomIntegrationExample: - description: Custom integration successfully updated - value: {} + getPackageInfoExample: + description: Package details and installation status + value: + item: + assets: + kibana: + dashboard: [] + index_pattern: [] + categories: + - cloud + description: Collect logs and metrics from Amazon Web Services + name: aws + status: installed + title: AWS + version: 2.10.0 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_info_response' description: Successful response '400': content: @@ -43612,91 +37661,90 @@ paths: - message - attributes description: Bad Request - summary: Update a custom integration + summary: Get a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/data_streams: - get: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/data_streams
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of data streams created by installed integration packages.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-data-streams + Install the latest version of a package from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname parameters: - - description: Filter by data stream type - in: query - name: type - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: - enum: - - logs - - metrics - - traces - - synthetics - - profiling + example: 'true' type: string - - description: Filter data streams by dataset name + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: When true, allow installing prerelease versions in: query - name: datasetQuery + name: prerelease required: false schema: - type: string - - description: Sort order, ascending or descending + type: boolean + - description: When true, ignore mapping update errors during installation in: query - name: sortOrder + name: ignoreMappingUpdateErrors required: false schema: - default: asc - enum: - - asc - - desc - type: string - - description: When true, only return data streams that are not associated with a package + default: false + type: boolean + - description: When true, skip data stream rollover after installation in: query - name: uncategorisedOnly + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + - description: Skip dependency validation when installing a package with dependencies + in: query + name: skipDependencyCheck required: false schema: default: false type: boolean + requestBody: + content: + application/json: + examples: + postInstallPackageRequestExample: + description: Install a package, optionally ignoring constraints + value: + ignore_constraints: false + schema: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_from_registry_request' + nullable: true responses: '200': content: application/json: examples: - getDataStreamsExample: - description: List of data streams from installed packages + postInstallPackageExample: + description: Package successfully installed value: - data_streams: - - ilm_policy: logs-default - index_template: logs-system.syslog - name: logs-system.syslog-default - package: system - package_version: 1.55.0 - title: System syslog logs - schema: - additionalProperties: false - type: object - properties: - items: + _meta: + install_source: registry items: - additionalProperties: false - type: object - properties: - name: - type: string - required: - - name - maxItems: 10000 - type: array - required: - - items + - id: aws-logs-aws.cloudwatch_logs-default + type: index_template + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_response' description: Successful response '400': content: @@ -43727,543 +37775,66 @@ paths: - message - attributes description: Bad Request - summary: Get data streams + summary: Install a package from the registry tags: - - Data streams + - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages: - get: + put: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages
+
put /s/{space_id}/api/fleet/epm/packages/{pkgName}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of integration packages available in the registry.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages + Update settings for a package, such as whether policies are kept up to date automatically.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: put-fleet-epm-packages-pkgname parameters: - - description: Filter packages by category - in: query - name: category - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: + example: 'true' type: string - - description: When true, include prerelease packages in the results - in: query - name: prerelease - required: false - schema: - type: boolean - - description: When true, exclude the install status from the response - in: query - name: excludeInstallStatus - required: false - schema: - type: boolean - - description: When true, include the number of package policies per package - in: query - name: withPackagePoliciesCount - required: false + - description: Package name + in: path + name: pkgName + required: true schema: - type: boolean + type: string + requestBody: + content: + application/json: + examples: + putUpdatePackageNamespaceCustomizationExample: + description: Enable namespace-level customization for the `production` and `staging` namespaces + value: + namespace_customization_enabled_for: + - production + - staging + putUpdatePackageRequestExample: + description: Update keep_policies_up_to_date setting for a package + value: + keepPoliciesUpToDate: true + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_request' responses: '200': content: application/json: examples: - getPackagesExample: - description: List of available integration packages + putUpdatePackageExample: + description: Updated package settings value: - items: - - categories: - - cloud - description: Collect logs and metrics from Amazon Web Services - id: aws - name: aws - status: not_installed - title: AWS - version: 2.10.0 - searchExcluded: 0 - total: 1 + item: + keepPoliciesUpToDate: true + name: aws + version: 2.10.0 schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: true - type: object - properties: - categories: - items: - type: string - maxItems: 100 - type: array - conditions: - additionalProperties: true - type: object - properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - id: - type: string - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: - type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - maxItems: 10 - type: array - name: - type: string - namespaces: - items: - type: string - maxItems: 100 - type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - integration: - type: string - internal: - type: boolean - latestVersion: - type: string - name: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input - type: string - - enum: - - content - type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: - type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string - required: - - name - - version - - title - - id - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_response' description: Successful response '400': content: @@ -44294,22 +37865,23 @@ paths: - message - attributes description: Bad Request - summary: Get packages + summary: Update package settings tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - post: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages
+
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install a package by uploading a .zip or .tar.gz archive (max 100MB). Only available to superusers.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages + Uninstall a specific version of a package and remove all its assets.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: delete-fleet-epm-packages-pkgname-pkgversion parameters: - description: A required header to protect against CSRF attacks in: header @@ -44318,139 +37890,41 @@ paths: schema: example: 'true' type: string - - description: When true, ignore mapping update errors during installation - in: query - name: ignoreMappingUpdateErrors - required: false + - description: Package name + in: path + name: pkgName + required: true schema: - default: false - type: boolean - - description: When true, skip data stream rollover after installation + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: When true, delete the package even if it has active package policies in: query - name: skipDataStreamRollover + name: force required: false schema: - default: false type: boolean - requestBody: - content: - application/gzip: - examples: - postInstallByUploadRequestExample: - description: Upload a .zip or .tar.gz package archive (max 100MB) - value: - application/gzip; application/zip: - examples: - postInstallByUploadRequestExample: - description: Upload a .zip or .tar.gz package archive (max 100MB) - value: - schema: - format: binary - type: string responses: '200': content: - application/gzip; application/zip: - examples: - postInstallByUploadExample: - description: Package successfully installed from upload - value: - _meta: - install_source: upload - items: - - id: my-custom-package-logs-default - type: index_template - schema: - additionalProperties: false - type: object - properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - name: - type: string - required: - - install_source - - name - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - required: - - items - - _meta application/json: examples: - postInstallByUploadExample: - description: Package successfully installed from upload + deletePackageExample: + description: Package successfully deleted value: - _meta: - install_source: upload items: - - id: my-custom-package-logs-default + - id: aws-logs-aws.cloudwatch_logs-default type: index_template + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_package_response' description: Successful response '400': content: - application/gzip; application/zip: + application/json: examples: genericErrorResponseExample: description: Example of a generic error response @@ -44476,214 +37950,83 @@ paths: required: - message - attributes - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 description: Bad Request - summary: Install a package by upload + summary: Delete a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/_bulk: - post: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk
+
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install multiple packages from the Elastic Package Registry in a single request.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk + Get information about a specific version of a package. + operationId: get-fleet-epm-packages-pkgname-pkgversion parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf + - description: Package name + in: path + name: pkgName required: true schema: - example: 'true' type: string - - description: When true, allow installing prerelease versions + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: When true, returns the package even if the signature cannot be verified + in: query + name: ignoreUnverified + required: false + schema: + type: boolean + - description: When true, include prerelease versions in: query name: prerelease required: false schema: type: boolean - requestBody: - content: - application/json: - examples: - postBulkInstallPackagesRequestExample: - description: Install multiple packages from the registry - value: - packages: - - system - - aws - schema: - additionalProperties: false - type: object - properties: - force: - default: false - type: boolean - packages: - items: - anyOf: - - type: string - - additionalProperties: false - type: object - properties: - name: - type: string - prerelease: - type: boolean - version: - type: string - required: - - name - - version - maxItems: 1000 - minItems: 1 - type: array - required: - - packages + - description: When true, return the full package info including assets + in: query + name: full + required: false + schema: + type: boolean + - description: When true, include package metadata such as whether it has package policies + in: query + name: withMetadata + required: false + schema: + default: false + type: boolean responses: '200': content: application/json: examples: - postBulkInstallPackagesExample: - description: Bulk install results + getPackageInfoExample: + description: Package details and installation status value: - items: - - name: system - result: - assets: [] - status: installed - - name: aws - result: - assets: [] - status: installed + item: + assets: + kibana: + dashboard: [] + index_pattern: [] + categories: + - cloud + description: Collect logs and metrics from Amazon Web Services + name: aws + status: installed + title: AWS + version: 2.10.0 schema: - additionalProperties: false - type: object - properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - error: - nullable: true - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - nullable: true - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - maxItems: 10000 - type: array - required: - - items + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_info_response' description: Successful response '400': content: @@ -44714,23 +38057,22 @@ paths: - message - attributes description: Bad Request - summary: Bulk install packages + summary: Get a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/_bulk_namespace_customization: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk_namespace_customization
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Enable or disable namespace-level index template customization for a list of packages in one call. Use this for IaC-style declarative flows.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk-namespace-customization + Install a specific version of a package from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-pkgversion parameters: - description: A required header to protect against CSRF attacks in: header @@ -44739,98 +38081,82 @@ paths: schema: example: 'true' type: string + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: When true, allow installing prerelease versions + in: query + name: prerelease + required: false + schema: + type: boolean + - description: When true, ignore mapping update errors during installation + in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - description: When true, skip data stream rollover after installation + in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + - description: Skip dependency validation when installing a package with dependencies + in: query + name: skipDependencyCheck + required: false + schema: + default: false + type: boolean requestBody: content: application/json: examples: - bulkNamespaceCustomizationRequest: + postInstallPackageRequestExample: + description: Install a package, optionally ignoring constraints value: - disable: - - dev - enable: - - production - - staging - packages: - - system - - nginx + ignore_constraints: false schema: - additionalProperties: false - type: object - properties: - disable: - description: Namespaces to disable namespace-level customization for on each package. - items: - type: string - maxItems: 100 - type: array - enable: - description: Namespaces to enable namespace-level customization for on each package. - items: - type: string - maxItems: 100 - type: array - packages: - description: Package names to apply the customization changes to. - items: - type: string - maxItems: 1000 - minItems: 1 - type: array - required: - - packages + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_from_registry_request' + nullable: true responses: '200': content: application/json: examples: - successResponse: + postInstallPackageExample: + description: Package successfully installed value: + _meta: + install_source: registry items: - - name: system - namespace_customization_enabled_for: - - production - - staging - success: true - - error: Package nginx is not installed - name: nginx - success: false + - id: aws-logs-aws.cloudwatch_logs-default + type: index_template schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - error: - type: string - name: - type: string - namespace_customization_enabled_for: - description: 'The opt-in list on the package. Returned whenever the package is installed: the new list on success, or the unchanged list when the request is rejected (for example, because of a namespace-prefix restriction).' - items: - type: string - maxItems: 100 - type: array - success: - type: boolean - required: - - name - - success - maxItems: 1000 - type: array - required: - - items - description: 'OK: A successful request.' + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_package_response' + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: error: Bad Request - message: 'Namespaces must not appear in both enable and disable: production' + message: An error message describing what went wrong statusCode: 400 schema: additionalProperties: false @@ -44850,24 +38176,23 @@ paths: required: - message - attributes - description: A bad request. - summary: Bulk enable/disable namespace-level customization for packages + description: Bad Request + summary: Install a package from the registry tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/_bulk_rollback: - post: + put: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk_rollback
+
put /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Rollback multiple packages to their previous versions.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk-rollback + Update settings for a specific version of a package.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: put-fleet-epm-packages-pkgname-pkgversion parameters: - description: A required header to protect against CSRF attacks in: header @@ -44876,57 +38201,59 @@ paths: schema: example: 'true' type: string + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string requestBody: content: application/json: examples: - bulkRollbackRequest: + putUpdatePackageNamespaceCustomizationExample: + description: Enable namespace-level customization for the `production` and `staging` namespaces value: - packages: - - name: system + namespace_customization_enabled_for: + - production + - staging + putUpdatePackageRequestExample: + description: Update keep_policies_up_to_date setting for a package + value: + keepPoliciesUpToDate: true schema: - additionalProperties: false - type: object - properties: - packages: - items: - additionalProperties: false - type: object - properties: - name: - description: Package name to rollback - type: string - required: - - name - maxItems: 1000 - minItems: 1 - type: array - required: - - packages + $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_request' responses: '200': content: application/json: examples: - successResponse: + putUpdatePackageExample: + description: Updated package settings value: - taskId: taskId + item: + keepPoliciesUpToDate: true + name: aws + version: 2.10.0 schema: - additionalProperties: false - type: object - properties: - taskId: - type: string - required: - - taskId - description: 'OK: A successful request.' + $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_response' + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -44945,28 +38272,40 @@ paths: required: - message - attributes - description: A bad request. - summary: Bulk rollback packages + description: Bad Request + summary: Update package settings tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/_bulk_rollback/{taskId}: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/_bulk_rollback/{taskId}
+
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the status and results of a bulk package rollback operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: get-fleet-epm-packages-bulk-rollback-taskid + Get the contents of a specific file from a package.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-pkgname-pkgversion-filepath parameters: - - description: Task ID of the bulk operation + - description: Package name in: path - name: taskId + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: File path within the package + in: path + name: filePath required: true schema: type: string @@ -44975,62 +38314,28 @@ paths: content: application/json: examples: - successResponse: + getPackageFileExample: + description: The content of the requested package file + value: + schema: {} + description: Successful response — returns the file content + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response value: - status: success + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false + description: Generic Error type: object properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - results: - items: - additionalProperties: false - type: object - properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - name: - type: string - success: - type: boolean - required: - - name - - success - maxItems: 10000 - type: array - status: - type: string - required: - - status - description: 'OK: A successful request.' - '400': - content: - application/json: - examples: - badRequestResponse: - value: - message: Bad Request - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true + attributes: + nullable: true error: type: string errorType: @@ -45042,24 +38347,24 @@ paths: required: - message - attributes - description: A bad request. - summary: Get Bulk rollback packages details + description: Bad Request + summary: Get a package file tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/_bulk_uninstall: - post: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk_uninstall
+
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Uninstall multiple packages in a single operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk-uninstall + Delete datastream assets for a specific input package, by data stream name.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: delete-fleet-epm-packages-pkgname-pkgversion-datastream-assets parameters: - description: A required header to protect against CSRF attacks in: header @@ -45068,57 +38373,37 @@ paths: schema: example: 'true' type: string - requestBody: - content: - application/json: - examples: - postBulkUninstallPackagesRequestExample: - description: Uninstall multiple packages - value: - packages: - - name: aws - - name: gcp - schema: - additionalProperties: false - type: object - properties: - force: - default: false - type: boolean - packages: - items: - additionalProperties: false - type: object - properties: - name: - type: string - version: - type: string - required: - - name - - version - maxItems: 1000 - minItems: 1 - type: array - required: - - packages + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: The ID of the package policy + in: query + name: packagePolicyId + required: true + schema: + type: string responses: '200': content: application/json: examples: - postBulkUninstallPackagesExample: - description: Bulk uninstall task initiated + deletePackageDatastreamAssetsExample: + description: Package datastream assets successfully deleted value: - taskId: task-id-1 + items: + - id: logs-my_package.access-default + type: index_template schema: - additionalProperties: false - type: object - properties: - taskId: - type: string - required: - - taskId + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_package_datastream_assets_response' description: Successful response '400': content: @@ -45149,27 +38434,33 @@ paths: - message - attributes description: Bad Request - summary: Bulk uninstall packages + summary: Delete assets for an input package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/_bulk_uninstall/{taskId}: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/dependencies: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/_bulk_uninstall/{taskId}
+
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/dependencies
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the status and results of a bulk package uninstall operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: get-fleet-epm-packages-bulk-uninstall-taskid + Get the list of packages that a specific package depends on.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-pkgname-pkgversion-dependencies parameters: - - description: Task ID of the bulk operation + - description: Package name in: path - name: taskId + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion required: true schema: type: string @@ -45178,53 +38469,98 @@ paths: content: application/json: examples: - getBulkOperationDetailsExample: - description: Details of the bulk operation task + dependenciesResponse: value: - packages: + items: + - name: aws + title: AWS + version: ^2.0.0 - name: system - result: installed - - name: elastic_agent - result: installed - status: success + title: System + version: ^1.0.0 + noDependenciesResponse: + value: + items: [] + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_dependencies_response' + description: 'OK: A successful request.' + '400': + content: + application/json: + examples: + packageNotFoundResponse: + value: + message: '[my-package-1.0.0] package not found in registry' schema: additionalProperties: false + description: Generic Error type: object properties: + attributes: + nullable: true error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - results: - items: - additionalProperties: false - type: object - properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - name: - type: string - success: - type: boolean - required: - - name - - success - maxItems: 10000 - type: array - status: type: string + errorType: + type: string + message: + type: string + statusCode: + type: number required: - - status + - message + - attributes + description: A bad request. + summary: Get package dependencies + tags: + - Elastic Package Manager (EPM) + x-state: Generally available; added in 9.4.0 + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets: + delete: + description: |- + **Spaces method and path for this operation:** + +
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Delete Kibana assets (dashboards, visualizations, etc.) for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: delete-fleet-epm-packages-pkgname-pkgversion-kibana-assets + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + responses: + '200': + content: + application/json: + examples: + deleteKibanaAssetsExample: + description: Kibana assets successfully deleted + value: + items: + - id: dashboard-id-1 + type: dashboard + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_kibana_assets_response' description: Successful response '400': content: @@ -45255,23 +38591,22 @@ paths: - message - attributes description: Bad Request - summary: Get Bulk uninstall packages details + summary: Delete Kibana assets for a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/_bulk_upgrade: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/_bulk_upgrade
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Upgrade multiple packages to their latest versions.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-bulk-upgrade + Install Kibana assets (dashboards, visualizations, etc.) for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-pkgversion-kibana-assets parameters: - description: A required header to protect against CSRF attacks in: header @@ -45280,61 +38615,42 @@ paths: schema: example: 'true' type: string + - description: Package name + in: path + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string requestBody: content: application/json: examples: - postBulkUpgradePackagesRequestExample: - description: Upgrade multiple packages to their latest versions - value: - packages: - - name: system - - name: elastic_agent + postInstallKibanaAssetsRequestExample: + description: Install Kibana assets for a specific package version + value: {} schema: - additionalProperties: false - type: object - properties: - force: - default: false - type: boolean - packages: - items: - additionalProperties: false - type: object - properties: - name: - type: string - version: - type: string - required: - - name - maxItems: 1000 - minItems: 1 - type: array - prerelease: - type: boolean - upgrade_package_policies: - default: false - type: boolean - required: - - packages + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_install_kibana_assets_request' + nullable: true responses: '200': content: application/json: examples: - postBulkUpgradePackagesExample: - description: Bulk upgrade task initiated + postInstallKibanaAssetsExample: + description: Kibana assets successfully installed value: - taskId: task-id-1 + items: + - id: dashboard-id-1 + type: dashboard schema: - additionalProperties: false - type: object - properties: - taskId: - type: string - required: - - taskId + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_kibana_assets_response' description: Successful response '400': content: @@ -45365,82 +38681,67 @@ paths: - message - attributes description: Bad Request - summary: Bulk upgrade packages + summary: Install Kibana assets for a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/_bulk_upgrade/{taskId}: - get: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/rule_assets: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/_bulk_upgrade/{taskId}
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/rule_assets
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the status and results of a bulk package upgrade operation.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: get-fleet-epm-packages-bulk-upgrade-taskid + Install Kibana alert rule assets for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-pkgversion-rule-assets parameters: - - description: Task ID of the bulk operation + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: Package name in: path - name: taskId + name: pkgName + required: true + schema: + type: string + - description: Package version + in: path + name: pkgVersion required: true schema: type: string + requestBody: + content: + application/json: + examples: + postInstallRuleAssetsRequestExample: + description: Install alert rule assets for a specific package version + value: {} + schema: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_install_rule_assets_request' + nullable: true responses: '200': content: application/json: examples: - getBulkOperationDetailsExample: - description: Details of the bulk operation task + postInstallRuleAssetsExample: + description: Rule assets successfully installed value: - packages: - - name: system - result: installed - - name: elastic_agent - result: installed - status: success - schema: - additionalProperties: false - type: object - properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - results: items: - additionalProperties: false - type: object - properties: - error: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - name: - type: string - success: - type: boolean - required: - - name - - success - maxItems: 10000 - type: array - status: - type: string - required: - - status + - id: rule-asset-id-1 + type: security_rule + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_install_kibana_assets_response' description: Successful response '400': content: @@ -45471,23 +38772,23 @@ paths: - message - attributes description: Bad Request - summary: Get Bulk upgrade packages details + summary: Install Kibana alert rule for a package tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}: - delete: + /api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize: + post: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Uninstall a package and remove all its assets.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: delete-fleet-epm-packages-pkgname + Reauthorize Elasticsearch transforms installed by a package with secondary authorization headers. + operationId: post-fleet-epm-packages-pkgname-pkgversion-transforms-authorize parameters: - description: A required header to protect against CSRF attacks in: header @@ -45502,88 +38803,58 @@ paths: required: true schema: type: string - - description: When true, delete the package even if it has active package policies + - description: Package version + in: path + name: pkgVersion + required: true + schema: + type: string + - description: When true, allow prerelease versions in: query - name: force + name: prerelease required: false schema: type: boolean + requestBody: + content: + application/json: + examples: + postReauthorizeTransformsRequestExample: + description: Reauthorize transforms for a package + value: + transforms: + - destinations: + - index: logs-transform-dest + transformId: logs-transform-1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_reauthorize_transform_request' responses: '200': content: application/json: examples: - deletePackageExample: - description: Package successfully deleted + postReauthorizeTransformsExample: + description: Transforms successfully reauthorized value: - items: - - id: aws-logs-aws.cloudwatch_logs-default - type: index_template + - success: true + transformId: logs-transform-1 schema: - additionalProperties: false - type: object - properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - required: - - items + items: + additionalProperties: false + type: object + properties: + error: + nullable: true + success: + type: boolean + transformId: + type: string + required: + - transformId + - success + - error + maxItems: 10000 + type: array description: Successful response '400': content: @@ -45614,630 +38885,65 @@ paths: - message - attributes description: Bad Request - summary: Delete a package + summary: Authorize transforms tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - get: + /api/fleet/epm/packages/{pkgName}/review_upgrade: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/review_upgrade
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get information about a package by name, returning the latest installed or available version. - operationId: get-fleet-epm-packages-pkgname + Review and accept or reject a pending policy upgrade for a package that contains deprecations.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-review-upgrade parameters: - - description: Package name + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: Package name to review upgrade for in: path name: pkgName required: true schema: type: string - - description: When true, returns the package even if the signature cannot be verified - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - description: When true, include prerelease versions - in: query - name: prerelease - required: false - schema: - type: boolean - - description: When true, return the full package info including assets - in: query - name: full - required: false - schema: - type: boolean - - description: When true, include package metadata such as whether it has package policies - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean + requestBody: + content: + application/json: + examples: + acceptUpgrade: + value: + action: accept + target_version: 2.0.0 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_review_upgrade_request' responses: '200': content: application/json: examples: - getPackageInfoExample: - description: Package details and installation status + successResponse: value: - item: - assets: - kibana: - dashboard: [] - index_pattern: [] - categories: - - cloud - description: Collect logs and metrics from Amazon Web Services - name: aws - status: installed - title: AWS - version: 2.10.0 + success: true schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - maxItems: 1000 - type: array - asset_types: - items: - type: string - maxItems: 100 - type: array - text: - type: string - required: - - text - maxItems: 1000 - type: array - assets: - additionalProperties: - nullable: true - type: object - categories: - items: - type: string - maxItems: 100 - type: array - conditions: - additionalProperties: true - type: object - properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - elasticsearch: - additionalProperties: - nullable: true - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: - type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - maxItems: 10 - type: array - name: - type: string - namespaces: - items: - type: string - maxItems: 100 - type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input - type: string - - enum: - - content - type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: - type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string - required: - - name - - version - - title - - assets - metadata: - additionalProperties: false - type: object - properties: - has_policies: - type: boolean - required: - - has_policies - required: - - item - description: Successful response + $ref: '#/components/schemas/Kibana_HTTP_APIs_review_upgrade_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -46256,23 +38962,25 @@ paths: required: - message - attributes - description: Bad Request - summary: Get a package + description: A bad request. + summary: Review a pending policy upgrade for a package with deprecations tags: - Elastic Package Manager (EPM) + x-state: Generally available; added in 9.4.0 x-metaTags: - content: Kibana name: product_name + /api/fleet/epm/packages/{pkgName}/rollback: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}
+
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/rollback
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install the latest version of a package from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname + Rollback a package to its previously installed version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. + operationId: post-fleet-epm-packages-pkgname-rollback parameters: - description: A required header to protect against CSRF attacks in: header @@ -46281,159 +38989,31 @@ paths: schema: example: 'true' type: string - - description: Package name + - description: Package name to roll back in: path name: pkgName required: true schema: type: string - - description: When true, allow installing prerelease versions - in: query - name: prerelease - required: false - schema: - type: boolean - - description: When true, ignore mapping update errors during installation - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - description: When true, skip data stream rollover after installation - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - - description: Skip dependency validation when installing a package with dependencies - in: query - name: skipDependencyCheck - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/json: - examples: - postInstallPackageRequestExample: - description: Install a package, optionally ignoring constraints - value: - ignore_constraints: false - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - default: false - type: boolean - ignore_constraints: - default: false - type: boolean responses: '200': content: application/json: examples: - postInstallPackageExample: - description: Package successfully installed + successResponse: value: - _meta: - install_source: registry - items: - - id: aws-logs-aws.cloudwatch_logs-default - type: index_template + success: true + version: 1.0.0 schema: - additionalProperties: false - type: object - properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - name: - type: string - required: - - install_source - - name - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - required: - - items - - _meta - description: Successful response + $ref: '#/components/schemas/Kibana_HTTP_APIs_rollback_package_response' + description: 'OK: A successful request.' '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestResponse: value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 + message: Bad Request schema: additionalProperties: false description: Generic Error @@ -46452,612 +39032,44 @@ paths: required: - message - attributes - description: Bad Request - summary: Install a package from the registry + description: A bad request. + summary: Rollback a package to previous version tags: - Elastic Package Manager (EPM) + x-state: Experimental; added in 9.1.0 x-metaTags: - content: Kibana name: product_name - put: + /api/fleet/epm/packages/{pkgName}/stats: + get: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/epm/packages/{pkgName}
+
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/stats
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update settings for a package, such as whether policies are kept up to date automatically.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: put-fleet-epm-packages-pkgname + Get usage statistics for a specific package, such as the number of agent policies using it.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-pkgname-stats parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - description: Package name in: path name: pkgName required: true schema: type: string - requestBody: - content: - application/json: - examples: - putUpdatePackageNamespaceCustomizationExample: - description: Enable namespace-level customization for the `production` and `staging` namespaces - value: - namespace_customization_enabled_for: - - production - - staging - putUpdatePackageRequestExample: - description: Update keep_policies_up_to_date setting for a package - value: - keepPoliciesUpToDate: true - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - namespace_customization_enabled_for: - description: Namespaces for which namespace-level customization is enabled on this package. - items: - type: string - maxItems: 100 - type: array responses: '200': content: application/json: examples: - putUpdatePackageExample: - description: Updated package settings + getPackageStatsExample: + description: Usage stats for a specific package value: - item: - keepPoliciesUpToDate: true - name: aws - version: 2.10.0 + response: + agent_policy_count: 3 schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - maxItems: 1000 - type: array - asset_types: - items: - type: string - maxItems: 100 - type: array - text: - type: string - required: - - text - maxItems: 1000 - type: array - assets: - additionalProperties: - nullable: true - type: object - categories: - items: - type: string - maxItems: 100 - type: array - conditions: - additionalProperties: true - type: object - properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - elasticsearch: - additionalProperties: - nullable: true - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: - type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - maxItems: 10 - type: array - name: - type: string - namespaces: - items: - type: string - maxItems: 100 - type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input - type: string - - enum: - - content - type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: - type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string - required: - - name - - version - - title - - assets - required: - - item + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_stats_response' description: Successful response '400': content: @@ -47088,125 +39100,158 @@ paths: - message - attributes description: Bad Request - summary: Update package settings + summary: Get package stats tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}: - delete: + /api/fleet/epm/packages/installed: + get: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
+
get /s/{space_id}/api/fleet/epm/packages/installed
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Uninstall a specific version of a package and remove all its assets.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: delete-fleet-epm-packages-pkgname-pkgversion + Get a list of all currently installed integration packages.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-installed parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true - schema: - type: string - - description: When true, delete the package even if it has active package policies + - description: Filter by data stream type in: query - name: force + name: dataStreamType required: false schema: - type: boolean - responses: - '200': - content: + enum: + - logs + - metrics + - traces + - synthetics + - profiling + type: string + - description: When true, only return packages with active data streams + in: query + name: showOnlyActiveDataStreams + required: false + schema: + type: boolean + - description: Filter packages by name + in: query + name: nameQuery + required: false + schema: + type: string + - description: Sort values from the previous page for `search_after` pagination + in: query + name: searchAfter + required: false + schema: + items: + anyOf: + - type: string + - type: number + maxItems: 10 + type: array + - description: Number of results per page + in: query + name: perPage + required: false + schema: + default: 15 + type: number + - description: Sort order, ascending or descending + in: query + name: sortOrder + required: false + schema: + default: asc + enum: + - asc + - desc + type: string + responses: + '200': + content: application/json: examples: - deletePackageExample: - description: Package successfully deleted + getInstalledPackagesExample: + description: List of installed integration packages value: items: - - id: aws-logs-aws.cloudwatch_logs-default - type: index_template + - name: system + status: installed + title: System + version: 1.55.0 + - name: elastic_agent + status: installed + title: Elastic Agent + version: 1.15.0 + searchExcluded: 0 + total: 2 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_installed_packages_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false + description: Generic Error type: object properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number required: - - items + - message + - attributes + description: Bad Request + summary: Get installed packages + tags: + - Elastic Package Manager (EPM) + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/epm/packages/limited: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/epm/packages/limited
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get the list of packages that cannot be uninstalled (e.g. elastic_agent, fleet_server).

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-packages-limited + parameters: [] + responses: + '200': + content: + application/json: + examples: + getLimitedPackagesExample: + description: List of packages that cannot be uninstalled + value: + items: + - elastic_agent + - fleet_server + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_limited_packages_response' description: Successful response '400': content: @@ -47237,22 +39282,23 @@ paths: - message - attributes description: Bad Request - summary: Delete a package + summary: Get a limited package list tags: - Elastic Package Manager (EPM) x-metaTags: - content: Kibana name: product_name + /api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
+
get /s/{space_id}/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get information about a specific version of a package. - operationId: get-fleet-epm-packages-pkgname-pkgversion + Get an inputs template for a package, used to pre-populate package policy forms.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-templates-pkgname-pkgversion-inputs parameters: - description: Package name in: path @@ -47266,596 +39312,298 @@ paths: required: true schema: type: string - - description: When true, returns the package even if the signature cannot be verified + - description: 'Output format for the inputs template: json, yml, or yaml' in: query - name: ignoreUnverified + name: format required: false schema: - type: boolean - - description: When true, include prerelease versions + default: json + enum: + - json + - yml + - yaml + type: string + - description: When true, allow prerelease versions in: query name: prerelease required: false schema: type: boolean - - description: When true, return the full package info including assets - in: query - name: full - required: false - schema: - type: boolean - - description: When true, include package metadata such as whether it has package policies + - description: When true, return inputs even if the package signature cannot be verified in: query - name: withMetadata + name: ignoreUnverified required: false schema: - default: false type: boolean responses: '200': content: application/json: examples: - getPackageInfoExample: - description: Package details and installation status + getInputsTemplateExample: + description: Inputs template for a package value: - item: - assets: - kibana: - dashboard: [] - index_pattern: [] - categories: - - cloud - description: Collect logs and metrics from Amazon Web Services - name: aws - status: installed - title: AWS - version: 2.10.0 + inputs: + - description: Collect logs from log files + title: Collect logs from files + type: logfile + vars: + - name: paths + required: true + title: Paths + type: text + schema: + anyOf: + - type: string + - $ref: '#/components/schemas/Kibana_HTTP_APIs_get_inputs_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false + description: Generic Error type: object properties: - item: - additionalProperties: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Get an inputs template + tags: + - Elastic Package Manager (EPM) + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/epm/verification_key_id: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/epm/verification_key_id
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get the GPG key ID used to verify the signatures of packages from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. + operationId: get-fleet-epm-verification-key-id + parameters: [] + responses: + '200': + content: + application/json: + examples: + getVerificationKeyIdExample: + description: The GPG key ID used to verify package signatures + value: + id: D27D666CD88E42B4 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_verification_key_id_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Get a package signature verification key ID + tags: + - Elastic Package Manager (EPM) + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/fleet_server_hosts: + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/fleet_server_hosts
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + List all Fleet Server hosts.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-settings-read. + operationId: get-fleet-fleet-server-hosts + parameters: [] + responses: + '200': + content: + application/json: + examples: + getFleetServerHostsExample: + description: List of Fleet Server hosts + value: + items: + - host_urls: + - https://fleet-server.example.com:8220 + id: fleet-server-host-id-1 + is_default: true + is_preconfigured: false + name: Default Fleet Server + page: 1 + perPage: 20 + total: 1 + schema: + additionalProperties: false + type: object + properties: + items: + items: + additionalProperties: false + type: object + properties: + host_urls: + items: + type: string + maxItems: 10 + minItems: 1 + type: array + id: + type: string + is_default: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + default: false + type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false + type: object + properties: + ssl: + additionalProperties: false + type: object + properties: + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: additionalProperties: false + nullable: true type: object properties: - asset_ids: + agent_certificate: + type: string + agent_certificate_authorities: items: type: string - maxItems: 1000 + maxItems: 10 type: array - asset_types: + agent_key: + type: string + certificate: + type: string + certificate_authorities: items: type: string - maxItems: 100 + maxItems: 10 type: array - text: + client_auth: + enum: + - optional + - required + - none type: string - required: - - text - maxItems: 1000 - type: array - assets: - additionalProperties: - nullable: true - type: object - categories: - items: - type: string - maxItems: 100 - type: array - conditions: - additionalProperties: true - type: object - properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: + es_certificate: + type: string + es_certificate_authorities: + items: type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: + maxItems: 10 + type: array + es_key: type: string - type: object - since: - type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - elasticsearch: - additionalProperties: - nullable: true - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: - type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - maxItems: 10 - type: array - name: - type: string - namespaces: - items: - type: string - maxItems: 100 - type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input - type: string - - enum: - - content - type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: + key: type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string - required: - - name - - version - - title - - assets - metadata: - additionalProperties: false - type: object - properties: - has_policies: - type: boolean - required: - - has_policies + required: + - name + - host_urls + - id + maxItems: 10000 + type: array + page: + type: number + perPage: + type: number + total: + type: number required: - - item + - items + - total + - page + - perPage description: Successful response '400': content: @@ -47886,9 +39634,9 @@ paths: - message - attributes description: Bad Request - summary: Get a package + summary: Get Fleet Server hosts tags: - - Elastic Package Manager (EPM) + - Fleet Server hosts x-metaTags: - content: Kibana name: product_name @@ -47896,12 +39644,12 @@ paths: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
+
post /s/{space_id}/api/fleet/fleet_server_hosts
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install a specific version of a package from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-pkgversion + Create a new Fleet Server host.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: post-fleet-fleet-server-hosts parameters: - description: A required header to protect against CSRF attacks in: header @@ -47910,154 +39658,247 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true - schema: - type: string - - description: When true, allow installing prerelease versions - in: query - name: prerelease - required: false - schema: - type: boolean - - description: When true, ignore mapping update errors during installation - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - description: When true, skip data stream rollover after installation - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - - description: Skip dependency validation when installing a package with dependencies - in: query - name: skipDependencyCheck - required: false - schema: - default: false - type: boolean requestBody: content: application/json: examples: - postInstallPackageRequestExample: - description: Install a package, optionally ignoring constraints + postFleetServerHostRequestExample: + description: Create a new Fleet Server host value: - ignore_constraints: false + host_urls: + - https://fleet-server.example.com:8220 + is_default: false + name: My Fleet Server schema: additionalProperties: false - nullable: true type: object properties: - force: + host_urls: + items: + type: string + maxItems: 10 + minItems: 1 + type: array + id: + type: string + is_default: default: false type: boolean - ignore_constraints: + is_internal: + type: boolean + is_preconfigured: default: false type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false + type: object + properties: + ssl: + additionalProperties: false + type: object + properties: + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true + type: object + properties: + agent_certificate: + type: string + agent_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + agent_key: + type: string + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + client_auth: + enum: + - optional + - required + - none + type: string + es_certificate: + type: string + es_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + es_key: + type: string + key: + type: string + required: + - name + - host_urls responses: '200': content: application/json: examples: - postInstallPackageExample: - description: Package successfully installed + postFleetServerHostExample: + description: The created Fleet Server host value: - _meta: - install_source: registry - items: - - id: aws-logs-aws.cloudwatch_logs-default - type: index_template + item: + host_urls: + - https://fleet-server.example.com:8220 + id: fleet-server-host-id-2 + is_default: false + is_preconfigured: false + name: My Fleet Server schema: additionalProperties: false type: object properties: - _meta: + item: additionalProperties: false type: object properties: - install_source: + host_urls: + items: + type: string + maxItems: 10 + minItems: 1 + type: array + id: type: string + is_default: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + default: false + type: boolean name: type: string - required: - - install_source - - name - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - required: - - items - - _meta + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false + type: object + properties: + ssl: + additionalProperties: false + type: object + properties: + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true + type: object + properties: + agent_certificate: + type: string + agent_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + agent_key: + type: string + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + client_auth: + enum: + - optional + - required + - none + type: string + es_certificate: + type: string + es_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + es_key: + type: string + key: + type: string + required: + - name + - host_urls + - id + required: + - item description: Successful response '400': content: @@ -48088,22 +39929,23 @@ paths: - message - attributes description: Bad Request - summary: Install a package from the registry + summary: Create a Fleet Server host tags: - - Elastic Package Manager (EPM) + - Fleet Server hosts x-metaTags: - content: Kibana name: product_name - put: + /api/fleet/fleet_server_hosts/{itemId}: + delete: description: |- **Spaces method and path for this operation:** -
put /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}
+
delete /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Update settings for a specific version of a package.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: put-fleet-epm-packages-pkgname-pkgversion + Delete a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: delete-fleet-fleet-server-hosts-itemid parameters: - description: A required header to protect against CSRF attacks in: header @@ -48112,591 +39954,217 @@ paths: schema: example: 'true' type: string - - description: Package name + - description: The ID of the Fleet Server host in: path - name: pkgName + name: itemId required: true schema: type: string - - description: Package version + responses: + '200': + content: + application/json: + examples: + deleteFleetServerHostExample: + description: The Fleet Server host was successfully deleted + value: + id: fleet-server-host-id-1 + schema: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No Fleet Server host was found with the given ID + value: + error: Not Found + message: Fleet server fleet-server-host-id-1 not found + statusCode: 404 + description: Not Found + summary: Delete a Fleet Server host + tags: + - Fleet Server hosts + x-metaTags: + - content: Kibana + name: product_name + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-read. + operationId: get-fleet-fleet-server-hosts-itemid + parameters: + - description: The ID of the Fleet Server host in: path - name: pkgVersion + name: itemId required: true schema: type: string - requestBody: - content: - application/json: - examples: - putUpdatePackageNamespaceCustomizationExample: - description: Enable namespace-level customization for the `production` and `staging` namespaces - value: - namespace_customization_enabled_for: - - production - - staging - putUpdatePackageRequestExample: - description: Update keep_policies_up_to_date setting for a package - value: - keepPoliciesUpToDate: true - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - namespace_customization_enabled_for: - description: Namespaces for which namespace-level customization is enabled on this package. - items: - type: string - maxItems: 100 - type: array responses: '200': content: application/json: examples: - putUpdatePackageExample: - description: Updated package settings + getFleetServerHostExample: + description: A Fleet Server host value: item: - keepPoliciesUpToDate: true - name: aws - version: 2.10.0 + host_urls: + - https://fleet-server.example.com:8220 + id: fleet-server-host-id-1 + is_default: true + is_preconfigured: false + name: Default Fleet Server schema: additionalProperties: false type: object properties: item: - additionalProperties: true + additionalProperties: false type: object properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - maxItems: 1000 - type: array - asset_types: - items: - type: string - maxItems: 100 - type: array - text: - type: string - required: - - text - maxItems: 1000 - type: array - assets: - additionalProperties: - nullable: true - type: object - categories: + host_urls: items: type: string - maxItems: 100 + maxItems: 10 + minItems: 1 type: array - conditions: - additionalProperties: true + id: + type: string + is_default: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + default: false + type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false type: object properties: - deprecated: - additionalProperties: true - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - maxItems: 10 - type: array - subscription: - type: string - kibana: - additionalProperties: true + ssl: + additionalProperties: false type: object properties: - version: - type: string - data_streams: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - deprecated: - additionalProperties: true + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true type: object properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: + agent_certificate: type: string - required: - - description - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - datasets: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - fields: + agent_certificate_authorities: items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - maxItems: 100 - type: array - download: - type: string - elasticsearch: - additionalProperties: - nullable: true - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 100 - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 + maxItems: 10 type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed + agent_key: type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - - knowledge_base - - esql_view - type: string - version: - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - originId: - type: string - type: - anyOf: - - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - - type: string - required: - - id - - type - maxItems: 10000 - type: array - installed_kibana_space_id: + certificate: type: string - is_rollback_ttl_expired: - type: boolean - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - latest_install_failed_attempts: + certificate_authorities: items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error + type: string maxItems: 10 type: array - name: + client_auth: + enum: + - optional + - required + - none type: string - namespaces: + es_certificate: + type: string + es_certificate_authorities: items: type: string - maxItems: 100 + maxItems: 10 type: array - previous_version: - nullable: true - type: string - rolled_back: - type: boolean - type: - type: string - updated_at: + es_key: type: string - verification_key_id: - nullable: true + key: type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - anyOf: - - enum: - - integration - type: string - - enum: - - input - type: string - - enum: - - content - type: string - - type: string - var_groups: - items: - additionalProperties: true - type: object - properties: - description: - type: string - name: - type: string - options: - items: - additionalProperties: true - type: object - properties: - description: - type: string - hide_in_deployment_modes: - items: - enum: - - default - - agentless - type: string - maxItems: 2 - type: array - name: - type: string - title: - type: string - vars: - items: - type: string - maxItems: 100 - type: array - required: - - name - - title - - vars - maxItems: 100 - type: array - selector_title: - type: string - title: - type: string - required: - - name - - title - - selector_title - - options - maxItems: 100 - type: array - vars: - items: - additionalProperties: - nullable: true - type: object - maxItems: 1000 - type: array - version: - type: string required: - name - - version - - title - - assets + - host_urls + - id required: - item description: Successful response @@ -48729,52 +40197,282 @@ paths: - message - attributes description: Bad Request - summary: Update package settings + '404': + content: + application/json: + examples: + notFoundExample: + description: No Fleet Server host was found with the given ID + value: + error: Not Found + message: Fleet server fleet-server-host-id-1 not found + statusCode: 404 + description: Not Found + summary: Get a Fleet Server host tags: - - Elastic Package Manager (EPM) + - Fleet Server hosts x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}: - get: + put: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}
+
put /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the contents of a specific file from a package.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-pkgname-pkgversion-filepath + Update a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: put-fleet-fleet-server-hosts-itemid parameters: - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf required: true schema: + example: 'true' type: string - - description: File path within the package + - description: The ID of the Fleet Server host in: path - name: filePath + name: itemId required: true schema: type: string + requestBody: + content: + application/json: + examples: + putFleetServerHostRequestExample: + description: Update a Fleet Server host + value: + host_urls: + - https://updated-fleet-server.example.com:8220 + is_default: false + name: Updated Fleet Server + schema: + additionalProperties: false + type: object + properties: + host_urls: + items: + type: string + maxItems: 10 + minItems: 1 + type: array + is_default: + type: boolean + is_internal: + type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false + type: object + properties: + ssl: + additionalProperties: false + type: object + properties: + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true + type: object + properties: + agent_certificate: + type: string + agent_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + agent_key: + type: string + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + client_auth: + enum: + - optional + - required + - none + type: string + es_certificate: + type: string + es_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + es_key: + type: string + key: + type: string + required: + - proxy_id responses: '200': content: application/json: examples: - getPackageFileExample: - description: The content of the requested package file - value: - schema: {} - description: Successful response — returns the file content + putFleetServerHostExample: + description: The updated Fleet Server host + value: + item: + host_urls: + - https://updated-fleet-server.example.com:8220 + id: fleet-server-host-id-1 + is_default: false + is_preconfigured: false + name: Updated Fleet Server + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: false + type: object + properties: + host_urls: + items: + type: string + maxItems: 10 + minItems: 1 + type: array + id: + type: string + is_default: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + default: false + type: boolean + name: + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: false + type: object + properties: + ssl: + additionalProperties: false + type: object + properties: + agent_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + es_key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + key: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: false + nullable: true + type: object + properties: + agent_certificate: + type: string + agent_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + agent_key: + type: string + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + client_auth: + enum: + - optional + - required + - none + type: string + es_certificate: + type: string + es_certificate_authorities: + items: + type: string + maxItems: 10 + type: array + es_key: + type: string + key: + type: string + required: + - name + - host_urls + - id + required: + - item + description: Successful response '400': content: application/json: @@ -48804,23 +40502,34 @@ paths: - message - attributes description: Bad Request - summary: Get a package file + '404': + content: + application/json: + examples: + notFoundExample: + description: No Fleet Server host was found with the given ID + value: + error: Not Found + message: Fleet server fleet-server-host-id-1 not found + statusCode: 404 + description: Not Found + summary: Update a Fleet Server host tags: - - Elastic Package Manager (EPM) + - Fleet Server hosts x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets: - delete: + /api/fleet/health_check: + post: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/datastream_assets
+
post /s/{space_id}/api/fleet/health_check
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete datastream assets for a specific input package, by data stream name.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: delete-fleet-epm-packages-pkgname-pkgversion-datastream-assets + Check the health status of a Fleet Server instance by its host ID. Returns the server status and name if available.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: post-fleet-health-check parameters: - description: A required header to protect against CSRF attacks in: header @@ -48829,53 +40538,59 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true - schema: - type: string - - description: The ID of the package policy - in: query - name: packagePolicyId - required: true - schema: - type: string + requestBody: + content: + application/json: + examples: + postHealthCheckRequestExample: + description: Check the health of a Fleet Server instance by its host ID + value: + id: fleet-server-host-id-1 + schema: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id responses: '200': content: application/json: examples: - deletePackageDatastreamAssetsExample: - description: Package datastream assets successfully deleted + postHealthCheckHealthyExample: + description: Fleet Server is online and healthy value: - items: - - id: logs-my_package.access-default - type: index_template + name: fleet-server-1 + status: ONLINE + postHealthCheckUnreachableExample: + description: Fleet Server host is not reachable (request timed out or aborted) + value: + host_id: fleet-server-host-id-1 + status: OFFLINE schema: additionalProperties: false type: object properties: - success: - type: boolean + host_id: + type: string + name: + type: string + status: + type: string required: - - success - description: Successful response + - status + description: Successful health check response '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + badRequestExample: + description: The host ID exists but has no associated host URLs configured value: error: Bad Request - message: An error message describing what went wrong + message: The requested host id fleet-server-host-id-1 does not have associated host urls. statusCode: 400 schema: additionalProperties: false @@ -48896,34 +40611,69 @@ paths: - message - attributes description: Bad Request - summary: Delete assets for an input package + '404': + content: + application/json: + examples: + notFoundExample: + description: No Fleet Server host was found with the given ID + value: + error: Not Found + message: The requested host id fleet-server-host-id-1 does not exist. + statusCode: 404 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Not Found + summary: Check Fleet Server health tags: - - Elastic Package Manager (EPM) + - Fleet internals x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/dependencies: + /api/fleet/kubernetes: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/dependencies
+
get /s/{space_id}/api/fleet/kubernetes
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the list of packages that a specific package depends on.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-pkgname-pkgversion-dependencies + Get the Kubernetes manifest for deploying Elastic Agent.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. + operationId: get-fleet-kubernetes parameters: - - description: Package name - in: path - name: pkgName - required: true + - description: If true, returns the manifest as a downloadable file + in: query + name: download + required: false + schema: + type: boolean + - description: Fleet Server host URL to include in the manifest + in: query + name: fleetServer + required: false schema: type: string - - description: Package version - in: path - name: pkgVersion - required: true + - description: Enrollment token to include in the manifest + in: query + name: enrolToken + required: false schema: type: string responses: @@ -48931,49 +40681,23 @@ paths: content: application/json: examples: - dependenciesResponse: - value: - items: - - name: aws - title: AWS - version: ^2.0.0 - - name: system - title: System - version: ^1.0.0 - noDependenciesResponse: + getK8sManifestExample: + description: The Kubernetes manifest for deploying Elastic Agent value: - items: [] + item: 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: agent-node-datastreams\n namespace: kube-system\n' schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - version: - type: string - required: - - name - - version - - title - maxItems: 1000 - type: array - required: - - items - description: 'OK: A successful request.' + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_k8s_manifest_response' + description: Successful response '400': content: application/json: examples: - packageNotFoundResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: '[my-package-1.0.0] package not found in registry' + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -48992,43 +40716,41 @@ paths: required: - message - attributes - description: A bad request. - summary: Get package dependencies + description: Bad Request + summary: Get a full K8s agent manifest tags: - - Elastic Package Manager (EPM) - x-state: Generally available; added in 9.4.0 + - Elastic Agent policies x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets: - delete: + /api/fleet/kubernetes/download: + get: description: |- **Spaces method and path for this operation:** -
delete /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets
+
get /s/{space_id}/api/fleet/kubernetes/download
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Delete Kibana assets (dashboards, visualizations, etc.) for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: delete-fleet-epm-packages-pkgname-pkgversion-kibana-assets + Download the Kubernetes manifest for deploying Elastic Agent.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. + operationId: get-fleet-kubernetes-download parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true + - description: If true, returns the manifest as a downloadable file + in: query + name: download + required: false schema: - example: 'true' - type: string - - description: Package name - in: path - name: pkgName - required: true + type: boolean + - description: Fleet Server host URL to include in the manifest + in: query + name: fleetServer + required: false schema: type: string - - description: Package version - in: path - name: pkgVersion - required: true + - description: Enrollment token to include in the manifest + in: query + name: enrolToken + required: false schema: type: string responses: @@ -49036,21 +40758,12 @@ paths: content: application/json: examples: - deleteKibanaAssetsExample: - description: Kibana assets successfully deleted - value: - items: - - id: dashboard-id-1 - type: dashboard + getDownloadK8sManifestExample: + description: The Kubernetes manifest download + value: 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: agent-node-datastreams\n namespace: kube-system\n' schema: - additionalProperties: false - type: object - properties: - success: - type: boolean - required: - - success - description: Successful response + type: string + description: Successful response — returns the Kubernetes manifest as a YAML file download '400': content: application/json: @@ -49080,22 +40793,52 @@ paths: - message - attributes description: Bad Request - summary: Delete Kibana assets for a package + '404': + content: + application/json: + examples: + notFoundExample: + description: No manifest was found + value: + error: Not Found + message: Agent manifest not found + statusCode: 404 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Not Found + summary: Download an agent manifest tags: - - Elastic Package Manager (EPM) + - Elastic Agent policies x-metaTags: - content: Kibana name: product_name + /api/fleet/logstash_api_keys: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets
+
post /s/{space_id}/api/fleet/logstash_api_keys
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install Kibana assets (dashboards, visualizations, etc.) for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-pkgversion-kibana-assets + Generate an API key for Logstash to use with a Fleet output.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: post-fleet-logstash-api-keys parameters: - description: A required header to protect against CSRF attacks in: header @@ -49104,58 +40847,23 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true - schema: - type: string - requestBody: - content: - application/json: - examples: - postInstallKibanaAssetsRequestExample: - description: Install Kibana assets for a specific package version - value: {} - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - space_ids: - description: When provided install assets in the specified spaces instead of the current space. - items: - type: string - maxItems: 100 - minItems: 1 - type: array responses: '200': content: application/json: examples: - postInstallKibanaAssetsExample: - description: Kibana assets successfully installed + postLogstashApiKeyExample: + description: The generated Logstash API key value: - items: - - id: dashboard-id-1 - type: dashboard + api_key: TiNAGG4BaaMdaH1tRfuU:KnR6yE41RrSowb0kQ0HWoA schema: additionalProperties: false type: object properties: - success: - type: boolean + api_key: + type: string required: - - success + - api_key description: Successful response '400': content: @@ -49186,23 +40894,23 @@ paths: - message - attributes description: Bad Request - summary: Install Kibana assets for a package + summary: Generate a Logstash API key tags: - - Elastic Package Manager (EPM) + - Fleet outputs x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/rule_assets: + /api/fleet/message_signing_service/rotate_key_pair: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/rule_assets
+
post /s/{space_id}/api/fleet/message_signing_service/rotate_key_pair
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Install Kibana alert rule assets for a specific package version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-pkgversion-rule-assets + Rotate the key pair used by Fleet to sign messages sent to Elastic Agents. This operation is irreversible and requires all agents in the Fleet to be re-enrolled after rotation. You must explicitly acknowledge the risk by passing `acknowledge=true` as a query parameter.

[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all. + operationId: post-fleet-message-signing-service-rotate-key-pair parameters: - description: A required header to protect against CSRF attacks in: header @@ -49211,61 +40919,40 @@ paths: schema: example: 'true' type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true + - description: Set to true to confirm you understand the risks of rotating the key pair + in: query + name: acknowledge + required: false schema: - type: string - requestBody: - content: - application/json: - examples: - postInstallRuleAssetsRequestExample: - description: Install alert rule assets for a specific package version - value: {} - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean + default: false + type: boolean responses: '200': content: application/json: examples: - postInstallRuleAssetsExample: - description: Rule assets successfully installed + rotateKeyPairSuccessExample: + description: The key pair was rotated. All agents must be re-enrolled to receive the new signing key. value: - items: - - id: rule-asset-id-1 - type: security_rule + message: Key pair rotated successfully. schema: additionalProperties: false type: object properties: - success: - type: boolean + message: + type: string required: - - success - description: Successful response + - message + description: Key pair rotated successfully '400': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + acknowledgeRequiredExample: + description: Request was rejected because the acknowledge query parameter was not set to true value: error: Bad Request - message: An error message describing what went wrong + message: 'Warning: this API will cause a key pair to rotate and should not be necessary in normal operation. If you proceed, you may need to reinstall Agents in your network. You must acknowledge the risks of rotating the key pair with acknowledge=true in the request parameters. For more information, reach out to your administrator.' statusCode: 400 schema: additionalProperties: false @@ -49286,104 +40973,96 @@ paths: - message - attributes description: Bad Request - summary: Install Kibana alert rule for a package + '500': + content: + application/json: + examples: + serviceUnavailableExample: + description: The message signing service is not available + value: + error: Internal Server Error + message: Failed to rotate key pair. Message signing service is unavailable! + statusCode: 500 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Internal Server Error + summary: Rotate a Fleet message signing key pair tags: - - Elastic Package Manager (EPM) + - Message Signing Service x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize: - post: + /api/fleet/outputs: + get: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize
+
get /s/{space_id}/api/fleet/outputs
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Reauthorize Elasticsearch transforms installed by a package with secondary authorization headers. - operationId: post-fleet-epm-packages-pkgname-pkgversion-transforms-authorize - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: Package name - in: path - name: pkgName - required: true - schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true - schema: - type: string - - description: When true, allow prerelease versions - in: query - name: prerelease - required: false - schema: - type: boolean - requestBody: - content: - application/json: - examples: - postReauthorizeTransformsRequestExample: - description: Reauthorize transforms for a package - value: - transforms: - - destinations: - - index: logs-transform-dest - transformId: logs-transform-1 - schema: - additionalProperties: false - type: object - properties: - transforms: - items: - additionalProperties: false - type: object - properties: - transformId: - type: string - required: - - transformId - maxItems: 1000 - type: array - required: - - transforms + List all Fleet outputs.

[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read. + operationId: get-fleet-outputs + parameters: [] responses: '200': content: application/json: examples: - postReauthorizeTransformsExample: - description: Transforms successfully reauthorized + getOutputsExample: + description: List of Fleet outputs value: - - success: true - transformId: logs-transform-1 + items: + - hosts: + - https://elasticsearch.example.com:9200 + id: output-id-1 + is_default: true + is_default_monitoring: true + name: Default output + type: elasticsearch + page: 1 + perPage: 20 + total: 1 schema: - items: - additionalProperties: false - type: object - properties: - error: - nullable: true - success: - type: boolean - transformId: - type: string - required: - - transformId - - success - - error - maxItems: 10000 - type: array + additionalProperties: false + type: object + properties: + items: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' + maxItems: 10000 + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - total + - page + - perPage description: Successful response '400': content: @@ -49414,23 +41093,22 @@ paths: - message - attributes description: Bad Request - summary: Authorize transforms + summary: Get outputs tags: - - Elastic Package Manager (EPM) + - Fleet outputs x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/review_upgrade: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/review_upgrade
+
post /s/{space_id}/api/fleet/outputs
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Review and accept or reject a pending policy upgrade for a package that contains deprecations.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-review-upgrade + Create a new Fleet output.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: post-fleet-outputs parameters: - description: A required header to protect against CSRF attacks in: header @@ -49439,59 +41117,64 @@ paths: schema: example: 'true' type: string - - description: Package name to review upgrade for - in: path - name: pkgName - required: true - schema: - type: string requestBody: content: application/json: examples: - acceptUpgrade: + postOutputRequestExample: + description: Create a new Elasticsearch output value: - action: accept - target_version: 2.0.0 + hosts: + - https://elasticsearch.example.com:9200 + is_default: false + is_default_monitoring: false + name: My output + type: elasticsearch schema: - additionalProperties: false - type: object - properties: - action: - enum: - - accept - - decline - - pending - type: string - target_version: - type: string - required: - - action - - target_version + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_kafka' responses: '200': content: application/json: examples: - successResponse: + postOutputExample: + description: The created Fleet output value: - success: true + item: + hosts: + - https://elasticsearch.example.com:9200 + id: output-id-2 + is_default: false + is_default_monitoring: false + name: My output + type: elasticsearch schema: additionalProperties: false type: object properties: - success: - type: boolean + item: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' required: - - success - description: 'OK: A successful request.' + - item + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -49510,25 +41193,24 @@ paths: required: - message - attributes - description: A bad request. - summary: Review a pending policy upgrade for a package with deprecations + description: Bad Request + summary: Create output tags: - - Elastic Package Manager (EPM) - x-state: Generally available; added in 9.4.0 + - Fleet outputs x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/rollback: - post: + /api/fleet/outputs/{outputId}: + delete: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/epm/packages/{pkgName}/rollback
+
delete /s/{space_id}/api/fleet/outputs/{outputId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Rollback a package to its previously installed version.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all. - operationId: post-fleet-epm-packages-pkgname-rollback + Delete output by ID.

[Required authorization] Route required privileges: fleet-settings-all. + operationId: delete-fleet-outputs-outputid parameters: - description: A required header to protect against CSRF attacks in: header @@ -49537,9 +41219,9 @@ paths: schema: example: 'true' type: string - - description: Package name to roll back + - description: The ID of the output in: path - name: pkgName + name: outputId required: true schema: type: string @@ -49548,29 +41230,29 @@ paths: content: application/json: examples: - successResponse: + deleteOutputExample: + description: The output was successfully deleted value: - success: true - version: 1.0.0 + id: output-id-1 schema: additionalProperties: false type: object properties: - success: - type: boolean - version: + id: type: string required: - - version - - success - description: 'OK: A successful request.' + - id + description: Successful response '400': content: application/json: examples: - badRequestResponse: + genericErrorResponseExample: + description: Example of a generic error response value: - message: Bad Request + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false description: Generic Error @@ -49589,29 +41271,56 @@ paths: required: - message - attributes - description: A bad request. - summary: Rollback a package to previous version + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No output was found with the given ID + value: + error: Not Found + message: Output output-id-1 not found + statusCode: 404 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Not Found + summary: Delete output tags: - - Elastic Package Manager (EPM) - x-state: Experimental; added in 9.1.0 + - Fleet outputs x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/{pkgName}/stats: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/{pkgName}/stats
+
get /s/{space_id}/api/fleet/outputs/{outputId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get usage statistics for a specific package, such as the number of agent policies using it.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-pkgname-stats + Get output by ID.

[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read. + operationId: get-fleet-outputs-outputid parameters: - - description: Package name + - description: The ID of the output in: path - name: pkgName + name: outputId required: true schema: type: string @@ -49620,28 +41329,29 @@ paths: content: application/json: examples: - getPackageStatsExample: - description: Usage stats for a specific package + getOutputExample: + description: A Fleet output value: - response: - agent_policy_count: 3 + item: + hosts: + - https://elasticsearch.example.com:9200 + id: output-id-1 + is_default: true + is_default_monitoring: true + name: Default output + type: elasticsearch schema: additionalProperties: false type: object properties: - response: - additionalProperties: false - type: object - properties: - agent_policy_count: - type: number - package_policy_count: - type: number - required: - - agent_policy_count - - package_policy_count + item: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' required: - - response + - item description: Successful response '400': content: @@ -49672,171 +41382,91 @@ paths: - message - attributes description: Bad Request - summary: Get package stats + '404': + content: + application/json: + examples: + notFoundExample: + description: No output was found with the given ID + value: + error: Not Found + message: Output output-id-1 not found + statusCode: 404 + description: Not Found + summary: Get output tags: - - Elastic Package Manager (EPM) + - Fleet outputs x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/installed: - get: + put: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/installed
+
put /s/{space_id}/api/fleet/outputs/{outputId}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get a list of all currently installed integration packages.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-installed + Update output by ID.

[Required authorization] Route required privileges: fleet-settings-all OR fleet-agent-policies-all. + operationId: put-fleet-outputs-outputid parameters: - - description: Filter by data stream type - in: query - name: dataStreamType - required: false + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true schema: - enum: - - logs - - metrics - - traces - - synthetics - - profiling + example: 'true' type: string - - description: When true, only return packages with active data streams - in: query - name: showOnlyActiveDataStreams - required: false - schema: - type: boolean - - description: Filter packages by name - in: query - name: nameQuery - required: false + - description: The ID of the output + in: path + name: outputId + required: true schema: type: string - - description: Sort values from the previous page for `search_after` pagination - in: query - name: searchAfter - required: false - schema: - items: + requestBody: + content: + application/json: + examples: + putOutputRequestExample: + description: Update a Fleet output + value: + hosts: + - https://updated-elasticsearch.example.com:9200 + name: Updated output + schema: anyOf: - - type: string - - type: number - maxItems: 10 - type: array - - description: Number of results per page - in: query - name: perPage - required: false - schema: - default: 15 - type: number - - description: Sort order, ascending or descending - in: query - name: sortOrder - required: false - schema: - default: asc - enum: - - asc - - desc - type: string + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_kafka' responses: '200': content: application/json: examples: - getInstalledPackagesExample: - description: List of installed integration packages + putOutputExample: + description: The updated Fleet output value: - items: - - name: system - status: installed - title: System - version: 1.55.0 - - name: elastic_agent - status: installed - title: Elastic Agent - version: 1.15.0 - searchExcluded: 0 - total: 2 + item: + hosts: + - https://updated-elasticsearch.example.com:9200 + id: output-id-1 + is_default: true + is_default_monitoring: true + name: Updated output + type: elasticsearch schema: additionalProperties: false type: object properties: - items: - items: - additionalProperties: false - type: object - properties: - dataStreams: - items: - additionalProperties: false - type: object - properties: - name: - type: string - title: - type: string - required: - - name - - title - maxItems: 10000 - type: array - description: - type: string - icons: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - maxItems: 100 - type: array - name: - type: string - status: - type: string - title: - type: string - version: - type: string - required: - - name - - version - - status - - dataStreams - maxItems: 10000 - type: array - searchAfter: - items: - anyOf: - - type: string - - type: number - - type: boolean - - nullable: true - nullable: true - maxItems: 2 - type: array - total: - type: number + item: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' required: - - items - - total + - item description: Successful response '400': content: @@ -49867,46 +41497,69 @@ paths: - message - attributes description: Bad Request - summary: Get installed packages + '404': + content: + application/json: + examples: + notFoundExample: + description: No output was found with the given ID + value: + error: Not Found + message: Output output-id-1 not found + statusCode: 404 + description: Not Found + summary: Update output tags: - - Elastic Package Manager (EPM) + - Fleet outputs x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/packages/limited: + /api/fleet/outputs/{outputId}/health: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/packages/limited
+
get /s/{space_id}/api/fleet/outputs/{outputId}/health
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the list of packages that cannot be uninstalled (e.g. elastic_agent, fleet_server).

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-packages-limited - parameters: [] + Get the latest health status of an output by ID.

[Required authorization] Route required privileges: fleet-settings-read. + operationId: get-fleet-outputs-outputid-health + parameters: + - description: The ID of the output + in: path + name: outputId + required: true + schema: + type: string responses: '200': content: application/json: examples: - getLimitedPackagesExample: - description: List of packages that cannot be uninstalled + getOutputHealthExample: + description: The latest health status of a Fleet output value: - items: - - elastic_agent - - fleet_server + message: '' + state: HEALTHY + timestamp: '2024-01-15T10:00:00.000Z' schema: additionalProperties: false type: object properties: - items: - items: - type: string - maxItems: 10000 - type: array + message: + description: long message if unhealthy + type: string + state: + description: state of output, HEALTHY or DEGRADED + type: string + timestamp: + description: timestamp of reported state + type: string required: - - items + - state + - message + - timestamp description: Successful response '400': content: @@ -49937,56 +41590,75 @@ paths: - message - attributes description: Bad Request - summary: Get a limited package list + summary: Get the latest output health tags: - - Elastic Package Manager (EPM) + - Fleet outputs x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs: + /api/fleet/package_policies: get: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs
+
get /s/{space_id}/api/fleet/package_policies
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get an inputs template for a package, used to pre-populate package policy forms.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-templates-pkgname-pkgversion-inputs + List all package policies. + operationId: get-fleet-package-policies parameters: - - description: Package name - in: path - name: pkgName - required: true + - description: Page number + in: query + name: page + required: false schema: - type: string - - description: Package version - in: path - name: pkgVersion - required: true + type: number + - description: Number of results per page + in: query + name: perPage + required: false + schema: + type: number + - description: Field to sort results by + in: query + name: sortField + required: false schema: type: string - - description: 'Output format for the inputs template: json, yml, or yaml' + - description: Sort order, ascending or descending in: query - name: format + name: sortOrder required: false schema: - default: json enum: - - json - - yml - - yaml + - desc + - asc type: string - - description: When true, allow prerelease versions + - description: When true, only show policies with available upgrades in: query - name: prerelease + name: showUpgradeable required: false schema: type: boolean - - description: When true, return inputs even if the package signature cannot be verified + - description: A KQL query string to filter results in: query - name: ignoreUnverified + name: kuery + required: false + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + - description: When true, include the agent count per package policy + in: query + name: withAgentCount required: false schema: type: boolean @@ -49995,112 +41667,46 @@ paths: content: application/json: examples: - getInputsTemplateExample: - description: Inputs template for a package + getPackagePoliciesExample: + description: List of package policies value: - inputs: - - description: Collect logs from log files - title: Collect logs from files - type: logfile - vars: - - name: paths - required: true - title: Paths - type: text + items: + - created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-1 + inputs: [] + name: nginx-1 + namespace: default + package: + name: nginx + title: Nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + updated_at: '2024-01-15T10:00:00.000Z' + page: 1 + perPage: 20 + total: 1 schema: - anyOf: - - type: string - - additionalProperties: false - type: object - properties: - connectors: - additionalProperties: - nullable: true - type: object - exporters: - additionalProperties: - nullable: true - type: object - extensions: - additionalProperties: - nullable: true - type: object - inputs: - items: - additionalProperties: false - type: object - properties: - id: - type: string - streams: - items: - additionalProperties: true - type: object - properties: - data_stream: - additionalProperties: true - type: object - properties: - dataset: - type: string - type: - type: string - required: - - dataset - id: - type: string - required: - - id - - data_stream - maxItems: 10000 - type: array - type: - type: string - required: - - id - - type - maxItems: 10000 - type: array - processors: - additionalProperties: - nullable: true - type: object - receivers: - additionalProperties: - nullable: true - type: object - service: - additionalProperties: false - type: object - properties: - extensions: - items: - type: string - maxItems: 1000 - type: array - pipelines: - additionalProperties: - additionalProperties: false - type: object - properties: - exporters: - items: - type: string - maxItems: 1000 - type: array - processors: - items: - type: string - maxItems: 1000 - type: array - receivers: - items: - type: string - maxItems: 1000 - type: array - type: object - required: - - inputs + additionalProperties: false + type: object + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + maxItems: 10000 + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - total + - page + - perPage description: Successful response '400': content: @@ -50131,42 +41737,83 @@ paths: - message - attributes description: Bad Request - summary: Get an inputs template + summary: Get package policies tags: - - Elastic Package Manager (EPM) + - Fleet package policies x-metaTags: - content: Kibana name: product_name - /api/fleet/epm/verification_key_id: - get: + post: description: |- **Spaces method and path for this operation:** -
get /s/{space_id}/api/fleet/epm/verification_key_id
+
post /s/{space_id}/api/fleet/package_policies
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Get the GPG key ID used to verify the signatures of packages from the Elastic Package Registry.

[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all. - operationId: get-fleet-epm-verification-key-id - parameters: [] + Create a new package policy and assign it to an agent policy. + operationId: post-fleet-package-policies + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + requestBody: + content: + application/json: + examples: + postPackagePolicyRequestExample: + description: Create a new nginx package policy + value: + inputs: {} + name: nginx-1 + namespace: default + package: + name: nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + schema: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_create_package_policy_request' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_simplified_create_package_policy_request' + description: You should use inputs as an object and not use the deprecated inputs array. responses: '200': content: application/json: examples: - getVerificationKeyIdExample: - description: The GPG key ID used to verify package signatures + postPackagePolicyExample: + description: The created package policy value: - id: D27D666CD88E42B4 + item: + created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-2 + inputs: [] + name: nginx-1 + namespace: default + package: + name: nginx + title: Nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + updated_at: '2024-01-15T10:00:00.000Z' schema: - additionalProperties: false - type: object - properties: - id: - nullable: true - type: string - required: - - id + $ref: '#/components/schemas/Kibana_HTTP_APIs_create_package_policy_response' description: Successful response '400': content: @@ -50197,176 +41844,16 @@ paths: - message - attributes description: Bad Request - summary: Get a package signature verification key ID - tags: - - Elastic Package Manager (EPM) - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/fleet_server_hosts: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/fleet_server_hosts
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - List all Fleet Server hosts.

[Required authorization] Route required privileges: fleet-agents-all OR fleet-settings-read. - operationId: get-fleet-fleet-server-hosts - parameters: [] - responses: - '200': - content: - application/json: - examples: - getFleetServerHostsExample: - description: List of Fleet Server hosts - value: - items: - - host_urls: - - https://fleet-server.example.com:8220 - id: fleet-server-host-id-1 - is_default: true - is_preconfigured: false - name: Default Fleet Server - page: 1 - perPage: 20 - total: 1 - schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - name - - host_urls - - id - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage - description: Successful response - '400': + '409': content: application/json: examples: - genericErrorResponseExample: - description: Example of a generic error response + conflictExample: + description: A package policy with the same name already exists value: - error: Bad Request + error: Conflict message: An error message describing what went wrong - statusCode: 400 + statusCode: 409 schema: additionalProperties: false description: Generic Error @@ -50385,23 +41872,24 @@ paths: required: - message - attributes - description: Bad Request - summary: Get Fleet Server hosts + description: Conflict + summary: Create a package policy tags: - - Fleet Server hosts + - Fleet package policies x-metaTags: - content: Kibana name: product_name + /api/fleet/package_policies/_bulk_get: post: description: |- **Spaces method and path for this operation:** -
post /s/{space_id}/api/fleet/fleet_server_hosts
+
post /s/{space_id}/api/fleet/package_policies/_bulk_get
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - Create a new Fleet Server host.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: post-fleet-fleet-server-hosts + Get multiple package policies by ID. + operationId: post-fleet-package-policies-bulk-get parameters: - description: A required header to protect against CSRF attacks in: header @@ -50410,529 +41898,77 @@ paths: schema: example: 'true' type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string requestBody: content: application/json: examples: - postFleetServerHostRequestExample: - description: Create a new Fleet Server host + postBulkGetPackagePoliciesRequestExample: + description: Retrieve multiple package policies by ID value: - host_urls: - - https://fleet-server.example.com:8220 - is_default: false - name: My Fleet Server + ids: + - package-policy-id-1 + - package-policy-id-2 schema: additionalProperties: false type: object properties: - host_urls: + ids: + description: list of package policy ids items: type: string - maxItems: 10 - minItems: 1 + maxItems: 1000 type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false + ignoreMissing: type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string required: - - name - - host_urls + - ids responses: '200': content: application/json: examples: - postFleetServerHostExample: - description: The created Fleet Server host + postBulkGetPackagePoliciesExample: + description: The requested package policies value: - item: - host_urls: - - https://fleet-server.example.com:8220 - id: fleet-server-host-id-2 - is_default: false - is_preconfigured: false - name: My Fleet Server + items: + - created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-1 + inputs: [] + name: nginx-1 + namespace: default + package: + name: nginx + title: Nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + updated_at: '2024-01-15T10:00:00.000Z' + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_get_package_policies_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 schema: additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - name - - host_urls - - id - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Create a Fleet Server host - tags: - - Fleet Server hosts - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/fleet_server_hosts/{itemId}: - delete: - description: |- - **Spaces method and path for this operation:** - -
delete /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Delete a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: delete-fleet-fleet-server-hosts-itemid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the Fleet Server host - in: path - name: itemId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - deleteFleetServerHostExample: - description: The Fleet Server host was successfully deleted - value: - id: fleet-server-host-id-1 - schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No Fleet Server host was found with the given ID - value: - error: Not Found - message: Fleet server fleet-server-host-id-1 not found - statusCode: 404 - description: Not Found - summary: Delete a Fleet Server host - tags: - - Fleet Server hosts - x-metaTags: - - content: Kibana - name: product_name - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-read. - operationId: get-fleet-fleet-server-hosts-itemid - parameters: - - description: The ID of the Fleet Server host - in: path - name: itemId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getFleetServerHostExample: - description: A Fleet Server host - value: - item: - host_urls: - - https://fleet-server.example.com:8220 - id: fleet-server-host-id-1 - is_default: true - is_preconfigured: false - name: Default Fleet Server - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - name - - host_urls - - id - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error + description: Generic Error type: object properties: attributes: @@ -50943,5986 +41979,307 @@ paths: type: string message: type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No Fleet Server host was found with the given ID - value: - error: Not Found - message: Fleet server fleet-server-host-id-1 not found - statusCode: 404 - description: Not Found - summary: Get a Fleet Server host - tags: - - Fleet Server hosts - x-metaTags: - - content: Kibana - name: product_name - put: - description: |- - **Spaces method and path for this operation:** - -
put /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Update a Fleet Server host by ID.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: put-fleet-fleet-server-hosts-itemid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the Fleet Server host - in: path - name: itemId - required: true - schema: - type: string - requestBody: - content: - application/json: - examples: - putFleetServerHostRequestExample: - description: Update a Fleet Server host - value: - host_urls: - - https://updated-fleet-server.example.com:8220 - is_default: false - name: Updated Fleet Server - schema: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - is_default: - type: boolean - is_internal: - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - proxy_id - responses: - '200': - content: - application/json: - examples: - putFleetServerHostExample: - description: The updated Fleet Server host - value: - item: - host_urls: - - https://updated-fleet-server.example.com:8220 - id: fleet-server-host-id-1 - is_default: false - is_preconfigured: false - name: Updated Fleet Server - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - host_urls: - items: - type: string - maxItems: 10 - minItems: 1 - type: array - id: - type: string - is_default: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - default: false - type: boolean - name: - type: string - proxy_id: - nullable: true - type: string - secrets: - additionalProperties: false - type: object - properties: - ssl: - additionalProperties: false - type: object - properties: - agent_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - es_key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - key: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - - type: string - ssl: - additionalProperties: false - nullable: true - type: object - properties: - agent_certificate: - type: string - agent_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - agent_key: - type: string - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - client_auth: - enum: - - optional - - required - - none - type: string - es_certificate: - type: string - es_certificate_authorities: - items: - type: string - maxItems: 10 - type: array - es_key: - type: string - key: - type: string - required: - - name - - host_urls - - id - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No Fleet Server host was found with the given ID - value: - error: Not Found - message: Fleet server fleet-server-host-id-1 not found - statusCode: 404 - description: Not Found - summary: Update a Fleet Server host - tags: - - Fleet Server hosts - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/health_check: - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/health_check
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Check the health status of a Fleet Server instance by its host ID. Returns the server status and name if available.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: post-fleet-health-check - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - requestBody: - content: - application/json: - examples: - postHealthCheckRequestExample: - description: Check the health of a Fleet Server instance by its host ID - value: - id: fleet-server-host-id-1 - schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - responses: - '200': - content: - application/json: - examples: - postHealthCheckHealthyExample: - description: Fleet Server is online and healthy - value: - name: fleet-server-1 - status: ONLINE - postHealthCheckUnreachableExample: - description: Fleet Server host is not reachable (request timed out or aborted) - value: - host_id: fleet-server-host-id-1 - status: OFFLINE - schema: - additionalProperties: false - type: object - properties: - host_id: - type: string - name: - type: string - status: - type: string - required: - - status - description: Successful health check response - '400': - content: - application/json: - examples: - badRequestExample: - description: The host ID exists but has no associated host URLs configured - value: - error: Bad Request - message: The requested host id fleet-server-host-id-1 does not have associated host urls. - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No Fleet Server host was found with the given ID - value: - error: Not Found - message: The requested host id fleet-server-host-id-1 does not exist. - statusCode: 404 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Not Found - summary: Check Fleet Server health - tags: - - Fleet internals - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/kubernetes: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/kubernetes
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get the Kubernetes manifest for deploying Elastic Agent.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. - operationId: get-fleet-kubernetes - parameters: - - description: If true, returns the manifest as a downloadable file - in: query - name: download - required: false - schema: - type: boolean - - description: Fleet Server host URL to include in the manifest - in: query - name: fleetServer - required: false - schema: - type: string - - description: Enrollment token to include in the manifest - in: query - name: enrolToken - required: false - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getK8sManifestExample: - description: The Kubernetes manifest for deploying Elastic Agent - value: - item: 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: agent-node-datastreams\n namespace: kube-system\n' - schema: - additionalProperties: false - type: object - properties: - item: - type: string - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get a full K8s agent manifest - tags: - - Elastic Agent policies - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/kubernetes/download: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/kubernetes/download
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Download the Kubernetes manifest for deploying Elastic Agent.

[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-setup. - operationId: get-fleet-kubernetes-download - parameters: - - description: If true, returns the manifest as a downloadable file - in: query - name: download - required: false - schema: - type: boolean - - description: Fleet Server host URL to include in the manifest - in: query - name: fleetServer - required: false - schema: - type: string - - description: Enrollment token to include in the manifest - in: query - name: enrolToken - required: false - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getDownloadK8sManifestExample: - description: The Kubernetes manifest download - value: 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: agent-node-datastreams\n namespace: kube-system\n' - schema: - type: string - description: Successful response — returns the Kubernetes manifest as a YAML file download - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No manifest was found - value: - error: Not Found - message: Agent manifest not found - statusCode: 404 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Not Found - summary: Download an agent manifest - tags: - - Elastic Agent policies - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/logstash_api_keys: - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/logstash_api_keys
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Generate an API key for Logstash to use with a Fleet output.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: post-fleet-logstash-api-keys - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - responses: - '200': - content: - application/json: - examples: - postLogstashApiKeyExample: - description: The generated Logstash API key - value: - api_key: TiNAGG4BaaMdaH1tRfuU:KnR6yE41RrSowb0kQ0HWoA - schema: - additionalProperties: false - type: object - properties: - api_key: - type: string - required: - - api_key - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Generate a Logstash API key - tags: - - Fleet outputs - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/message_signing_service/rotate_key_pair: - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/message_signing_service/rotate_key_pair
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Rotate the key pair used by Fleet to sign messages sent to Elastic Agents. This operation is irreversible and requires all agents in the Fleet to be re-enrolled after rotation. You must explicitly acknowledge the risk by passing `acknowledge=true` as a query parameter.

[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all. - operationId: post-fleet-message-signing-service-rotate-key-pair - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: Set to true to confirm you understand the risks of rotating the key pair - in: query - name: acknowledge - required: false - schema: - default: false - type: boolean - responses: - '200': - content: - application/json: - examples: - rotateKeyPairSuccessExample: - description: The key pair was rotated. All agents must be re-enrolled to receive the new signing key. - value: - message: Key pair rotated successfully. - schema: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - description: Key pair rotated successfully - '400': - content: - application/json: - examples: - acknowledgeRequiredExample: - description: Request was rejected because the acknowledge query parameter was not set to true - value: - error: Bad Request - message: 'Warning: this API will cause a key pair to rotate and should not be necessary in normal operation. If you proceed, you may need to reinstall Agents in your network. You must acknowledge the risks of rotating the key pair with acknowledge=true in the request parameters. For more information, reach out to your administrator.' - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '500': - content: - application/json: - examples: - serviceUnavailableExample: - description: The message signing service is not available - value: - error: Internal Server Error - message: Failed to rotate key pair. Message signing service is unavailable! - statusCode: 500 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Internal Server Error - summary: Rotate a Fleet message signing key pair - tags: - - Message Signing Service - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/outputs: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/outputs
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - List all Fleet outputs.

[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read. - operationId: get-fleet-outputs - parameters: [] - responses: - '200': - content: - application/json: - examples: - getOutputsExample: - description: List of Fleet outputs - value: - items: - - hosts: - - https://elasticsearch.example.com:9200 - id: output-id-1 - is_default: true - is_default_monitoring: true - name: Default output - type: elasticsearch - page: 1 - perPage: 20 - total: 1 - schema: - additionalProperties: false - type: object - properties: - items: - items: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get outputs - tags: - - Fleet outputs - x-metaTags: - - content: Kibana - name: product_name - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/outputs
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Create a new Fleet output.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: post-fleet-outputs - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - requestBody: - content: - application/json: - examples: - postOutputRequestExample: - description: Create a new Elasticsearch output - value: - hosts: - - https://elasticsearch.example.com:9200 - is_default: false - is_default_monitoring: false - name: My output - type: elasticsearch - schema: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_output_kafka' - responses: - '200': - content: - application/json: - examples: - postOutputExample: - description: The created Fleet output - value: - item: - hosts: - - https://elasticsearch.example.com:9200 - id: output-id-2 - is_default: false - is_default_monitoring: false - name: My output - type: elasticsearch - schema: - additionalProperties: false - type: object - properties: - item: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Create output - tags: - - Fleet outputs - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/outputs/{outputId}: - delete: - description: |- - **Spaces method and path for this operation:** - -
delete /s/{space_id}/api/fleet/outputs/{outputId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Delete output by ID.

[Required authorization] Route required privileges: fleet-settings-all. - operationId: delete-fleet-outputs-outputid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the output - in: path - name: outputId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - deleteOutputExample: - description: The output was successfully deleted - value: - id: output-id-1 - schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No output was found with the given ID - value: - error: Not Found - message: Output output-id-1 not found - statusCode: 404 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Not Found - summary: Delete output - tags: - - Fleet outputs - x-metaTags: - - content: Kibana - name: product_name - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/outputs/{outputId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get output by ID.

[Required authorization] Route required privileges: fleet-settings-read OR fleet-agent-policies-read. - operationId: get-fleet-outputs-outputid - parameters: - - description: The ID of the output - in: path - name: outputId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getOutputExample: - description: A Fleet output - value: - item: - hosts: - - https://elasticsearch.example.com:9200 - id: output-id-1 - is_default: true - is_default_monitoring: true - name: Default output - type: elasticsearch - schema: - additionalProperties: false - type: object - properties: - item: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No output was found with the given ID - value: - error: Not Found - message: Output output-id-1 not found - statusCode: 404 - description: Not Found - summary: Get output - tags: - - Fleet outputs - x-metaTags: - - content: Kibana - name: product_name - put: - description: |- - **Spaces method and path for this operation:** - -
put /s/{space_id}/api/fleet/outputs/{outputId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Update output by ID.

[Required authorization] Route required privileges: fleet-settings-all OR fleet-agent-policies-all. - operationId: put-fleet-outputs-outputid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the output - in: path - name: outputId - required: true - schema: - type: string - requestBody: - content: - application/json: - examples: - putOutputRequestExample: - description: Update a Fleet output - value: - hosts: - - https://updated-elasticsearch.example.com:9200 - name: Updated output - schema: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_output_kafka' - responses: - '200': - content: - application/json: - examples: - putOutputExample: - description: The updated Fleet output - value: - item: - hosts: - - https://updated-elasticsearch.example.com:9200 - id: output-id-1 - is_default: true - is_default_monitoring: true - name: Updated output - type: elasticsearch - schema: - additionalProperties: false - type: object - properties: - item: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_remote_elasticsearch' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_logstash' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_kafka' - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No output was found with the given ID - value: - error: Not Found - message: Output output-id-1 not found - statusCode: 404 - description: Not Found - summary: Update output - tags: - - Fleet outputs - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/outputs/{outputId}/health: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/outputs/{outputId}/health
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get the latest health status of an output by ID.

[Required authorization] Route required privileges: fleet-settings-read. - operationId: get-fleet-outputs-outputid-health - parameters: - - description: The ID of the output - in: path - name: outputId - required: true - schema: - type: string - responses: - '200': - content: - application/json: - examples: - getOutputHealthExample: - description: The latest health status of a Fleet output - value: - message: '' - state: HEALTHY - timestamp: '2024-01-15T10:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - message: - description: long message if unhealthy - type: string - state: - description: state of output, HEALTHY or DEGRADED - type: string - timestamp: - description: timestamp of reported state - type: string - required: - - state - - message - - timestamp - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get the latest output health - tags: - - Fleet outputs - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/package_policies: - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/package_policies
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - List all package policies. - operationId: get-fleet-package-policies - parameters: - - description: Page number - in: query - name: page - required: false - schema: - type: number - - description: Number of results per page - in: query - name: perPage - required: false - schema: - type: number - - description: Field to sort results by - in: query - name: sortField - required: false - schema: - type: string - - description: Sort order, ascending or descending - in: query - name: sortOrder - required: false - schema: - enum: - - desc - - asc - type: string - - description: When true, only show policies with available upgrades - in: query - name: showUpgradeable - required: false - schema: - type: boolean - - description: A KQL query string to filter results - in: query - name: kuery - required: false - schema: - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - - description: When true, include the agent count per package policy - in: query - name: withAgentCount - required: false - schema: - type: boolean - responses: - '200': - content: - application/json: - examples: - getPackagePoliciesExample: - description: List of package policies - value: - items: - - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-1 - inputs: [] - name: nginx-1 - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T10:00:00.000Z' - page: 1 - perPage: 20 - total: 1 - schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - page: - type: number - perPage: - type: number - total: - type: number - required: - - items - - total - - page - - perPage - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Get package policies - tags: - - Fleet package policies - x-metaTags: - - content: Kibana - name: product_name - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/package_policies
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Create a new package policy and assign it to an agent policy. - operationId: post-fleet-package-policies - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - requestBody: - content: - application/json: - examples: - postPackagePolicyRequestExample: - description: Create a new nginx package policy - value: - inputs: {} - name: nginx-1 - namespace: default - package: - name: nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - schema: - anyOf: - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Package policy description - type: string - enabled: - type: boolean - force: - description: Force package policy creation even if the package is not verified, or if the agent policy is managed. - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier - type: string - inputs: - items: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - maxItems: 1000 - type: array - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - name - - inputs - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 100 - nullable: true - type: array - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Policy description. - type: string - force: - description: Force package policy creation even if the package is not verified, or if the agent policy is managed. - type: boolean - id: - description: Policy unique identifier. - type: string - inputs: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - name: - description: Unique name for the policy. - type: string - namespace: - description: Policy namespace. When not specified, it inherits the agent policy namespace. - type: string - output_id: - nullable: true - type: string - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - policy_id: - deprecated: true - description: Deprecated. Use policy_ids instead. - nullable: true - type: string - policy_ids: - description: IDs of the agent policies which that package policy will be added to. - items: - type: string - maxItems: 1000 - type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API. - nullable: true - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - required: - - name - - package - description: You should use inputs as an object and not use the deprecated inputs array. - responses: - '200': - content: - application/json: - examples: - postPackagePolicyExample: - description: The created package policy - value: - item: - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-2 - inputs: [] - name: nginx-1 - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T10:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '409': - content: - application/json: - examples: - conflictExample: - description: A package policy with the same name already exists - value: - error: Conflict - message: An error message describing what went wrong - statusCode: 409 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Conflict - summary: Create a package policy - tags: - - Fleet package policies - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/package_policies/_bulk_get: - post: - description: |- - **Spaces method and path for this operation:** - -
post /s/{space_id}/api/fleet/package_policies/_bulk_get
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get multiple package policies by ID. - operationId: post-fleet-package-policies-bulk-get - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - requestBody: - content: - application/json: - examples: - postBulkGetPackagePoliciesRequestExample: - description: Retrieve multiple package policies by ID - value: - ids: - - package-policy-id-1 - - package-policy-id-2 - schema: - additionalProperties: false - type: object - properties: - ids: - description: list of package policy ids - items: - type: string - maxItems: 1000 - type: array - ignoreMissing: - type: boolean - required: - - ids - responses: - '200': - content: - application/json: - examples: - postBulkGetPackagePoliciesExample: - description: The requested package policies - value: - items: - - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-1 - inputs: [] - name: nginx-1 - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T10:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - items: - items: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - maxItems: 10000 - type: array - required: - - items - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: One or more package policies were not found - value: - error: Not Found - message: Package policy package-policy-id-2 not found - statusCode: 404 - schema: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - description: Not Found - summary: Bulk get package policies - tags: - - Fleet package policies - x-metaTags: - - content: Kibana - name: product_name - /api/fleet/package_policies/{packagePolicyId}: - delete: - description: |- - **Spaces method and path for this operation:** - -
delete /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Delete a package policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all. - operationId: delete-fleet-package-policies-packagepolicyid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the package policy - in: path - name: packagePolicyId - required: true - schema: - type: string - - description: When true, delete the package policy even if it is managed - in: query - name: force - required: false - schema: - type: boolean - responses: - '200': - content: - application/json: - examples: - deletePackagePolicyExample: - description: The package policy was successfully deleted - value: - id: package-policy-id-1 - schema: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - summary: Delete a package policy - tags: - - Fleet package policies - x-metaTags: - - content: Kibana - name: product_name - get: - description: |- - **Spaces method and path for this operation:** - -
get /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Get a package policy by ID. - operationId: get-fleet-package-policies-packagepolicyid - parameters: - - description: The ID of the package policy - in: path - name: packagePolicyId - required: true - schema: - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - responses: - '200': - content: - application/json: - examples: - getPackagePolicyExample: - description: A package policy - value: - item: - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-1 - inputs: [] - name: nginx-1 - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T10:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by - required: - - item - description: Successful response - '400': - content: - application/json: - examples: - genericErrorResponseExample: - description: Example of a generic error response - value: - error: Bad Request - message: An error message describing what went wrong - statusCode: 400 - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - attributes: - nullable: true - error: - type: string - errorType: - type: string - message: - type: string - statusCode: - type: number - required: - - message - - attributes - description: Bad Request - '404': - content: - application/json: - examples: - notFoundExample: - description: No package policy was found with the given ID - value: - error: Not Found - message: Package policy package-policy-id-1 not found - statusCode: 404 - schema: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - description: Not Found - summary: Get a package policy - tags: - - Fleet package policies - x-metaTags: - - content: Kibana - name: product_name - put: - description: |- - **Spaces method and path for this operation:** - -
put /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
- - Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. - - Update a package policy by ID. - operationId: put-fleet-package-policies-packagepolicyid - parameters: - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - description: The ID of the package policy - in: path - name: packagePolicyId - required: true - schema: - type: string - - description: 'Format for the response: simplified or legacy' - in: query - name: format - required: false - schema: - enum: - - simplified - - legacy - type: string - requestBody: - content: - application/json: - examples: - putPackagePolicyRequestExample: - description: Update a package policy - value: - enabled: true - inputs: {} - name: nginx-1-updated - namespace: default - package: - name: nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - schema: - anyOf: - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Package policy description - type: string - enabled: - type: boolean - force: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - inputs: - items: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - maxItems: 1000 - type: array - is_managed: - type: boolean - name: - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - version: - type: string - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 100 - nullable: true - type: array - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - description: - description: Policy description. - type: string - force: - description: Force package policy creation even if the package is not verified, or if the agent policy is managed. - type: boolean - id: - description: Policy unique identifier. - type: string - inputs: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - name: - description: Unique name for the policy. - type: string - namespace: - description: Policy namespace. When not specified, it inherits the agent policy namespace. - type: string - output_id: - nullable: true - type: string - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - policy_id: - deprecated: true - description: Deprecated. Use policy_ids instead. - nullable: true - type: string - policy_ids: - description: IDs of the agent policies which that package policy will be added to. - items: - type: string - maxItems: 1000 - type: array - supports_agentless: - default: false - deprecated: true - description: Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API. - nullable: true - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - required: - - name - - package - responses: - '200': - content: - application/json: - examples: - putPackagePolicyExample: - description: The updated package policy - value: - item: - created_at: '2024-01-15T10:00:00.000Z' - enabled: true - id: package-policy-id-1 - inputs: [] - name: nginx-1-updated - namespace: default - package: - name: nginx - title: Nginx - version: 1.20.0 - policy_ids: - - agent-policy-id-1 - updated_at: '2024-01-15T11:00:00.000Z' - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - description: Package policy unique identifier. - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: One or more package policies were not found + value: + error: Not Found + message: Package policy package-policy-id-2 not found + statusCode: 404 + schema: + additionalProperties: false + type: object + properties: + message: + type: string + required: + - message + description: Not Found + summary: Bulk get package policies + tags: + - Fleet package policies + x-metaTags: + - content: Kibana + name: product_name + /api/fleet/package_policies/{packagePolicyId}: + delete: + description: |- + **Spaces method and path for this operation:** + +
delete /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Delete a package policy by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all. + operationId: delete-fleet-package-policies-packagepolicyid + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The ID of the package policy + in: path + name: packagePolicyId + required: true + schema: + type: string + - description: When true, delete the package policy even if it is managed + in: query + name: force + required: false + schema: + type: boolean + responses: + '200': + content: + application/json: + examples: + deletePackagePolicyExample: + description: The package policy was successfully deleted + value: + id: package-policy-id-1 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_one_package_policy_response' + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + summary: Delete a package policy + tags: + - Fleet package policies + x-metaTags: + - content: Kibana + name: product_name + get: + description: |- + **Spaces method and path for this operation:** + +
get /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Get a package policy by ID. + operationId: get-fleet-package-policies-packagepolicyid + parameters: + - description: The ID of the package policy + in: path + name: packagePolicyId + required: true + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + responses: + '200': + content: + application/json: + examples: + getPackagePolicyExample: + description: A package policy + value: + item: + created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-1 + inputs: [] + name: nginx-1 + namespace: default package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string + name: nginx + title: Nginx + version: 1.20.0 policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - id - - revision - - updated_at - - updated_by - - created_at - - created_by + - agent-policy-id-1 + updated_at: '2024-01-15T10:00:00.000Z' + schema: + additionalProperties: false + type: object + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + required: + - item + description: Successful response + '400': + content: + application/json: + examples: + genericErrorResponseExample: + description: Example of a generic error response + value: + error: Bad Request + message: An error message describing what went wrong + statusCode: 400 + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + attributes: + nullable: true + error: + type: string + errorType: + type: string + message: + type: string + statusCode: + type: number + required: + - message + - attributes + description: Bad Request + '404': + content: + application/json: + examples: + notFoundExample: + description: No package policy was found with the given ID + value: + error: Not Found + message: Package policy package-policy-id-1 not found + statusCode: 404 + schema: + additionalProperties: false + type: object + properties: + message: + type: string + required: + - message + description: Not Found + summary: Get a package policy + tags: + - Fleet package policies + x-metaTags: + - content: Kibana + name: product_name + put: + description: |- + **Spaces method and path for this operation:** + +
put /s/{space_id}/api/fleet/package_policies/{packagePolicyId}
+ + Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. + + Update a package policy by ID. + operationId: put-fleet-package-policies-packagepolicyid + parameters: + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: The ID of the package policy + in: path + name: packagePolicyId + required: true + schema: + type: string + - description: 'Format for the response: simplified or legacy' + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + requestBody: + content: + application/json: + examples: + putPackagePolicyRequestExample: + description: Update a package policy + value: + enabled: true + inputs: {} + name: nginx-1-updated + namespace: default + package: + name: nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + schema: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_update_package_policy_request' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_simplified_create_package_policy_request' + responses: + '200': + content: + application/json: + examples: + putPackagePolicyExample: + description: The updated package policy + value: + item: + created_at: '2024-01-15T10:00:00.000Z' + enabled: true + id: package-policy-id-1 + inputs: [] + name: nginx-1-updated + namespace: default + package: + name: nginx + title: Nginx + version: 1.20.0 + policy_ids: + - agent-policy-id-1 + updated_at: '2024-01-15T11:00:00.000Z' + schema: + additionalProperties: false + type: object + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' required: - item description: Successful response @@ -57018,114 +42375,24 @@ paths: value: packagePolicyIds: - package-policy-id-1 - - package-policy-id-2 - schema: - additionalProperties: false - type: object - properties: - force: - type: boolean - packagePolicyIds: - items: - type: string - maxItems: 1000 - type: array - required: - - packagePolicyIds - responses: - '200': - content: - application/json: - examples: - postDeletePackagePoliciesExample: - description: Results of the bulk delete operation - value: - - id: package-policy-id-1 - success: true - - id: package-policy-id-2 - success: true - schema: - items: - additionalProperties: false - type: object - properties: - body: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - id: - type: string - name: - type: string - output_id: - nullable: true - type: string - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - policy_id: - deprecated: true - description: Use `policy_ids` instead - nullable: true - type: string - policy_ids: - items: - type: string - maxItems: 10000 - type: array - statusCode: - type: number - success: - type: boolean - required: - - id - - success - - policy_ids - - package + - package-policy-id-2 + schema: + $ref: '#/components/schemas/Kibana_HTTP_APIs_delete_package_policies_request' + responses: + '200': + content: + application/json: + examples: + postDeletePackagePoliciesExample: + description: Results of the bulk delete operation + value: + - id: package-policy-id-1 + success: true + - id: package-policy-id-2 + success: true + schema: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_status_response' maxItems: 10000 type: array description: Successful response @@ -57193,16 +42460,7 @@ paths: packagePolicyIds: - package-policy-id-1 schema: - additionalProperties: false - type: object - properties: - packagePolicyIds: - items: - type: string - maxItems: 1000 - type: array - required: - - packagePolicyIds + $ref: '#/components/schemas/Kibana_HTTP_APIs_upgrade_package_policies_request' responses: '200': content: @@ -57216,28 +42474,7 @@ paths: success: true schema: items: - additionalProperties: false - type: object - properties: - body: - additionalProperties: false - type: object - properties: - message: - type: string - required: - - message - id: - type: string - name: - type: string - statusCode: - type: number - success: - type: boolean - required: - - id - - success + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_status_response' maxItems: 10000 type: array description: Successful response @@ -57305,18 +42542,7 @@ paths: packagePolicyIds: - package-policy-id-1 schema: - additionalProperties: false - type: object - properties: - packagePolicyIds: - items: - type: string - maxItems: 1000 - type: array - packageVersion: - type: string - required: - - packagePolicyIds + $ref: '#/components/schemas/Kibana_HTTP_APIs_dry_run_package_policies_request' responses: '200': content: @@ -57453,947 +42679,8 @@ paths: diff: items: anyOf: - - additionalProperties: false - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - agents: - type: number - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - type: string - inputs: - anyOf: - - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that input. Defaults to `true` (enabled). - type: boolean - streams: - additionalProperties: - additionalProperties: false - type: object - properties: - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - description: Enable or disable that stream. Defaults to `true` (enabled). - type: boolean - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Input streams. Refer to the integration documentation to know which streams are available. - type: object - vars: - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package policy inputs. Refer to the integration documentation to know which inputs are available. - type: object - description: Package policy inputs. - is_managed: - type: boolean - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - description: Package policy revision. - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - spaceIds: - items: - type: string - maxItems: 100 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - anyOf: - - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - - items: - type: string - maxItems: 100 - type: array - - items: - type: number - maxItems: 100 - type: array - - additionalProperties: false - type: object - properties: - id: - type: string - isSecretRef: - type: boolean - required: - - id - - isSecretRef - nullable: true - description: Input/stream level variable. Refer to the integration documentation for more information. - type: object - description: Package level variable. - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs - - revision - - updated_at - - updated_by - - created_at - - created_by - - additionalProperties: true - type: object - properties: - additional_datastreams_permissions: - description: Additional datastream permissions, that will be added to the agent policy. - items: - type: string - maxItems: 1000 - nullable: true - type: array - cloud_connector_id: - description: ID of the cloud connector associated with this package policy. - nullable: true - type: string - cloud_connector_name: - description: Transient field for cloud connector name during creation. - maxLength: 255 - minLength: 1 - nullable: true - type: string - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' - type: string - created_at: - type: string - created_by: - type: string - description: - description: Package policy description - type: string - elasticsearch: - additionalProperties: true - type: object - properties: - privileges: - additionalProperties: true - type: object - properties: - cluster: - items: - type: string - maxItems: 100 - type: array - enabled: - type: boolean - errors: - items: - additionalProperties: false - type: object - properties: - key: - type: string - message: - type: string - required: - - message - maxItems: 10 - type: array - force: - type: boolean - global_data_tags: - items: - additionalProperties: false - type: object - properties: - name: - description: The name of the custom field. Cannot contain spaces. - type: string - value: - anyOf: - - type: string - - type: number - description: The value of the custom field. - required: - - name - - value - maxItems: 100 - nullable: true - type: array - id: - type: string - inputs: - items: - additionalProperties: false - type: object - properties: - compiled_input: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - name: - type: string - policy_template: - type: string - streams: - items: - additionalProperties: false - type: object - properties: - compiled_stream: - nullable: true - condition: - description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' - type: string - config: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - data_stream: - additionalProperties: false - type: object - properties: - dataset: - type: string - elasticsearch: - additionalProperties: false - type: object - properties: - dynamic_dataset: - type: boolean - dynamic_namespace: - type: boolean - privileges: - additionalProperties: false - type: object - properties: - indices: - items: - type: string - maxItems: 100 - type: array - type: - type: string - required: - - dataset - deprecated: - additionalProperties: false - type: object - properties: - description: - type: string - replaced_by: - additionalProperties: - type: string - type: object - since: - type: string - required: - - description - enabled: - type: boolean - id: - type: string - keep_enabled: - type: boolean - migrate_from: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - enabled - - data_stream - - compiled_stream - maxItems: 1000 - type: array - type: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - required: - - type - - enabled - - streams - - compiled_input - maxItems: 100 - type: array - is_managed: - type: boolean - missingVars: - items: - type: string - maxItems: 100 - type: array - name: - description: Unique name for the package policy. - type: string - namespace: - description: The package policy namespace. Leave blank to inherit the agent policy's namespace. - type: string - output_id: - nullable: true - type: string - overrides: - additionalProperties: false - description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. - nullable: true - type: object - properties: - inputs: - additionalProperties: - nullable: true - type: object - package: - additionalProperties: false - type: object - properties: - experimental_data_stream_features: - items: - additionalProperties: false - type: object - properties: - data_stream: - type: string - features: - additionalProperties: false - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - maxItems: 100 - type: array - fips_compatible: - type: boolean - name: - description: Package name - type: string - requires_root: - type: boolean - title: - type: string - version: - description: Package version - type: string - required: - - name - - version - package_agent_version_condition: - type: string - policy_id: - deprecated: true - description: ID of the agent policy which the package policy will be added to. - nullable: true - type: string - policy_ids: - items: - description: IDs of the agent policies which that package policy will be added to. - type: string - maxItems: 1000 - type: array - revision: - type: number - secret_references: - items: - additionalProperties: false - type: object - properties: - id: - type: string - required: - - id - maxItems: 1000 - type: array - supports_agentless: - default: false - description: Indicates whether the package policy belongs to an agentless agent policy. - nullable: true - type: boolean - supports_cloud_connector: - default: false - description: Indicates whether the package policy supports cloud connectors. - nullable: true - type: boolean - updated_at: - type: string - updated_by: - type: string - var_group_selections: - additionalProperties: - type: string - description: Variable group selections. Maps var_group name to the selected option name within that group. - type: object - vars: - additionalProperties: - additionalProperties: false - type: object - properties: - frozen: - type: boolean - type: - type: string - value: - nullable: true - required: - - value - description: Package variable (see integration documentation for more information) - type: object - version: - description: Package policy ES version. - type: string - required: - - name - - enabled - - inputs + - $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_dry_run_package_policy' maxItems: 2 type: array hasErrors: @@ -96650,6 +80937,336 @@ components: type: boolean required: - data_view + Kibana_HTTP_APIs_action_id_response: + additionalProperties: false + properties: + actionId: + type: string + required: + - actionId + title: action_id_response + type: object + Kibana_HTTP_APIs_action_message_response: + additionalProperties: false + properties: + message: + type: string + required: + - message + title: action_message_response + type: object + Kibana_HTTP_APIs_agent_policy_response: + additionalProperties: false + properties: + advanced_settings: + additionalProperties: false + type: object + properties: + agent_download_target_directory: + nullable: true + agent_download_timeout: + nullable: true + agent_features_disable_policy_change_acks_enabled: + nullable: true + agent_internal: + nullable: true + agent_limits_go_max_procs: + nullable: true + agent_logging_files_interval: + nullable: true + agent_logging_files_keepfiles: + nullable: true + agent_logging_files_rotateeverybytes: + nullable: true + agent_logging_level: + nullable: true + agent_logging_metrics_period: + nullable: true + agent_logging_to_files: + nullable: true + agent_monitoring_runtime_experimental: + nullable: true + agent_features: + items: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + maxItems: 100 + type: array + agentless: + additionalProperties: false + type: object + properties: + cloud_connectors: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + target_csp: + enum: + - aws + - azure + - gcp + type: string + required: + - enabled + cluster_id: + type: string + resources: + additionalProperties: false + type: object + properties: + requests: + additionalProperties: false + type: object + properties: + cpu: + type: string + memory: + type: string + agents: + type: number + agents_per_version: + items: + additionalProperties: false + type: object + properties: + count: + type: number + version: + type: string + required: + - version + - count + maxItems: 1000 + type: array + created_at: + type: string + data_output_id: + nullable: true + type: string + description: + type: string + download_source_id: + nullable: true + type: string + fips_agents: + type: number + fleet_server_host_id: + nullable: true + type: string + global_data_tags: + description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. + items: + additionalProperties: false + type: object + properties: + name: + type: string + value: + anyOf: + - type: string + - type: number + required: + - name + - value + maxItems: 100 + type: array + has_agent_version_conditions: + type: boolean + has_fleet_server: + type: boolean + id: + type: string + inactivity_timeout: + default: 1209600 + minimum: 0 + type: number + is_default: + type: boolean + is_default_fleet_server: + type: boolean + is_managed: + type: boolean + is_preconfigured: + type: boolean + is_protected: + description: Indicates whether the agent policy has tamper protection enabled. Defaults to `false`. + type: boolean + is_verifier: + type: boolean + keep_monitoring_alive: + default: false + description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled + nullable: true + type: boolean + min_agent_version: + nullable: true + type: string + monitoring_diagnostics: + additionalProperties: false + type: object + properties: + limit: + additionalProperties: false + type: object + properties: + burst: + type: number + interval: + type: string + uploader: + additionalProperties: false + type: object + properties: + init_dur: + type: string + max_dur: + type: string + max_retries: + type: number + monitoring_enabled: + items: + enum: + - logs + - metrics + - traces + type: string + maxItems: 3 + type: array + monitoring_http: + additionalProperties: false + type: object + properties: + buffer: + additionalProperties: false + type: object + properties: + enabled: + default: false + type: boolean + enabled: + type: boolean + host: + type: string + port: + maximum: 65353 + minimum: 0 + type: number + monitoring_output_id: + nullable: true + type: string + monitoring_pprof_enabled: + type: boolean + name: + minLength: 1 + type: string + namespace: + minLength: 1 + type: string + overrides: + additionalProperties: + nullable: true + description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + package_agent_version_conditions: + items: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + version_condition: + type: string + required: + - name + - title + - version_condition + maxItems: 1000 + nullable: true + type: array + package_policies: + anyOf: + - items: + type: string + maxItems: 10000 + type: array + - description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the `?full=true` parameter + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + maxItems: 10000 + type: array + required_versions: + items: + additionalProperties: false + type: object + properties: + percentage: + description: Target percentage of agents to auto upgrade + maximum: 100 + minimum: 0 + type: number + version: + description: Target version for automatic agent upgrade + type: string + required: + - version + - percentage + maxItems: 100 + nullable: true + type: array + revision: + type: number + schema_version: + type: string + space_ids: + items: + type: string + maxItems: 100 + type: array + status: + enum: + - active + - inactive + type: string + supports_agentless: + default: false + description: Indicates whether the agent policy supports agentless integrations. + nullable: true + type: boolean + unenroll_timeout: + minimum: 0 + type: number + unprivileged_agents: + type: number + updated_at: + type: string + updated_by: + type: string + version: + type: string + required: + - id + - name + - namespace + - is_protected + - status + - updated_at + - updated_by + - revision + title: agent_policy_response + type: object Kibana_HTTP_APIs_aiops_change_point_chart: additionalProperties: false description: Change point detection chart embeddable schema @@ -97558,6 +82175,314 @@ components: - schedule title: backfill_response type: object + Kibana_HTTP_APIs_bulk_delete_enrollment_api_keys_request: + additionalProperties: false + properties: + forceDelete: + default: false + description: When false (default), invalidate the API key and mark the token as inactive. When true, also delete the token document. + type: boolean + includeHidden: + default: false + description: When true, allow deletion of hidden enrollment tokens (managed/agentless policies). Defaults to false. + type: boolean + kuery: + description: KQL query to select enrollment tokens to delete. + type: string + tokenIds: + description: List of enrollment token IDs to delete. + items: + type: string + maxItems: 10000 + type: array + title: bulk_delete_enrollment_api_keys_request + type: object + Kibana_HTTP_APIs_bulk_delete_enrollment_api_keys_response: + additionalProperties: false + properties: + action: + type: string + count: + type: number + errorCount: + type: number + successCount: + type: number + required: + - action + - count + - successCount + - errorCount + title: bulk_delete_enrollment_api_keys_response + type: object + Kibana_HTTP_APIs_bulk_get_agent_policies_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_agent_policy_response' + maxItems: 10000 + type: array + required: + - items + title: bulk_get_agent_policies_response + type: object + Kibana_HTTP_APIs_bulk_get_package_policies_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + maxItems: 10000 + type: array + required: + - items + title: bulk_get_package_policies_response + type: object + Kibana_HTTP_APIs_bulk_install_packages_from_registry_request: + additionalProperties: false + properties: + force: + default: false + type: boolean + packages: + items: + anyOf: + - type: string + - additionalProperties: false + type: object + properties: + name: + type: string + prerelease: + type: boolean + version: + type: string + required: + - name + - version + maxItems: 1000 + minItems: 1 + type: array + required: + - packages + title: bulk_install_packages_from_registry_request + type: object + Kibana_HTTP_APIs_bulk_install_packages_from_registry_response: + additionalProperties: false + properties: + items: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_install_packages_response_item_success' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_bulk_install_packages_response_item_error' + maxItems: 10000 + type: array + required: + - items + title: bulk_install_packages_from_registry_response + type: object + Kibana_HTTP_APIs_bulk_install_packages_response_item_error: + additionalProperties: false + properties: + error: + anyOf: + - type: string + - nullable: true + name: + type: string + statusCode: + type: number + required: + - name + - statusCode + title: bulk_install_packages_response_item_error + type: object + Kibana_HTTP_APIs_bulk_install_packages_response_item_success: + additionalProperties: false + properties: + name: + type: string + result: + additionalProperties: false + type: object + properties: + assets: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_es_asset_reference' + maxItems: 10000 + type: array + error: + nullable: true + installSource: + type: string + installType: + type: string + status: + enum: + - installed + - already_installed + type: string + required: + - error + - installType + version: + type: string + required: + - name + - version + - result + title: bulk_install_packages_response_item_success + type: object + Kibana_HTTP_APIs_bulk_namespace_customization_request: + additionalProperties: false + properties: + disable: + description: Namespaces to disable namespace-level customization for on each package. + items: + type: string + maxItems: 100 + type: array + enable: + description: Namespaces to enable namespace-level customization for on each package. + items: + type: string + maxItems: 100 + type: array + packages: + description: Package names to apply the customization changes to. + items: + type: string + maxItems: 1000 + minItems: 1 + type: array + required: + - packages + title: bulk_namespace_customization_request + type: object + Kibana_HTTP_APIs_bulk_namespace_customization_response: + additionalProperties: false + properties: + items: + items: + additionalProperties: false + type: object + properties: + error: + type: string + name: + type: string + namespace_customization_enabled_for: + description: 'The opt-in list on the package. Returned whenever the package is installed: the new list on success, or the unchanged list when the request is rejected (for example, because of a namespace-prefix restriction).' + items: + type: string + maxItems: 100 + type: array + success: + type: boolean + required: + - name + - success + maxItems: 1000 + type: array + required: + - items + title: bulk_namespace_customization_response + type: object + Kibana_HTTP_APIs_bulk_rollback_packages_request: + additionalProperties: false + properties: + packages: + items: + additionalProperties: false + type: object + properties: + name: + description: Package name to rollback + type: string + required: + - name + maxItems: 1000 + minItems: 1 + type: array + required: + - packages + title: bulk_rollback_packages_request + type: object + Kibana_HTTP_APIs_bulk_rollback_packages_response: + additionalProperties: false + properties: + taskId: + type: string + required: + - taskId + title: bulk_rollback_packages_response + type: object + Kibana_HTTP_APIs_bulk_uninstall_packages_request: + additionalProperties: false + properties: + force: + default: false + type: boolean + packages: + items: + additionalProperties: false + type: object + properties: + name: + type: string + version: + type: string + required: + - name + - version + maxItems: 1000 + minItems: 1 + type: array + required: + - packages + title: bulk_uninstall_packages_request + type: object + Kibana_HTTP_APIs_bulk_upgrade_packages_request: + additionalProperties: false + properties: + force: + default: false + type: boolean + packages: + items: + additionalProperties: false + type: object + properties: + name: + type: string + version: + type: string + required: + - name + maxItems: 1000 + minItems: 1 + type: array + prerelease: + type: boolean + upgrade_package_policies: + default: false + type: boolean + required: + - packages + title: bulk_upgrade_packages_request + type: object + Kibana_HTTP_APIs_bulk_upgrade_packages_response: + additionalProperties: false + properties: + taskId: + type: string + required: + - taskId + title: bulk_upgrade_packages_response + type: object Kibana_HTTP_APIs_byteFormat: additionalProperties: false description: Data size format in bits or bytes, with optional decimal places and suffix. @@ -97621,6 +82546,25 @@ components: - mapping title: Categorical Color Mapping type: object + Kibana_HTTP_APIs_category_summary_item: + additionalProperties: false + properties: + count: + type: number + id: + type: string + parent_id: + type: string + parent_title: + type: string + title: + type: string + required: + - id + - title + - count + title: category_summary_item + type: object Kibana_HTTP_APIs_ClassicFieldDefinition: additionalProperties: $ref: '#/components/schemas/Kibana_HTTP_APIs_ClassicFieldDefinitionConfig' @@ -98095,6 +83039,18 @@ components: - routing required: - objects + Kibana_HTTP_APIs_copy_agent_policy_request: + additionalProperties: false + properties: + description: + type: string + name: + minLength: 1 + type: string + required: + - name + title: copy_agent_policy_request + type: object Kibana_HTTP_APIs_core_status_redactedResponse: additionalProperties: false description: A minimal representation of Kibana's operational status. Returned when the caller is unauthenticated or lacks the `monitor` cluster privilege. @@ -98442,6 +83398,335 @@ components: - operation title: Count Metric Operation type: object + Kibana_HTTP_APIs_create_custom_integration_request: + additionalProperties: false + properties: + datasets: + items: + additionalProperties: false + type: object + properties: + name: + type: string + type: + enum: + - logs + - metrics + - traces + - synthetics + - profiling + type: string + required: + - name + - type + maxItems: 10 + type: array + force: + type: boolean + integrationName: + type: string + required: + - integrationName + - datasets + title: create_custom_integration_request + type: object + Kibana_HTTP_APIs_create_package_policy_request: + additionalProperties: false + properties: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. + items: + type: string + maxItems: 1000 + nullable: true + type: array + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. + nullable: true + type: string + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 + nullable: true + type: string + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' + type: string + description: + description: Package policy description + type: string + enabled: + type: boolean + force: + description: Force package policy creation even if the package is not verified, or if the agent policy is managed. + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + nullable: true + type: array + id: + description: Package policy unique identifier + type: string + inputs: + items: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + name: + type: string + policy_template: + type: string + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: + additionalProperties: false + type: object + properties: + dataset: + type: string + elasticsearch: + additionalProperties: false + type: object + properties: + dynamic_dataset: + type: boolean + dynamic_namespace: + type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string + required: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - enabled + - data_stream + - compiled_stream + maxItems: 1000 + type: array + type: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - type + - enabled + maxItems: 1000 + type: array + is_managed: + type: boolean + name: + description: Unique name for the package policy. + type: string + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: + nullable: true + type: string + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. + nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + spaceIds: + items: + type: string + maxItems: 100 + type: array + supports_agentless: + default: false + deprecated: true + description: Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API. + nullable: true + type: boolean + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. + nullable: true + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - name + - inputs + title: create_package_policy_request + type: object + Kibana_HTTP_APIs_create_package_policy_response: + additionalProperties: false + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_response' + required: + - item + title: create_package_policy_response + type: object Kibana_HTTP_APIs_cumulativeSumOperation: additionalProperties: false properties: @@ -100582,43 +85867,494 @@ components: type: string use_original_time_range: default: false - description: When `true`, uses the original time range instead of the current query time range. + description: When `true`, uses the original time range instead of the current query time range. + type: boolean + required: + - operation + - field + title: Date Histogram Operation + type: object + Kibana_HTTP_APIs_delete_agent_policy_request: + additionalProperties: false + properties: + agentPolicyId: + description: The ID of the agent policy + type: string + force: + description: bypass validation checks that can prevent agent policy deletion + type: boolean + required: + - agentPolicyId + title: delete_agent_policy_request + type: object + Kibana_HTTP_APIs_delete_agent_policy_response: + additionalProperties: false + properties: + id: + type: string + name: + type: string + required: + - id + - name + title: delete_agent_policy_response + type: object + Kibana_HTTP_APIs_delete_enrollment_api_key_response: + additionalProperties: false + properties: + action: + enum: + - deleted + type: string + required: + - action + title: delete_enrollment_api_key_response + type: object + Kibana_HTTP_APIs_delete_one_package_policy_response: + additionalProperties: false + properties: + id: + type: string + required: + - id + title: delete_one_package_policy_response + type: object + Kibana_HTTP_APIs_delete_package_datastream_assets_response: + additionalProperties: false + properties: + success: + type: boolean + required: + - success + title: delete_package_datastream_assets_response + type: object + Kibana_HTTP_APIs_delete_package_policies_request: + additionalProperties: false + properties: + force: + type: boolean + packagePolicyIds: + items: + type: string + maxItems: 1000 + type: array + required: + - packagePolicyIds + title: delete_package_policies_request + type: object + Kibana_HTTP_APIs_delete_package_response: + additionalProperties: false + properties: + items: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_es_asset_reference' + maxItems: 10000 + type: array + required: + - items + title: delete_package_response + type: object + Kibana_HTTP_APIs_deprecation_info: + additionalProperties: false + properties: + description: + type: string + replaced_by: + additionalProperties: + type: string + type: object + since: + type: string + required: + - description + title: deprecation_info + type: object + Kibana_HTTP_APIs_differencesOperation: + additionalProperties: false + properties: + filter: + $ref: '#/components/schemas/Kibana_HTTP_APIs_filterSimple' + format: + $ref: '#/components/schemas/Kibana_HTTP_APIs_formatType' + label: + description: Label for the operation + type: string + of: + $ref: '#/components/schemas/Kibana_HTTP_APIs_fieldMetricOperations' + operation: + enum: + - differences + type: string + reduced_time_range: + description: Reduced time range + title: Operation Reduced Time Range Setting + type: string + time_scale: + $ref: '#/components/schemas/Kibana_HTTP_APIs_operationTimeScaleSetting' + time_shift: + description: Time shift + title: Operation Time Shift Setting + type: string + required: + - operation + - of + title: Differences Operation + type: object + Kibana_HTTP_APIs_dry_run_package_policies_request: + additionalProperties: false + properties: + packagePolicyIds: + items: + type: string + maxItems: 1000 + type: array + packageVersion: + type: string + required: + - packagePolicyIds + title: dry_run_package_policies_request + type: object + Kibana_HTTP_APIs_dry_run_package_policy: + additionalProperties: true + properties: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. + items: + type: string + maxItems: 1000 + nullable: true + type: array + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. + nullable: true + type: string + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 + nullable: true + type: string + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' + type: string + created_at: + type: string + created_by: + type: string + description: + description: Package policy description + type: string + elasticsearch: + additionalProperties: true + type: object + properties: + privileges: + additionalProperties: true + type: object + properties: + cluster: + items: + type: string + maxItems: 100 + type: array + enabled: + type: boolean + errors: + items: + additionalProperties: false + type: object + properties: + key: + type: string + message: + type: string + required: + - message + maxItems: 10 + type: array + force: + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + nullable: true + type: array + id: + type: string + inputs: + items: + additionalProperties: false + type: object + properties: + compiled_input: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + name: + type: string + policy_template: + type: string + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: + additionalProperties: false + type: object + properties: + dataset: + type: string + elasticsearch: + additionalProperties: false + type: object + properties: + dynamic_dataset: + type: boolean + dynamic_namespace: + type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string + required: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - enabled + - data_stream + - compiled_stream + maxItems: 1000 + type: array + type: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - type + - enabled + - streams + - compiled_input + maxItems: 100 + type: array + is_managed: + type: boolean + missingVars: + items: + type: string + maxItems: 100 + type: array + name: + description: Unique name for the package policy. + type: string + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: + nullable: true + type: string + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. + nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + revision: + type: number + secret_references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 1000 + type: array + supports_agentless: + default: false + description: Indicates whether the package policy belongs to an agentless agent policy. + nullable: true type: boolean - required: - - operation - - field - title: Date Histogram Operation - type: object - Kibana_HTTP_APIs_differencesOperation: - additionalProperties: false - properties: - filter: - $ref: '#/components/schemas/Kibana_HTTP_APIs_filterSimple' - format: - $ref: '#/components/schemas/Kibana_HTTP_APIs_formatType' - label: - description: Label for the operation - type: string - of: - $ref: '#/components/schemas/Kibana_HTTP_APIs_fieldMetricOperations' - operation: - enum: - - differences + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. + nullable: true + type: boolean + updated_at: type: string - reduced_time_range: - description: Reduced time range - title: Operation Reduced Time Range Setting + updated_by: type: string - time_scale: - $ref: '#/components/schemas/Kibana_HTTP_APIs_operationTimeScaleSetting' - time_shift: - description: Time shift - title: Operation Time Shift Setting + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + version: + description: Package policy ES version. type: string required: - - operation - - of - title: Differences Operation + - name + - enabled + - inputs + title: dry_run_package_policy type: object Kibana_HTTP_APIs_durationFormat: additionalProperties: false @@ -100643,6 +86379,79 @@ components: - to title: Duration Format type: object + Kibana_HTTP_APIs_enrollment_api_key: + additionalProperties: false + properties: + active: + description: When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents. + type: boolean + api_key: + description: The enrollment API key (token) used for enrolling Elastic Agents. + type: string + api_key_id: + description: The ID of the API key in the Security API. + type: string + created_at: + type: string + hidden: + type: boolean + id: + type: string + name: + description: The name of the enrollment API key. + type: string + policy_id: + description: The ID of the agent policy the Elastic Agent will be enrolled in. + type: string + required: + - id + - api_key_id + - api_key + - active + - created_at + title: enrollment_api_key + type: object + Kibana_HTTP_APIs_enrollment_api_key_response: + additionalProperties: false + properties: + action: + enum: + - created + type: string + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_enrollment_api_key' + required: + - item + - action + title: enrollment_api_key_response + type: object + Kibana_HTTP_APIs_es_asset_reference: + additionalProperties: false + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + - knowledge_base + - esql_view + type: string + version: + type: string + required: + - id + - type + title: es_asset_reference + type: object Kibana_HTTP_APIs_es-query-create-rule-body-alerting: additionalProperties: false properties: @@ -101312,6 +87121,512 @@ components: - formula title: Formula Operation type: object + Kibana_HTTP_APIs_full_agent_policy: + additionalProperties: false + properties: + agent: + additionalProperties: false + type: object + properties: + download: + additionalProperties: false + type: object + properties: + auth: + additionalProperties: false + type: object + properties: + api_key: + type: string + headers: + items: + additionalProperties: false + type: object + properties: + key: + type: string + value: + type: string + required: + - key + - value + maxItems: 100 + type: array + password: + type: string + username: + type: string + proxy_headers: + additionalProperties: + anyOf: + - type: string + - type: boolean + - type: number + nullable: true + type: object + proxy_url: + type: string + secrets: + additionalProperties: true + type: object + properties: + ssl: + additionalProperties: true + type: object + properties: + key: + additionalProperties: true + type: object + properties: + id: + type: string + required: + - key + sourceURI: + type: string + ssl: + additionalProperties: false + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + key: + type: string + renegotiation: + type: string + verification_mode: + type: string + target_directory: + type: string + timeout: + type: string + required: + - sourceURI + features: + additionalProperties: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + required: + - enabled + type: object + internal: + nullable: true + limits: + additionalProperties: false + type: object + properties: + go_max_procs: + type: number + logging: + additionalProperties: false + type: object + properties: + files: + additionalProperties: false + type: object + properties: + interval: + type: string + keepfiles: + type: number + rotateeverybytes: + type: number + level: + type: string + metrics: + additionalProperties: false + type: object + properties: + period: + type: string + to_files: + type: boolean + monitoring: + additionalProperties: false + type: object + properties: + _runtime_experimental: + type: string + apm: + nullable: true + diagnostics: + additionalProperties: false + type: object + properties: + limit: + additionalProperties: false + type: object + properties: + burst: + type: number + interval: + type: string + uploader: + additionalProperties: false + type: object + properties: + init_dur: + type: string + max_dur: + type: string + max_retries: + type: number + enabled: + type: boolean + http: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: number + logs: + type: boolean + metrics: + type: boolean + namespace: + type: string + pprof: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + required: + - enabled + traces: + type: boolean + use_output: + type: string + required: + - enabled + - metrics + - logs + - traces + - apm + protection: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + signing_key: + type: string + uninstall_token_hash: + type: string + required: + - enabled + - uninstall_token_hash + - signing_key + required: + - monitoring + - download + - features + - internal + connectors: + additionalProperties: + nullable: true + type: object + exporters: + additionalProperties: + nullable: true + type: object + extensions: + additionalProperties: + nullable: true + type: object + fleet: + anyOf: + - additionalProperties: false + type: object + properties: + hosts: + items: + type: string + maxItems: 100 + type: array + proxy_headers: + additionalProperties: + anyOf: + - type: string + - type: boolean + - type: number + nullable: true + type: object + proxy_url: + type: string + secrets: + additionalProperties: true + type: object + properties: + ssl: + additionalProperties: true + type: object + properties: + key: + additionalProperties: true + type: object + properties: + id: + type: string + required: + - key + ssl: + additionalProperties: false + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + key: + type: string + renegotiation: + type: string + verification_mode: + type: string + required: + - hosts + - additionalProperties: false + type: object + properties: + kibana: + additionalProperties: false + type: object + properties: + hosts: + items: + type: string + maxItems: 100 + type: array + path: + type: string + protocol: + type: string + required: + - hosts + - protocol + required: + - kibana + id: + type: string + inputs: + items: + additionalProperties: true + type: object + properties: + data_stream: + additionalProperties: true + type: object + properties: + namespace: + type: string + required: + - namespace + id: + type: string + meta: + additionalProperties: true + type: object + properties: + package: + additionalProperties: true + type: object + properties: + name: + type: string + version: + type: string + required: + - name + - version + name: + type: string + package_policy_id: + type: string + processors: + items: + additionalProperties: true + type: object + properties: + add_fields: + additionalProperties: true + type: object + properties: + fields: + additionalProperties: + anyOf: + - type: string + - type: number + type: object + target: + type: string + required: + - target + - fields + required: + - add_fields + maxItems: 10000 + type: array + revision: + type: number + streams: + items: + additionalProperties: true + type: object + properties: + data_stream: + additionalProperties: true + type: object + properties: + dataset: + type: string + type: + type: string + required: + - dataset + id: + type: string + required: + - id + - data_stream + maxItems: 10000 + type: array + type: + type: string + use_output: + type: string + required: + - id + - name + - revision + - type + - data_stream + - use_output + - package_policy_id + maxItems: 10000 + type: array + namespaces: + items: + type: string + maxItems: 100 + type: array + output_permissions: + additionalProperties: + additionalProperties: + nullable: true + type: object + type: object + outputs: + additionalProperties: + additionalProperties: true + type: object + properties: + ca_sha256: + nullable: true + type: string + hosts: + items: + type: string + maxItems: 100 + type: array + proxy_headers: + additionalProperties: + anyOf: + - type: string + - type: boolean + - type: number + nullable: true + type: object + proxy_url: + type: string + type: + type: string + required: + - type + type: object + processors: + additionalProperties: + nullable: true + type: object + receivers: + additionalProperties: + nullable: true + type: object + revision: + type: number + secret_references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 10000 + type: array + service: + additionalProperties: false + type: object + properties: + extensions: + items: + type: string + maxItems: 1000 + type: array + pipelines: + additionalProperties: + additionalProperties: false + type: object + properties: + exporters: + items: + type: string + maxItems: 1000 + type: array + processors: + items: + type: string + maxItems: 1000 + type: array + receivers: + items: + type: string + maxItems: 1000 + type: array + type: object + signed: + additionalProperties: false + type: object + properties: + data: + type: string + signature: + type: string + required: + - data + - signature + required: + - id + - outputs + - inputs + title: full_agent_policy + type: object Kibana_HTTP_APIs_gaugeESQL: additionalProperties: false description: Gauge configuration using an ES|QL query. @@ -102367,242 +88682,1006 @@ components: - type title: url_drilldown type: object - maxItems: 100 + maxItems: 100 + type: array + filters: + $ref: '#/components/schemas/Kibana_HTTP_APIs_lensPanelFilters' + hide_border: + type: boolean + hide_title: + type: boolean + ignore_global_filters: + default: false + description: When `true`, ignores global filters when fetching data for this layer. Defaults to `false`. + type: boolean + metric: + anyOf: + - anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricCountMetric' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricUniqueCountMetric' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricStatsMetric' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricSumMetric' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricLastValue' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricPercentile' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricPercentileRanks' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricFormula' + query: + $ref: '#/components/schemas/Kibana_HTTP_APIs_filterSimple' + references: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_kbn-content-management-utils-referenceSchema' + type: array + sampling: + default: 1 + description: Sampling factor between 0 (no sampling) and 1 (full sampling). + maximum: 1 + minimum: 0 + type: number + styling: + $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeStyling' + time_range: + $ref: '#/components/schemas/Kibana_HTTP_APIs_kbn-es-query-server-timeRangeSchema' + title: + type: string + type: + enum: + - gauge + type: string + required: + - type + - data_source + - metric + title: Gauge Chart (DSL) + type: object + Kibana_HTTP_APIs_gaugeShapeBullet: + additionalProperties: false + description: Bullet gauge shape. + properties: + orientation: + $ref: '#/components/schemas/Kibana_HTTP_APIs_vis_api_simple_orientation' + type: + enum: + - bullet + type: string + required: + - type + title: Shape (Bullet) + type: object + Kibana_HTTP_APIs_gaugeShapeCircular: + additionalProperties: false + description: Circular gauge shape. + properties: + type: + enum: + - circle + - semi_circle + - arc + type: string + required: + - type + title: Shape (Circular) + type: object + Kibana_HTTP_APIs_gaugeStyling: + additionalProperties: false + description: Visual chart styling options + properties: + shape: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeShapeBullet' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeShapeCircular' + title: Gauge styling + type: object + Kibana_HTTP_APIs_geo-containment-create-rule-body-alerting: + additionalProperties: false + properties: + actions: + default: [] + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_new_rule_action' + type: array + alert_delay: + additionalProperties: false + description: Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions. + type: object + properties: + active: + description: The number of consecutive runs that must meet the rule conditions. + type: number + required: + - active + artifacts: + additionalProperties: false + type: object + properties: + dashboards: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 10 + type: array + investigation_guide: + additionalProperties: false + type: object + properties: + blob: + maxLength: 10000 + type: string + required: + - blob + consumer: + description: 'The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.' + type: string + enabled: + default: true + description: Indicates whether you want the rule to run on an interval basis after it is created. + type: boolean + flapping: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_rule_flapping' + nullable: true + name: + description: The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule. + type: string + notify_when: + description: 'Indicates how frequently rule actions are triggered. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. You cannot specify `notify_when` at both the rule and action level. The recommended approach is to set it for each action individually. If you set `notify_when` at the rule level and then edit the rule, it will automatically be converted to action-specific values.' + enum: + - onActionGroupChange + - onActiveAlert + - onThrottleInterval + nullable: true + type: string + params: + additionalProperties: false + description: The parameters for the geo containment rule. These parameters are appropriate when `rule_type_id` is `.geo-containment`. + properties: + boundaryGeoField: + minLength: 1 + type: string + boundaryIndexId: + minLength: 1 + type: string + boundaryIndexQuery: + nullable: true + boundaryIndexTitle: + minLength: 1 + type: string + boundaryNameField: + minLength: 1 + type: string + boundaryType: + minLength: 1 + type: string + dateField: + minLength: 1 + type: string + entity: + minLength: 1 + type: string + geoField: + minLength: 1 + type: string + index: + minLength: 1 + type: string + indexId: + minLength: 1 + type: string + indexQuery: + nullable: true + required: + - index + - indexId + - geoField + - entity + - dateField + - boundaryType + - boundaryIndexTitle + - boundaryIndexId + - boundaryGeoField + - indexQuery + - boundaryIndexQuery + title: Geo Containment Rule Params + type: object + rule_type_id: + enum: + - .geo-containment + type: string + schedule: + additionalProperties: false + description: The check interval, which specifies how frequently the rule conditions are checked. + type: object + properties: + interval: + description: The interval is specified in seconds, minutes, hours, or days. + type: string + required: + - interval + tags: + default: [] + description: The tags for the rule. + items: + type: string + type: array + throttle: + description: Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how frequently rule actions are triggered. You cannot specify the throttle interval at both the rule and action level. If you set the throttle interval at the rule level and then edit the rule, it will automatically be converted to action-specific values. + nullable: true + type: string + required: + - name + - consumer + - schedule + - rule_type_id + - params + title: Geo containment + type: object + Kibana_HTTP_APIs_get_agent_policy_outputs_response: + additionalProperties: false + properties: + item: + additionalProperties: false + type: object + properties: + agentPolicyId: + type: string + data: + additionalProperties: false + type: object + properties: + integrations: + items: + additionalProperties: false + type: object + properties: + id: + type: string + integrationPolicyName: + type: string + name: + type: string + pkgName: + type: string + maxItems: 1000 + type: array + output: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + required: + - id + - name + required: + - output + monitoring: + additionalProperties: false + type: object + properties: + output: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + required: + - id + - name + required: + - output + required: + - monitoring + - data + required: + - item + title: get_agent_policy_outputs_response + type: object + Kibana_HTTP_APIs_get_agent_policy_response: + additionalProperties: false + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_agent_policy_response' + required: + - item + title: get_agent_policy_response + type: object + Kibana_HTTP_APIs_get_bulk_assets_request: + additionalProperties: false + properties: + assetIds: + items: + additionalProperties: false + type: object + properties: + id: + type: string + type: + type: string + required: + - id + - type + maxItems: 10000 + type: array + required: + - assetIds + title: get_bulk_assets_request + type: object + Kibana_HTTP_APIs_get_bulk_assets_response: + additionalProperties: false + properties: + items: + items: + additionalProperties: false + type: object + properties: + appLink: + type: string + attributes: + additionalProperties: false + type: object + properties: + description: + type: string + service: + type: string + title: + type: string + id: + type: string + type: + type: string + updatedAt: + type: string + required: + - id + - type + - attributes + maxItems: 10000 + type: array + required: + - items + title: get_bulk_assets_response + type: object + Kibana_HTTP_APIs_get_categories_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_category_summary_item' + maxItems: 10000 + type: array + required: + - items + title: get_categories_response + type: object + Kibana_HTTP_APIs_get_data_streams_response: + additionalProperties: false + properties: + items: + items: + additionalProperties: false + type: object + properties: + name: + type: string + required: + - name + maxItems: 10000 + type: array + required: + - items + title: get_data_streams_response + type: object + Kibana_HTTP_APIs_get_dependencies_response: + additionalProperties: false + properties: + items: + items: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + version: + type: string + required: + - name + - version + - title + maxItems: 1000 + type: array + required: + - items + title: get_dependencies_response + type: object + Kibana_HTTP_APIs_get_full_agent_policy_response: + additionalProperties: false + properties: + item: + anyOf: + - type: string + - $ref: '#/components/schemas/Kibana_HTTP_APIs_full_agent_policy' + required: + - item + title: get_full_agent_policy_response + type: object + Kibana_HTTP_APIs_get_info_response: + additionalProperties: false + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_package_info' + metadata: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_metadata' + required: + - item + title: get_info_response + type: object + Kibana_HTTP_APIs_get_inputs_response: + additionalProperties: false + properties: + connectors: + additionalProperties: + nullable: true + type: object + exporters: + additionalProperties: + nullable: true + type: object + extensions: + additionalProperties: + nullable: true + type: object + inputs: + items: + additionalProperties: false + type: object + properties: + id: + type: string + streams: + items: + additionalProperties: true + type: object + properties: + data_stream: + additionalProperties: true + type: object + properties: + dataset: + type: string + type: + type: string + required: + - dataset + id: + type: string + required: + - id + - data_stream + maxItems: 10000 + type: array + type: + type: string + required: + - id + - type + maxItems: 10000 + type: array + processors: + additionalProperties: + nullable: true + type: object + receivers: + additionalProperties: + nullable: true + type: object + service: + additionalProperties: false + type: object + properties: + extensions: + items: + type: string + maxItems: 1000 + type: array + pipelines: + additionalProperties: + additionalProperties: false + type: object + properties: + exporters: + items: + type: string + maxItems: 1000 + type: array + processors: + items: + type: string + maxItems: 1000 + type: array + receivers: + items: + type: string + maxItems: 1000 + type: array + type: object + required: + - inputs + title: get_inputs_response + type: object + Kibana_HTTP_APIs_get_installed_packages_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_installed_package' + maxItems: 10000 type: array - filters: - $ref: '#/components/schemas/Kibana_HTTP_APIs_lensPanelFilters' - hide_border: - type: boolean - hide_title: - type: boolean - ignore_global_filters: - default: false - description: When `true`, ignores global filters when fetching data for this layer. Defaults to `false`. - type: boolean - metric: - anyOf: - - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricCountMetric' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricUniqueCountMetric' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricStatsMetric' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricSumMetric' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricLastValue' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricPercentile' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricPercentileRanks' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeMetricFormula' - query: - $ref: '#/components/schemas/Kibana_HTTP_APIs_filterSimple' - references: + searchAfter: items: - $ref: '#/components/schemas/Kibana_HTTP_APIs_kbn-content-management-utils-referenceSchema' + anyOf: + - type: string + - type: number + - type: boolean + - nullable: true + nullable: true + maxItems: 2 type: array - sampling: - default: 1 - description: Sampling factor between 0 (no sampling) and 1 (full sampling). - maximum: 1 - minimum: 0 + total: type: number - styling: - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeStyling' - time_range: - $ref: '#/components/schemas/Kibana_HTTP_APIs_kbn-es-query-server-timeRangeSchema' - title: - type: string - type: - enum: - - gauge - type: string required: - - type - - data_source - - metric - title: Gauge Chart (DSL) + - items + - total + title: get_installed_packages_response type: object - Kibana_HTTP_APIs_gaugeShapeBullet: + Kibana_HTTP_APIs_get_k8s_manifest_response: additionalProperties: false - description: Bullet gauge shape. properties: - orientation: - $ref: '#/components/schemas/Kibana_HTTP_APIs_vis_api_simple_orientation' - type: - enum: - - bullet + item: type: string required: - - type - title: Shape (Bullet) + - item + title: get_k8s_manifest_response type: object - Kibana_HTTP_APIs_gaugeShapeCircular: + Kibana_HTTP_APIs_get_limited_packages_response: additionalProperties: false - description: Circular gauge shape. properties: - type: - enum: - - circle - - semi_circle - - arc - type: string + items: + items: + type: string + maxItems: 10000 + type: array required: - - type - title: Shape (Circular) + - items + title: get_limited_packages_response type: object - Kibana_HTTP_APIs_gaugeStyling: + Kibana_HTTP_APIs_get_list_agent_policy_outputs_request: additionalProperties: false - description: Visual chart styling options properties: - shape: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeShapeBullet' - - $ref: '#/components/schemas/Kibana_HTTP_APIs_gaugeShapeCircular' - title: Gauge styling + ids: + description: list of package policy ids + items: + type: string + maxItems: 1000 + type: array + required: + - ids + title: get_list_agent_policy_outputs_request type: object - Kibana_HTTP_APIs_geo-containment-create-rule-body-alerting: + Kibana_HTTP_APIs_get_list_agent_policy_outputs_response: additionalProperties: false properties: - actions: - default: [] + items: items: - $ref: '#/components/schemas/Kibana_HTTP_APIs_new_rule_action' + additionalProperties: false + type: object + properties: + agentPolicyId: + type: string + data: + additionalProperties: false + type: object + properties: + integrations: + items: + additionalProperties: false + type: object + properties: + id: + type: string + integrationPolicyName: + type: string + name: + type: string + pkgName: + type: string + maxItems: 1000 + type: array + output: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + required: + - id + - name + required: + - output + monitoring: + additionalProperties: false + type: object + properties: + output: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + required: + - id + - name + required: + - output + required: + - monitoring + - data + maxItems: 10000 type: array - alert_delay: + required: + - items + title: get_list_agent_policy_outputs_response + type: object + Kibana_HTTP_APIs_get_one_bulk_operation_packages_response: + additionalProperties: false + properties: + error: additionalProperties: false - description: Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions. type: object properties: - active: - description: The number of consecutive runs that must meet the rule conditions. - type: number + message: + type: string required: - - active - artifacts: - additionalProperties: false - type: object - properties: - dashboards: - items: + - message + results: + items: + additionalProperties: false + type: object + properties: + error: additionalProperties: false type: object properties: - id: + message: type: string required: - - id - maxItems: 10 - type: array - investigation_guide: + - message + name: + type: string + success: + type: boolean + required: + - name + - success + maxItems: 10000 + type: array + status: + type: string + required: + - status + title: get_one_bulk_operation_packages_response + type: object + Kibana_HTTP_APIs_get_package_info: + additionalProperties: true + properties: + agent: + additionalProperties: false + type: object + properties: + privileges: additionalProperties: false type: object properties: - blob: - maxLength: 10000 + root: + type: boolean + asset_tags: + items: + additionalProperties: false + type: object + properties: + asset_ids: + items: type: string - required: - - blob - consumer: - description: 'The name of the application or feature that owns the rule. For example: `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.' + maxItems: 1000 + type: array + asset_types: + items: + type: string + maxItems: 100 + type: array + text: + type: string + required: + - text + maxItems: 1000 + type: array + assets: + additionalProperties: + nullable: true + type: object + categories: + items: + type: string + maxItems: 100 + type: array + conditions: + additionalProperties: true + type: object + properties: + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + elastic: + additionalProperties: true + type: object + properties: + capabilities: + items: + type: string + maxItems: 10 + type: array + subscription: + type: string + kibana: + additionalProperties: true + type: object + properties: + version: + type: string + data_streams: + items: + additionalProperties: + nullable: true + type: object + maxItems: 1000 + type: array + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + description: type: string - enabled: - default: true - description: Indicates whether you want the rule to run on an interval basis after it is created. + discovery: + additionalProperties: true + type: object + properties: + datasets: + items: + additionalProperties: true + type: object + properties: + name: + type: string + required: + - name + maxItems: 100 + type: array + fields: + items: + additionalProperties: true + type: object + properties: + name: + type: string + required: + - name + maxItems: 100 + type: array + download: + type: string + elasticsearch: + additionalProperties: + nullable: true + type: object + format_version: + type: string + icons: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_icon' + maxItems: 100 + type: array + installationInfo: + $ref: '#/components/schemas/Kibana_HTTP_APIs_installation_info' + internal: type: boolean - flapping: - allOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_rule_flapping' - nullable: true + keepPoliciesUpToDate: + type: boolean + latestVersion: + type: string + license: + type: string + licensePath: + type: string name: - description: The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule. type: string - notify_when: - description: 'Indicates how frequently rule actions are triggered. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. You cannot specify `notify_when` at both the rule and action level. The recommended approach is to set it for each action individually. If you set `notify_when` at the rule level and then edit the rule, it will automatically be converted to action-specific values.' - enum: - - onActionGroupChange - - onActiveAlert - - onThrottleInterval - nullable: true + notice: type: string - params: - additionalProperties: false - description: The parameters for the geo containment rule. These parameters are appropriate when `rule_type_id` is `.geo-containment`. + owner: + additionalProperties: true + type: object properties: - boundaryGeoField: - minLength: 1 + github: type: string - boundaryIndexId: - minLength: 1 + type: + enum: + - elastic + - partner + - community type: string - boundaryIndexQuery: + path: + type: string + policy_templates: + items: + additionalProperties: nullable: true - boundaryIndexTitle: - minLength: 1 - type: string - boundaryNameField: - minLength: 1 - type: string - boundaryType: - minLength: 1 - type: string - dateField: - minLength: 1 - type: string - entity: - minLength: 1 + type: object + maxItems: 1000 + type: array + readme: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + screenshots: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_icon' + maxItems: 100 + type: array + signature_path: + type: string + source: + additionalProperties: true + type: object + properties: + license: type: string - geoField: - minLength: 1 + required: + - license + status: + type: string + title: + type: string + type: + anyOf: + - enum: + - integration type: string - index: - minLength: 1 + - enum: + - input type: string - indexId: - minLength: 1 + - enum: + - content type: string - indexQuery: + - type: string + var_groups: + items: + additionalProperties: true + type: object + properties: + description: + type: string + name: + type: string + options: + items: + additionalProperties: true + type: object + properties: + description: + type: string + hide_in_deployment_modes: + items: + enum: + - default + - agentless + type: string + maxItems: 2 + type: array + name: + type: string + title: + type: string + vars: + items: + type: string + maxItems: 100 + type: array + required: + - name + - title + - vars + maxItems: 100 + type: array + selector_title: + type: string + title: + type: string + required: + - name + - title + - selector_title + - options + maxItems: 100 + type: array + vars: + items: + additionalProperties: nullable: true - required: - - index - - indexId - - geoField - - entity - - dateField - - boundaryType - - boundaryIndexTitle - - boundaryIndexId - - boundaryGeoField - - indexQuery - - boundaryIndexQuery - title: Geo Containment Rule Params - type: object - rule_type_id: - enum: - - .geo-containment + type: object + maxItems: 1000 + type: array + version: type: string - schedule: + required: + - name + - version + - title + - assets + title: get_package_info + type: object + Kibana_HTTP_APIs_get_packages_response: + additionalProperties: false + properties: + items: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_list_item' + maxItems: 10000 + type: array + required: + - items + title: get_packages_response + type: object + Kibana_HTTP_APIs_get_stats_response: + additionalProperties: false + properties: + response: additionalProperties: false - description: The check interval, which specifies how frequently the rule conditions are checked. type: object properties: - interval: - description: The interval is specified in seconds, minutes, hours, or days. - type: string + agent_policy_count: + type: number + package_policy_count: + type: number required: - - interval - tags: - default: [] - description: The tags for the rule. - items: - type: string - type: array - throttle: - description: Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how frequently rule actions are triggered. You cannot specify the throttle interval at both the rule and action level. If you set the throttle interval at the rule level and then edit the rule, it will automatically be converted to action-specific values. + - agent_policy_count + - package_policy_count + required: + - response + title: get_stats_response + type: object + Kibana_HTTP_APIs_get_verification_key_id_response: + additionalProperties: false + properties: + id: nullable: true type: string required: - - name - - consumer - - schedule - - rule_type_id - - params - title: Geo containment + - id + title: get_verification_key_id_response type: object Kibana_HTTP_APIs_gradientColorMapping: additionalProperties: false @@ -103890,6 +90969,253 @@ components: properties: {} required: - inherit + Kibana_HTTP_APIs_install_kibana_assets_request: + additionalProperties: false + properties: + force: + type: boolean + space_ids: + description: When provided, assets are installed in the specified spaces instead of the current space. + items: + type: string + maxItems: 100 + minItems: 1 + type: array + title: install_kibana_assets_request + type: object + Kibana_HTTP_APIs_install_kibana_assets_response: + additionalProperties: false + properties: + success: + type: boolean + required: + - success + title: install_kibana_assets_response + type: object + Kibana_HTTP_APIs_install_package_from_registry_request: + additionalProperties: false + properties: + force: + default: false + type: boolean + ignore_constraints: + default: false + type: boolean + title: install_package_from_registry_request + type: object + Kibana_HTTP_APIs_install_package_response: + additionalProperties: false + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + name: + type: string + required: + - install_source + - name + items: + items: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + - $ref: '#/components/schemas/Kibana_HTTP_APIs_es_asset_reference' + maxItems: 10000 + type: array + required: + - items + - _meta + title: install_package_response + type: object + Kibana_HTTP_APIs_install_rule_assets_request: + additionalProperties: false + properties: + force: + type: boolean + title: install_rule_assets_request + type: object + Kibana_HTTP_APIs_installation_info: + additionalProperties: true + properties: + additional_spaces_installed_kibana: + additionalProperties: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + maxItems: 100 + type: array + type: object + created_at: + type: string + experimental_data_stream_features: + items: + additionalProperties: true + type: object + properties: + data_stream: + type: string + features: + additionalProperties: true + type: object + properties: + doc_value_only_numeric: + type: boolean + doc_value_only_other: + type: boolean + synthetic_source: + type: boolean + tsdb: + type: boolean + required: + - data_stream + - features + maxItems: 100 + type: array + install_format_schema_version: + type: string + install_source: + enum: + - registry + - upload + - bundled + - custom + type: string + install_status: + enum: + - installed + - installing + - install_failed + type: string + installed_es: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_es_asset_reference' + maxItems: 10000 + type: array + installed_kibana: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_kibana_asset_reference' + maxItems: 10000 + type: array + installed_kibana_space_id: + type: string + is_rollback_ttl_expired: + type: boolean + latest_executed_state: + additionalProperties: true + type: object + properties: + error: + type: string + name: + type: string + started_at: + type: string + latest_install_failed_attempts: + items: + additionalProperties: true + type: object + properties: + created_at: + type: string + error: + additionalProperties: true + type: object + properties: + message: + type: string + name: + type: string + stack: + type: string + required: + - name + - message + target_version: + type: string + required: + - created_at + - target_version + - error + maxItems: 10 + type: array + name: + type: string + namespaces: + items: + type: string + maxItems: 100 + type: array + previous_version: + nullable: true + type: string + rolled_back: + type: boolean + type: + type: string + updated_at: + type: string + verification_key_id: + nullable: true + type: string + verification_status: + enum: + - unverified + - verified + - unknown + type: string + version: + type: string + required: + - type + - installed_kibana + - installed_es + - name + - version + - install_status + - install_source + - verification_status + title: installation_info + type: object + Kibana_HTTP_APIs_installed_package: + additionalProperties: false + properties: + dataStreams: + items: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + required: + - name + - title + maxItems: 10000 + type: array + description: + type: string + icons: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_icon' + maxItems: 100 + type: array + name: + type: string + status: + type: string + title: + type: string + version: + type: string + required: + - name + - version + - status + - dataStreams + title: installed_package + type: object Kibana_HTTP_APIs_kbn-as-code-filters-schema_asCodeConditionFilterSchema: additionalProperties: false description: A filter that evaluates a single field condition such as equality, range, or existence. @@ -106687,6 +94013,37 @@ components: - geo_point title: Type type: string + Kibana_HTTP_APIs_kibana_asset_reference: + additionalProperties: false + properties: + deferred: + type: boolean + id: + type: string + originId: + type: string + type: + anyOf: + - enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + - type: string + required: + - id + - type + title: kibana_asset_reference + type: object Kibana_HTTP_APIs_lastValueOperation: additionalProperties: false properties: @@ -113697,6 +101054,279 @@ components: - keys title: Multi Field Key type: object + Kibana_HTTP_APIs_new_agent_policy: + additionalProperties: false + properties: + advanced_settings: + additionalProperties: false + type: object + properties: + agent_download_target_directory: + nullable: true + agent_download_timeout: + nullable: true + agent_features_disable_policy_change_acks_enabled: + nullable: true + agent_internal: + nullable: true + agent_limits_go_max_procs: + nullable: true + agent_logging_files_interval: + nullable: true + agent_logging_files_keepfiles: + nullable: true + agent_logging_files_rotateeverybytes: + nullable: true + agent_logging_level: + nullable: true + agent_logging_metrics_period: + nullable: true + agent_logging_to_files: + nullable: true + agent_monitoring_runtime_experimental: + nullable: true + agent_features: + items: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + maxItems: 100 + type: array + agentless: + additionalProperties: false + type: object + properties: + cloud_connectors: + additionalProperties: false + type: object + properties: + enabled: + type: boolean + target_csp: + enum: + - aws + - azure + - gcp + type: string + required: + - enabled + cluster_id: + type: string + resources: + additionalProperties: false + type: object + properties: + requests: + additionalProperties: false + type: object + properties: + cpu: + type: string + memory: + type: string + bumpRevision: + type: boolean + data_output_id: + nullable: true + type: string + description: + type: string + download_source_id: + nullable: true + type: string + fleet_server_host_id: + nullable: true + type: string + force: + type: boolean + global_data_tags: + description: User defined data tags that are added to all of the inputs. The values can be strings or numbers. + items: + additionalProperties: false + type: object + properties: + name: + type: string + value: + anyOf: + - type: string + - type: number + required: + - name + - value + maxItems: 100 + type: array + has_agent_version_conditions: + type: boolean + has_fleet_server: + type: boolean + id: + type: string + inactivity_timeout: + default: 1209600 + minimum: 0 + type: number + is_default: + type: boolean + is_default_fleet_server: + type: boolean + is_managed: + type: boolean + is_protected: + type: boolean + is_verifier: + type: boolean + keep_monitoring_alive: + default: false + description: When set to true, monitoring will be enabled but logs/metrics collection will be disabled + nullable: true + type: boolean + min_agent_version: + nullable: true + type: string + monitoring_diagnostics: + additionalProperties: false + type: object + properties: + limit: + additionalProperties: false + type: object + properties: + burst: + type: number + interval: + type: string + uploader: + additionalProperties: false + type: object + properties: + init_dur: + type: string + max_dur: + type: string + max_retries: + type: number + monitoring_enabled: + items: + enum: + - logs + - metrics + - traces + type: string + maxItems: 3 + type: array + monitoring_http: + additionalProperties: false + type: object + properties: + buffer: + additionalProperties: false + type: object + properties: + enabled: + default: false + type: boolean + enabled: + type: boolean + host: + type: string + port: + maximum: 65353 + minimum: 0 + type: number + monitoring_output_id: + nullable: true + type: string + monitoring_pprof_enabled: + type: boolean + name: + minLength: 1 + type: string + namespace: + minLength: 1 + type: string + overrides: + additionalProperties: + nullable: true + description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + package_agent_version_conditions: + items: + additionalProperties: false + type: object + properties: + name: + type: string + title: + type: string + version_condition: + type: string + required: + - name + - title + - version_condition + maxItems: 1000 + nullable: true + type: array + required_versions: + items: + additionalProperties: false + type: object + properties: + percentage: + description: Target percentage of agents to auto upgrade + maximum: 100 + minimum: 0 + type: number + version: + description: Target version for automatic agent upgrade + type: string + required: + - version + - percentage + maxItems: 100 + nullable: true + type: array + space_ids: + items: + type: string + maxItems: 100 + type: array + supports_agentless: + default: false + deprecated: true + description: Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API. + nullable: true + type: boolean + unenroll_timeout: + minimum: 0 + type: number + required: + - name + - namespace + title: new_agent_policy + type: object + Kibana_HTTP_APIs_new_enrollment_api_key: + additionalProperties: false + properties: + expiration: + type: string + name: + type: string + policy_id: + type: string + required: + - policy_id + title: new_enrollment_api_key + type: object Kibana_HTTP_APIs_new_maintenance_window: additionalProperties: false properties: @@ -115391,197 +103021,954 @@ components: type: string required: - name - - type - - hosts - title: output_logstash + - type + - hosts + title: output_logstash + type: object + Kibana_HTTP_APIs_output_remote_elasticsearch: + additionalProperties: true + properties: + allow_edit: + items: + type: string + maxItems: 1000 + type: array + ca_sha256: + nullable: true + type: string + ca_trusted_fingerprint: + nullable: true + type: string + config_yaml: + nullable: true + type: string + hosts: + items: + format: uri + type: string + maxItems: 10 + minItems: 1 + type: array + id: + type: string + is_default: + default: false + type: boolean + is_default_monitoring: + default: false + type: boolean + is_internal: + type: boolean + is_preconfigured: + type: boolean + kibana_api_key: + nullable: true + type: string + kibana_url: + nullable: true + type: string + name: + type: string + otel_disable_beatsauth: + nullable: true + type: boolean + otel_exporter_config_yaml: + nullable: true + type: string + preset: + enum: + - balanced + - custom + - throughput + - scale + - latency + type: string + proxy_id: + nullable: true + type: string + secrets: + additionalProperties: true + type: object + properties: + service_token: + anyOf: + - additionalProperties: true + type: object + properties: + hash: + type: string + id: + type: string + required: + - id + - type: string + ssl: + additionalProperties: true + type: object + properties: + key: + anyOf: + - additionalProperties: true + type: object + properties: + hash: + type: string + id: + type: string + required: + - id + - type: string + service_token: + nullable: true + type: string + shipper: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_shipper' + nullable: true + ssl: + allOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_ssl' + nullable: true + sync_integrations: + type: boolean + sync_uninstalled_integrations: + type: boolean + type: + enum: + - remote_elasticsearch + type: string + write_to_logs_streams: + nullable: true + type: boolean + required: + - name + - type + - hosts + title: output_remote_elasticsearch + type: object + Kibana_HTTP_APIs_output_shipper: + additionalProperties: true + properties: + compression_level: + nullable: true + type: number + disk_queue_compression_enabled: + nullable: true + type: boolean + disk_queue_enabled: + default: false + nullable: true + type: boolean + disk_queue_encryption_enabled: + nullable: true + type: boolean + disk_queue_max_size: + nullable: true + type: number + disk_queue_path: + nullable: true + type: string + loadbalance: + nullable: true + type: boolean + max_batch_bytes: + nullable: true + type: number + mem_queue_events: + nullable: true + type: number + queue_flush_timeout: + nullable: true + type: number + required: + - disk_queue_path + - disk_queue_max_size + - disk_queue_encryption_enabled + - disk_queue_compression_enabled + - compression_level + - loadbalance + - mem_queue_events + - queue_flush_timeout + - max_batch_bytes + title: output_shipper + type: object + Kibana_HTTP_APIs_output_ssl: + additionalProperties: true + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + maxItems: 10 + type: array + key: + type: string + verification_mode: + enum: + - full + - none + - certificate + - strict + type: string + title: output_ssl + type: object + Kibana_HTTP_APIs_package_icon: + additionalProperties: false + properties: + dark_mode: + type: boolean + path: + type: string + size: + type: string + src: + type: string + title: + type: string + type: + type: string + required: + - src + title: package_icon + type: object + Kibana_HTTP_APIs_package_list_item: + additionalProperties: true + properties: + categories: + items: + type: string + maxItems: 100 + type: array + conditions: + additionalProperties: true + type: object + properties: + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + elastic: + additionalProperties: true + type: object + properties: + capabilities: + items: + type: string + maxItems: 10 + type: array + subscription: + type: string + kibana: + additionalProperties: true + type: object + properties: + version: + type: string + data_streams: + items: + additionalProperties: + nullable: true + type: object + maxItems: 1000 + type: array + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + description: + type: string + discovery: + additionalProperties: true + type: object + properties: + datasets: + items: + additionalProperties: true + type: object + properties: + name: + type: string + required: + - name + maxItems: 100 + type: array + fields: + items: + additionalProperties: true + type: object + properties: + name: + type: string + required: + - name + maxItems: 100 + type: array + download: + type: string + format_version: + type: string + icons: + items: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_icon' + maxItems: 100 + type: array + id: + type: string + installationInfo: + $ref: '#/components/schemas/Kibana_HTTP_APIs_installation_info' + integration: + type: string + internal: + type: boolean + latestVersion: + type: string + name: + type: string + owner: + additionalProperties: true + type: object + properties: + github: + type: string + type: + enum: + - elastic + - partner + - community + type: string + path: + type: string + policy_templates: + items: + additionalProperties: + nullable: true + type: object + maxItems: 1000 + type: array + readme: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + signature_path: + type: string + source: + additionalProperties: true + type: object + properties: + license: + type: string + required: + - license + status: + type: string + title: + type: string + type: + anyOf: + - enum: + - integration + type: string + - enum: + - input + type: string + - enum: + - content + type: string + - type: string + var_groups: + items: + additionalProperties: true + type: object + properties: + description: + type: string + name: + type: string + options: + items: + additionalProperties: true + type: object + properties: + description: + type: string + hide_in_deployment_modes: + items: + enum: + - default + - agentless + type: string + maxItems: 2 + type: array + name: + type: string + title: + type: string + vars: + items: + type: string + maxItems: 100 + type: array + required: + - name + - title + - vars + maxItems: 100 + type: array + selector_title: + type: string + title: + type: string + required: + - name + - title + - selector_title + - options + maxItems: 100 + type: array + vars: + items: + additionalProperties: + nullable: true + type: object + maxItems: 1000 + type: array + version: + type: string + required: + - name + - version + - title + - id + title: package_list_item + type: object + Kibana_HTTP_APIs_package_metadata: + additionalProperties: false + properties: + has_policies: + type: boolean + required: + - has_policies + title: package_metadata + type: object + Kibana_HTTP_APIs_package_policy_package: + additionalProperties: false + properties: + experimental_data_stream_features: + items: + additionalProperties: false + type: object + properties: + data_stream: + type: string + features: + additionalProperties: false + type: object + properties: + doc_value_only_numeric: + type: boolean + doc_value_only_other: + type: boolean + synthetic_source: + type: boolean + tsdb: + type: boolean + required: + - data_stream + - features + maxItems: 100 + type: array + fips_compatible: + type: boolean + name: + description: Package name + type: string + requires_root: + type: boolean + title: + type: string + version: + description: Package version + type: string + required: + - name + - version + title: package_policy_package type: object - Kibana_HTTP_APIs_output_remote_elasticsearch: - additionalProperties: true + Kibana_HTTP_APIs_package_policy_response: + additionalProperties: false properties: - allow_edit: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. items: type: string maxItems: 1000 - type: array - ca_sha256: nullable: true - type: string - ca_trusted_fingerprint: - nullable: true - type: string - config_yaml: - nullable: true - type: string - hosts: - items: - format: uri - type: string - maxItems: 10 - minItems: 1 type: array - id: - type: string - is_default: - default: false - type: boolean - is_default_monitoring: - default: false - type: boolean - is_internal: - type: boolean - is_preconfigured: - type: boolean - kibana_api_key: + agents: + type: number + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. nullable: true type: string - kibana_url: + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 nullable: true type: string - name: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' type: string - otel_disable_beatsauth: - nullable: true - type: boolean - otel_exporter_config_yaml: - nullable: true + created_at: type: string - preset: - enum: - - balanced - - custom - - throughput - - scale - - latency + created_by: type: string - proxy_id: - nullable: true + description: + description: Package policy description type: string - secrets: + elasticsearch: additionalProperties: true type: object properties: - service_token: - anyOf: - - additionalProperties: true - type: object - properties: - hash: - type: string - id: - type: string - required: - - id - - type: string - ssl: + privileges: additionalProperties: true type: object properties: - key: - anyOf: - - additionalProperties: true + cluster: + items: + type: string + maxItems: 100 + type: array + enabled: + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + nullable: true + type: array + id: + type: string + inputs: + anyOf: + - items: + additionalProperties: false + type: object + properties: + compiled_input: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + config: + additionalProperties: + additionalProperties: false type: object properties: - hash: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + name: + type: string + policy_template: + type: string + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: + additionalProperties: false + type: object + properties: + dataset: + type: string + elasticsearch: + additionalProperties: false + type: object + properties: + dynamic_dataset: + type: boolean + dynamic_namespace: + type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string + required: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean id: type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - enabled + - data_stream + - compiled_stream + maxItems: 1000 + type: array + type: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true required: - - id - - type: string - service_token: - nullable: true + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - type + - enabled + - streams + - compiled_input + maxItems: 100 + type: array + - additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that input. Defaults to `true` (enabled). + type: boolean + streams: + additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that stream. Defaults to `true` (enabled). + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Input streams. Refer to the integration documentation to know which streams are available. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package policy inputs. Refer to the integration documentation to know which inputs are available. + type: object + description: Package policy inputs. + is_managed: + type: boolean + name: + description: Unique name for the package policy. type: string - shipper: - allOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_shipper' - nullable: true - ssl: - allOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_output_ssl' + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: nullable: true - sync_integrations: - type: boolean - sync_uninstalled_integrations: - type: boolean - type: - enum: - - remote_elasticsearch type: string - write_to_logs_streams: + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. nullable: true - type: boolean - required: - - name - - type - - hosts - title: output_remote_elasticsearch - type: object - Kibana_HTTP_APIs_output_shipper: - additionalProperties: true - properties: - compression_level: + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + revision: + description: Package policy revision. type: number - disk_queue_compression_enabled: - nullable: true - type: boolean - disk_queue_enabled: + secret_references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + required: + - id + maxItems: 1000 + type: array + spaceIds: + items: + type: string + maxItems: 100 + type: array + supports_agentless: default: false + description: Indicates whether the package policy belongs to an agentless agent policy. nullable: true type: boolean - disk_queue_encryption_enabled: + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. nullable: true type: boolean - disk_queue_max_size: - nullable: true - type: number - disk_queue_path: - nullable: true + updated_at: + type: string + updated_by: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + anyOf: + - additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + - additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package level variable. + version: + description: Package policy ES version. type: string - loadbalance: - nullable: true - type: boolean - max_batch_bytes: - nullable: true - type: number - mem_queue_events: - nullable: true - type: number - queue_flush_timeout: - nullable: true - type: number required: - - disk_queue_path - - disk_queue_max_size - - disk_queue_encryption_enabled - - disk_queue_compression_enabled - - compression_level - - loadbalance - - mem_queue_events - - queue_flush_timeout - - max_batch_bytes - title: output_shipper + - name + - enabled + - inputs + - revision + - updated_at + - updated_by + - created_at + - created_by + title: package_policy_response type: object - Kibana_HTTP_APIs_output_ssl: - additionalProperties: true + Kibana_HTTP_APIs_package_policy_status_response: + additionalProperties: false properties: - certificate: - type: string - certificate_authorities: - items: - type: string - maxItems: 10 - type: array - key: + body: + additionalProperties: false + type: object + properties: + message: + type: string + required: + - message + id: type: string - verification_mode: - enum: - - full - - none - - certificate - - strict + name: type: string - title: output_ssl + statusCode: + type: number + success: + type: boolean + required: + - id + - success + title: package_policy_status_response type: object Kibana_HTTP_APIs_percentileOperation: additionalProperties: false @@ -116951,6 +105338,24 @@ components: - ranges title: Ranges Operation type: object + Kibana_HTTP_APIs_reauthorize_transform_request: + additionalProperties: false + properties: + transforms: + items: + additionalProperties: false + type: object + properties: + transformId: + type: string + required: + - transformId + maxItems: 1000 + type: array + required: + - transforms + title: reauthorize_transform_request + type: object Kibana_HTTP_APIs_RecursiveRecord: additionalProperties: anyOf: @@ -117573,6 +105978,43 @@ components: - fields title: Terms Operation type: object + Kibana_HTTP_APIs_review_upgrade_request: + additionalProperties: false + properties: + action: + enum: + - accept + - decline + - pending + type: string + target_version: + type: string + required: + - action + - target_version + title: review_upgrade_request + type: object + Kibana_HTTP_APIs_review_upgrade_response: + additionalProperties: false + properties: + success: + type: boolean + required: + - success + title: review_upgrade_response + type: object + Kibana_HTTP_APIs_rollback_package_response: + additionalProperties: false + properties: + success: + type: boolean + version: + type: string + required: + - version + - success + title: rollback_package_response + type: object Kibana_HTTP_APIs_rule_flapping: additionalProperties: false description: When flapping detection is turned on, alerts that switch quickly between active and recovered states are identified as “flapping” and notifications are reduced. @@ -118454,6 +106896,206 @@ components: - roles title: security_roles_bulk_create_or_update_payload type: object + Kibana_HTTP_APIs_simplified_create_package_policy_request: + additionalProperties: false + properties: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. + items: + type: string + maxItems: 100 + nullable: true + type: array + cloud_connector: + additionalProperties: false + type: object + properties: + cloud_connector_id: + description: ID of an existing cloud connector to reuse. If not provided, a new connector will be created. + type: string + enabled: + default: false + description: Whether cloud connectors are enabled for this policy. + type: boolean + name: + description: Optional name for the cloud connector. If not provided, will be auto-generated from credentials. + maxLength: 255 + minLength: 1 + type: string + target_csp: + description: Target cloud service provider. If not provided, will be auto-detected from inputs. + enum: + - aws + - azure + - gcp + type: string + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' + type: string + description: + description: Policy description. + type: string + force: + description: Force package policy creation even if the package is not verified, or if the agent policy is managed. + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + type: array + id: + description: Policy unique identifier. + type: string + inputs: + additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that input. Defaults to `true` (enabled). + type: boolean + streams: + additionalProperties: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + description: Enable or disable that stream. Defaults to `true` (enabled). + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Input streams. Refer to the integration documentation to know which streams are available. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + description: Package policy inputs. Refer to the integration documentation to know which inputs are available. + type: object + name: + description: Unique name for the policy. + type: string + namespace: + description: Policy namespace. When not specified, it inherits the agent policy namespace. + type: string + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + policy_template: + description: The policy template to use for the agentless package policy. If not provided, the default policy template will be used. + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + - items: + type: string + maxItems: 100 + type: array + - items: + type: number + maxItems: 100 + type: array + - additionalProperties: false + type: object + properties: + id: + type: string + isSecretRef: + type: boolean + required: + - id + - isSecretRef + nullable: true + description: Input/stream level variable. Refer to the integration documentation for more information. + type: object + required: + - name + - package + title: simplified_create_package_policy_request + type: object Kibana_HTTP_APIs_slo-alerts-embeddable: additionalProperties: false description: SLO Alerts embeddable schema @@ -123089,6 +111731,309 @@ components: type: boolean title: update_output_remote_elasticsearch type: object + Kibana_HTTP_APIs_update_package_policy_request: + additionalProperties: false + properties: + additional_datastreams_permissions: + description: Additional data stream permissions that will be added to the agent policy. + items: + type: string + maxItems: 1000 + nullable: true + type: array + cloud_connector_id: + description: ID of the cloud connector associated with this package policy. + nullable: true + type: string + cloud_connector_name: + description: Transient field for cloud connector name during creation. + maxLength: 255 + minLength: 1 + nullable: true + type: string + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.' + type: string + description: + description: Package policy description + type: string + enabled: + type: boolean + force: + type: boolean + global_data_tags: + items: + additionalProperties: false + type: object + properties: + name: + description: The name of the custom field. Cannot contain spaces. + type: string + value: + anyOf: + - type: string + - type: number + description: The value of the custom field. + required: + - name + - value + maxItems: 100 + nullable: true + type: array + inputs: + items: + additionalProperties: false + type: object + properties: + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this input.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + name: + type: string + policy_template: + type: string + streams: + items: + additionalProperties: false + type: object + properties: + compiled_stream: + nullable: true + condition: + description: '**Experimental.** Agent condition expression to evaluate whether to apply this stream.' + type: string + config: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + data_stream: + additionalProperties: false + type: object + properties: + dataset: + type: string + elasticsearch: + additionalProperties: false + type: object + properties: + dynamic_dataset: + type: boolean + dynamic_namespace: + type: boolean + privileges: + additionalProperties: false + type: object + properties: + indices: + items: + type: string + maxItems: 100 + type: array + type: + type: string + required: + - dataset + deprecated: + $ref: '#/components/schemas/Kibana_HTTP_APIs_deprecation_info' + enabled: + type: boolean + id: + type: string + keep_enabled: + type: boolean + migrate_from: + type: string + release: + enum: + - ga + - beta + - experimental + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - enabled + - data_stream + - compiled_stream + maxItems: 1000 + type: array + type: + type: string + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + required: + - type + - enabled + maxItems: 1000 + type: array + is_managed: + type: boolean + name: + type: string + namespace: + description: The package policy namespace. Leave blank to inherit the agent policy's namespace. + type: string + output_id: + nullable: true + type: string + overrides: + additionalProperties: false + description: Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + properties: + inputs: + additionalProperties: + nullable: true + type: object + package: + $ref: '#/components/schemas/Kibana_HTTP_APIs_package_policy_package' + package_agent_version_condition: + type: string + policy_id: + deprecated: true + description: ID of the agent policy which the package policy will be added to. + nullable: true + type: string + policy_ids: + items: + description: IDs of the agent policies that the package policy will be added to. + type: string + maxItems: 1000 + type: array + spaceIds: + items: + type: string + maxItems: 100 + type: array + supports_agentless: + default: false + description: Indicates whether the package policy belongs to an agentless agent policy. + nullable: true + type: boolean + supports_cloud_connector: + default: false + description: Indicates whether the package policy supports cloud connectors. + nullable: true + type: boolean + var_group_selections: + additionalProperties: + type: string + description: Variable group selections. Maps var_group name to the selected option name within that group. + type: object + vars: + additionalProperties: + additionalProperties: false + type: object + properties: + frozen: + type: boolean + type: + type: string + value: + nullable: true + required: + - value + description: Package variable (see integration documentation for more information) + type: object + version: + type: string + title: update_package_policy_request + type: object + Kibana_HTTP_APIs_update_package_request: + additionalProperties: false + properties: + keepPoliciesUpToDate: + type: boolean + namespace_customization_enabled_for: + description: Namespaces for which namespace-level customization is enabled on this package. + items: + type: string + maxItems: 100 + type: array + title: update_package_request + type: object + Kibana_HTTP_APIs_update_package_response: + additionalProperties: false + properties: + item: + $ref: '#/components/schemas/Kibana_HTTP_APIs_get_package_info' + required: + - item + title: update_package_response + type: object Kibana_HTTP_APIs_update_rule: additionalProperties: false properties: @@ -123275,6 +112220,18 @@ components: - throttle title: update_rule_action_frequency type: object + Kibana_HTTP_APIs_upgrade_package_policies_request: + additionalProperties: false + properties: + packagePolicyIds: + items: + type: string + maxItems: 1000 + type: array + required: + - packagePolicyIds + title: upgrade_package_policies_request + type: object Kibana_HTTP_APIs_valueDisplay: additionalProperties: false description: Configure the visibility and the format of the values rendered on each chart partition section diff --git a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts index 77f4b1febd2e3..d0d7c8e0dab1a 100644 --- a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts +++ b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts @@ -105,12 +105,12 @@ describe('checking migration metadata changes on all registered SO types', () => "file": "5d2da4f1b03f551745b938f4e71b3d328bb65d3ff5ed89ae42a66240fa358346", "file-upload-usage-collection-telemetry": "d6d7e6f366e33ec93a4996229e44d32aea97e04f696259b9915c0d21001ff698", "fileShare": "5f3b4cb0a3aa1d3b03f31b2f0741baa548068f2ec478b8632ef4f02cb65f2b75", - "fleet-agent-policies": "0afcc3826e53382b6b0cf9c1ae6013666508d85647a997ffb0fc561bcf5d8087", + "fleet-agent-policies": "ecb6e5990c46caf46dc7e8323e3f4a5a772cf4d0a3e4e0f148d40e44a7054114", "fleet-cloud-connector": "d7ca8a3de46fc3bc440514943649cb14af6d111b7f490b18f8e34e444b4ed3fa", "fleet-cloud-onboarding-deployment": "bad508764b7eaada2556e13153679953736c68e190110e281b9a7d52c7d10bc2", "fleet-fleet-server-host": "edbc06c4a73586e7820549ab481244989af89ba9191b002cce97d0843a01008e", "fleet-message-signing-keys": "67aecd34e081183b2a99cc1451583977e4ad918074dc5b1579cc4b23750d3829", - "fleet-package-policies": "04d5e251e1b1e0453a1ab91f7776527512d55af5609c612f3fbef3e832cb27ed", + "fleet-package-policies": "5c5d0debdefd5322af7015fd582b5141742e36f6b2a00be58155e25c8f8241b6", "fleet-preconfiguration-deletion-record": "1154f80d0ef53014ea52c7642131e31365f86909e93b265e7f38c2c317c645cf", "fleet-proxy": "b38a96aa9da6664ff35cd67c4470e0280dbd4b07e8d063a71d6e97dc077d9be4", "fleet-setup-lock": "df3c142ba8907c8ccf004d2240c79d476a70946db092ab4c485d3eb1a3f5bb82", @@ -123,10 +123,10 @@ describe('checking migration metadata changes on all registered SO types', () => "infra-custom-dashboards": "1287737d9b23b8559bf442dafe4275039c5a44969421c5d25b3f1ee60b030d5b", "infrastructure-monitoring-log-view": "a15ae1d2c400f2ea175cd407705dccd85178f9db82def8137b24c4ee4a489ae9", "infrastructure-ui-source": "498c2ba7abd4329a0d8b40efd98b4b16991107512d38141707f9f2e10521b367", - "ingest-agent-policies": "cab3f6654c1f88ce32182a99d996ef2902ea1157cb6a029bf82b9f227cf547a1", + "ingest-agent-policies": "1966acba3d49b5057979b1c8518e359be28e7f21450f75a6ad9246dc334f5f95", "ingest-download-sources": "c87e062ef293585e85fccec0c865d7cef48e0ff9a919d7781d5f7627d275484b", "ingest-outputs": "b377c664edc65976f10f339f4b26271b2d238df90f7c5dd126b0c825926486b9", - "ingest-package-policies": "cb0d8ad6bdfe0c5dec513250f604a74d79d06232d4b1ab873cd26cca1a57197e", + "ingest-package-policies": "958b60978741bf0f2755dbacd44b4aa9a31d3e5b483872fa1f500722b79b30d5", "ingest_manager_settings": "d7f88bef81425b890d9d277acd01423556e804269c9e405aeced2629b55695b4", "integration-config": "8fecaf29e55097075e6d8927bf8353ca3cfa8bc9e352389411da05b31ae704e0", "intercept_interaction_record": "d7cb1aad5a2e5f459aa1fea81337ab206987845814dc14f151645d3be13cb293", @@ -735,10 +735,10 @@ describe('checking migration metadata changes on all registered SO types', () => "fleet-agent-policies|global: 21f06d2abf533c0fb63934a6229bd7b0ce7ed97b", "fleet-agent-policies|mappings: 7a6aef21c517facd41e5df4c7fa7f66d1ef68829", "fleet-agent-policies|schemas: da39a3ee5e6b4b0d3255bfef95601890afd80709", - "fleet-agent-policies|10.6.0: 153249e09dcbaed854657aeecffe317f2f0b1661d38054454707c7454c830b50", - "fleet-agent-policies|10.5.0: 2f09dc81c8398b0e02589491da420a0a5f159001cc5427ec754ce9f0d788cb4b", - "fleet-agent-policies|10.4.0: 4d8f31802678cc675f596f4ac3f9f50e6691dbce1c5b7c7a9d84c436775d57ed", - "fleet-agent-policies|10.3.0: f45d663cb22d804a33eb71c380faf44efbbfa0ca92cd8aa0c62fcae92919080c", + "fleet-agent-policies|10.6.0: 5fa3667a0a1e89df4d1c7580d12df95436a3fc66b452d1a023c8d0556c6c51b7", + "fleet-agent-policies|10.5.0: 3499a78b02a6673e934b0384511550e61fd215ed71613dc194936424b4395682", + "fleet-agent-policies|10.4.0: 81bcc7106027cc8a1ad698984e2600504983662db6fe948664f5c39bc76ae8a9", + "fleet-agent-policies|10.3.0: a4b4f6078a638dffd52c7cf7499508da1222d2e4ce9717b52f6248ce07dee499", "fleet-agent-policies|10.2.0: b0042f8a6c0373d27acc94bb2ddc913c1d2f8847961d8b75b0c99b2b4ce71b2c", "fleet-agent-policies|10.1.0: 7fce3be244f92bb99b17c8757c39a49aec078ff90cae70971e42e202a574348c", "=============================================================================================", @@ -768,8 +768,8 @@ describe('checking migration metadata changes on all registered SO types', () => "fleet-package-policies|global: b8c5158782fe91d5a5636274dee693a6fef2e457", "fleet-package-policies|mappings: fb3acda96f9119aa483b39736c9a07da565b8489", "fleet-package-policies|schemas: da39a3ee5e6b4b0d3255bfef95601890afd80709", - "fleet-package-policies|10.9.0: 89356f02be60fa90201796fb74afd808b4b60d5b20ef15568988a91e5304555b", - "fleet-package-policies|10.8.0: 63afabdb9ed904ad1240d75a808166a98bc23ca9c36851e2262b4507bfa5513e", + "fleet-package-policies|10.9.0: 00464256f3d400ef3382cc3696c29a16f5df01bdc41c01f0440f6a1ad8f5097b", + "fleet-package-policies|10.8.0: 5f4fbabdb466e88079735c9284de829636999e37e125f808d43eb4807a9cefa1", "fleet-package-policies|10.7.0: 175fe637899f2c70d1c5e2b2dbe459962d4b7048367b9930d393f280222093cf", "fleet-package-policies|10.6.0: ef0c3e9699868aa625f197708fda2114eac175a8d3c0f2984634102adf61cb15", "fleet-package-policies|10.5.0: d60de40b75a31ee199487f5a53329033afbfc78767c42d16d987e95173df9516", @@ -846,10 +846,10 @@ describe('checking migration metadata changes on all registered SO types', () => "ingest-agent-policies|global: c3b43ce09de4bc7883a7ef73aec64d7d679b28d2", "ingest-agent-policies|mappings: ebeefa360c807146ea4645800fedad0869063ac1", "ingest-agent-policies|schemas: da39a3ee5e6b4b0d3255bfef95601890afd80709", - "ingest-agent-policies|10.11.0: 153249e09dcbaed854657aeecffe317f2f0b1661d38054454707c7454c830b50", - "ingest-agent-policies|10.10.0: 2f09dc81c8398b0e02589491da420a0a5f159001cc5427ec754ce9f0d788cb4b", - "ingest-agent-policies|10.9.0: 4d8f31802678cc675f596f4ac3f9f50e6691dbce1c5b7c7a9d84c436775d57ed", - "ingest-agent-policies|10.8.0: f45d663cb22d804a33eb71c380faf44efbbfa0ca92cd8aa0c62fcae92919080c", + "ingest-agent-policies|10.11.0: 5fa3667a0a1e89df4d1c7580d12df95436a3fc66b452d1a023c8d0556c6c51b7", + "ingest-agent-policies|10.10.0: 3499a78b02a6673e934b0384511550e61fd215ed71613dc194936424b4395682", + "ingest-agent-policies|10.9.0: 81bcc7106027cc8a1ad698984e2600504983662db6fe948664f5c39bc76ae8a9", + "ingest-agent-policies|10.8.0: a4b4f6078a638dffd52c7cf7499508da1222d2e4ce9717b52f6248ce07dee499", "ingest-agent-policies|10.7.0: b0042f8a6c0373d27acc94bb2ddc913c1d2f8847961d8b75b0c99b2b4ce71b2c", "ingest-agent-policies|10.6.0: 5cb51278f489660ab671e971b91569729d498aae1feaceeca2c2f57c93246b65", "ingest-agent-policies|10.5.0: 7fce3be244f92bb99b17c8757c39a49aec078ff90cae70971e42e202a574348c", @@ -887,8 +887,8 @@ describe('checking migration metadata changes on all registered SO types', () => "ingest-package-policies|global: a89e06415e12609fa3575379d06ab1b542da6f04", "ingest-package-policies|mappings: fb3acda96f9119aa483b39736c9a07da565b8489", "ingest-package-policies|schemas: da39a3ee5e6b4b0d3255bfef95601890afd80709", - "ingest-package-policies|10.23.0: 35593d9ec9def3cd57253e632160ac7f5b2390ad4bb1f0687b1a8a5d526b5205", - "ingest-package-policies|10.22.0: 63afabdb9ed904ad1240d75a808166a98bc23ca9c36851e2262b4507bfa5513e", + "ingest-package-policies|10.23.0: 2566b4db65ac68fd79020b74783d69695448b680de2d22546ae04ad6aba16b94", + "ingest-package-policies|10.22.0: 5f4fbabdb466e88079735c9284de829636999e37e125f808d43eb4807a9cefa1", "ingest-package-policies|10.21.0: 175fe637899f2c70d1c5e2b2dbe459962d4b7048367b9930d393f280222093cf", "ingest-package-policies|10.20.0: 522700650b5a10db91d2337e8b82582841a3884049e40c20525aed0a1e1f475e", "ingest-package-policies|10.19.0: d60de40b75a31ee199487f5a53329033afbfc78767c42d16d987e95173df9516", diff --git a/x-pack/platform/plugins/shared/fleet/common/types/models/package_policy_schema.ts b/x-pack/platform/plugins/shared/fleet/common/types/models/package_policy_schema.ts index 3cd5e292438a2..d2be09b7aa12d 100644 --- a/x-pack/platform/plugins/shared/fleet/common/types/models/package_policy_schema.ts +++ b/x-pack/platform/plugins/shared/fleet/common/types/models/package_policy_schema.ts @@ -46,22 +46,25 @@ export const VarGroupSelectionsSchema = schema.maybe( }) ); -export const DeprecationInfoSchema = schema.object({ - description: schema.string(), - since: schema.maybe(schema.string()), - replaced_by: schema.maybe( - schema.recordOf( - schema.oneOf([ - schema.literal('package'), - schema.literal('policyTemplate'), - schema.literal('input'), - schema.literal('dataStream'), - schema.literal('variable'), - ]), - schema.string() - ) - ), -}); +export const DeprecationInfoSchema = schema.object( + { + description: schema.string(), + since: schema.maybe(schema.string()), + replaced_by: schema.maybe( + schema.recordOf( + schema.oneOf([ + schema.literal('package'), + schema.literal('policyTemplate'), + schema.literal('input'), + schema.literal('dataStream'), + schema.literal('variable'), + ]), + schema.string() + ) + ), + }, + { meta: { id: 'deprecation_info' } } +); const PackagePolicyStreamsSchema = { id: schema.maybe(schema.string()), // BWC < 7.11 @@ -137,22 +140,25 @@ export const ExperimentalDataStreamFeaturesSchema = schema.arrayOf( { maxSize: 100 } ); -export const PackagePolicyPackageSchema = schema.object({ - name: schema.string({ - meta: { - description: 'Package name', - }, - }), - title: schema.maybe(schema.string()), - version: schema.string({ - meta: { - description: 'Package version', - }, - }), - experimental_data_stream_features: schema.maybe(ExperimentalDataStreamFeaturesSchema), - requires_root: schema.maybe(schema.boolean()), - fips_compatible: schema.maybe(schema.boolean()), -}); +export const PackagePolicyPackageSchema = schema.object( + { + name: schema.string({ + meta: { + description: 'Package name', + }, + }), + title: schema.maybe(schema.string()), + version: schema.string({ + meta: { + description: 'Package version', + }, + }), + experimental_data_stream_features: schema.maybe(ExperimentalDataStreamFeaturesSchema), + requires_root: schema.maybe(schema.boolean()), + fips_compatible: schema.maybe(schema.boolean()), + }, + { meta: { id: 'package_policy_package' } } +); export const PackagePolicyBaseSchema = { name: schema.string({ @@ -183,7 +189,7 @@ export const PackagePolicyBaseSchema = { schema.arrayOf( schema.string({ meta: { - description: 'IDs of the agent policies which that package policy will be added to.', + description: 'IDs of the agent policies that the package policy will be added to.', }, }), { @@ -274,7 +280,7 @@ export const PackagePolicyBaseSchema = { schema.arrayOf(schema.string(), { validate: validateAdditionalDatastreamsPermissions, meta: { - description: 'Additional datastream permissions, that will be added to the agent policy.', + description: 'Additional data stream permissions that will be added to the agent policy.', }, maxSize: 1000, }), @@ -309,11 +315,14 @@ export const PackagePolicyBaseSchema = { ), }; -export const NewPackagePolicySchema = schema.object({ - ...PackagePolicyBaseSchema, - id: schema.maybe(schema.string()), - force: schema.maybe(schema.boolean()), -}); +export const NewPackagePolicySchema = schema.object( + { + ...PackagePolicyBaseSchema, + id: schema.maybe(schema.string()), + force: schema.maybe(schema.boolean()), + }, + { meta: { id: 'new_package_policy' } } +); /** * Snapshot of the package policy SO schema as of model version 10.22.0. @@ -329,7 +338,7 @@ export const PackagePolicySchemaV22 = NewPackagePolicySchema.extends( global_data_tags: undefined, condition: undefined, }, - { unknowns: 'ignore' } + { unknowns: 'ignore', meta: { id: 'package_policy_v22' } } ); /** @@ -342,7 +351,7 @@ export const PackagePolicySchemaV23 = PackagePolicySchemaV22.extends( { global_data_tags: NewPackagePolicySchema.getPropSchemas().global_data_tags, }, - { unknowns: 'ignore' } + { unknowns: 'ignore', meta: { id: 'package_policy_v23' } } ); /** @@ -354,7 +363,7 @@ export const PackagePolicySchemaV24 = PackagePolicySchemaV23.extends( { condition: NewPackagePolicySchema.getPropSchemas().condition, }, - { unknowns: 'ignore' } + { unknowns: 'ignore', meta: { id: 'package_policy_v24' } } ); const CreatePackagePolicyProps = { @@ -373,37 +382,40 @@ const CreatePackagePolicyProps = { spaceIds: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), }; -export const CreatePackagePolicyRequestBodySchema = schema.object({ - ...CreatePackagePolicyProps, - id: schema.maybe( - schema.string({ - meta: { - description: 'Package policy unique identifier', - }, - }) - ), - force: schema.maybe( - schema.boolean({ - meta: { - description: - 'Force package policy creation even if the package is not verified, or if the agent policy is managed.', - }, - }) - ), - // supports_agentless is deprecated for package policy creation in favor of agentless policies API - supports_agentless: schema.maybe( - schema.nullable( +export const CreatePackagePolicyRequestBodySchema = schema.object( + { + ...CreatePackagePolicyProps, + id: schema.maybe( + schema.string({ + meta: { + description: 'Package policy unique identifier', + }, + }) + ), + force: schema.maybe( schema.boolean({ - defaultValue: false, meta: { description: - 'Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API.', - deprecated: true, + 'Force package policy creation even if the package is not verified, or if the agent policy is managed.', }, }) - ) - ), -}); + ), + // supports_agentless is deprecated for package policy creation in favor of agentless policies API + supports_agentless: schema.maybe( + schema.nullable( + schema.boolean({ + defaultValue: false, + meta: { + description: + 'Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API.', + deprecated: true, + }, + }) + ) + ), + }, + { meta: { id: 'create_package_policy_request' } } +); export const SimplifiedVarsSchema = schema.recordOf( schema.string(), @@ -502,230 +514,254 @@ function validateAdditionalDatastreamsPermissions(values: string[]) { } } -export const SimplifiedPackagePolicyBaseSchema = schema.object({ - id: schema.maybe( - schema.string({ - meta: { - description: 'Policy unique identifier.', - }, - }) - ), - name: schema.string({ - meta: { - description: 'Unique name for the policy.', - }, - }), - description: schema.maybe( - schema.string({ - meta: { - description: 'Policy description.', - }, - }) - ), - namespace: schema.maybe( - schema.string({ - meta: { - description: - 'Policy namespace. When not specified, it inherits the agent policy namespace.', - }, - }) - ), - output_id: schema.maybe(schema.oneOf([schema.literal(null), schema.string()])), - vars: schema.maybe(SimplifiedVarsSchema), - var_group_selections: VarGroupSelectionsSchema, - inputs: SimplifiedPackagePolicyInputsSchema, - supports_agentless: schema.maybe( - schema.nullable( - schema.boolean({ - defaultValue: false, +export const SimplifiedPackagePolicyBaseSchema = schema.object( + { + id: schema.maybe( + schema.string({ meta: { - description: 'Indicates whether the package policy belongs to an agentless agent policy.', + description: 'Policy unique identifier.', }, }) - ) - ), - additional_datastreams_permissions: schema.maybe( - schema.oneOf([ - schema.literal(null), - schema.arrayOf(schema.string(), { - validate: validateAdditionalDatastreamsPermissions, - meta: { - description: 'Additional datastream permissions, that will be added to the agent policy.', - }, - maxSize: 100, - }), - ]) - ), - condition: schema.maybe( - schema.string({ + ), + name: schema.string({ meta: { - description: - '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.', + description: 'Unique name for the policy.', }, - }) - ), -}); - -export const SimplifiedPackagePolicyPreconfiguredSchema = SimplifiedPackagePolicyBaseSchema.extends( - { - id: schema.string(), - package: schema.object({ - name: schema.string(), }), - } -); - -export const SimplifiedCreatePackagePolicyRequestBodySchema = - SimplifiedPackagePolicyBaseSchema.extends({ - policy_id: schema.maybe( - schema.oneOf([schema.literal(null), schema.string()], { - meta: { - description: 'Deprecated. Use policy_ids instead.', - deprecated: true, - }, - }) - ), - policy_ids: schema.maybe( - schema.arrayOf(schema.string(), { + description: schema.maybe( + schema.string({ meta: { - description: 'IDs of the agent policies which that package policy will be added to.', + description: 'Policy description.', }, - maxSize: MAX_REUSABLE_AGENT_POLICIES_PER_PACKAGE_POLICY, }) ), - force: schema.maybe( - schema.boolean({ + namespace: schema.maybe( + schema.string({ meta: { description: - 'Force package policy creation even if the package is not verified, or if the agent policy is managed.', + 'Policy namespace. When not specified, it inherits the agent policy namespace.', }, }) ), - package: PackagePolicyPackageSchema, - // supports_agentless is deprecated for package policy creation in favor of agentless policies API + output_id: schema.maybe(schema.oneOf([schema.literal(null), schema.string()])), + vars: schema.maybe(SimplifiedVarsSchema), + var_group_selections: VarGroupSelectionsSchema, + inputs: SimplifiedPackagePolicyInputsSchema, supports_agentless: schema.maybe( schema.nullable( schema.boolean({ defaultValue: false, meta: { description: - 'Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API.', - deprecated: true, + 'Indicates whether the package policy belongs to an agentless agent policy.', }, }) ) ), - }); - -export const UpdatePackagePolicyRequestBodySchema = schema.object({ - ...CreatePackagePolicyProps, - name: schema.maybe(schema.string()), - inputs: schema.maybe( - schema.arrayOf( - schema.object({ - ...PackagePolicyInputsSchema, - streams: schema.maybe( - schema.arrayOf(schema.object(PackagePolicyStreamsSchema), { maxSize: 1000 }) - ), - }), - { maxSize: 1000 } - ) - ), - version: schema.maybe(schema.string()), - force: schema.maybe(schema.boolean()), -}); + additional_datastreams_permissions: schema.maybe( + schema.oneOf([ + schema.literal(null), + schema.arrayOf(schema.string(), { + validate: validateAdditionalDatastreamsPermissions, + meta: { + description: + 'Additional data stream permissions that will be added to the agent policy.', + }, + maxSize: 100, + }), + ]) + ), + condition: schema.maybe( + schema.string({ + meta: { + description: + '**Experimental.** Agent condition expression to evaluate whether to apply this integration to its inputs.', + }, + }) + ), + }, + { meta: { id: 'simplified_package_policy_base' } } +); -export const UpdatePackagePolicySchema = schema.object({ - ...PackagePolicyBaseSchema, - version: schema.maybe(schema.string()), -}); +export const SimplifiedPackagePolicyPreconfiguredSchema = SimplifiedPackagePolicyBaseSchema.extends( + { + id: schema.string(), + package: schema.object({ + name: schema.string(), + }), + }, + { meta: { id: 'simplified_package_policy_preconfigured' } } +); -export const PackagePolicySchema = schema.object({ - ...PackagePolicyBaseSchema, - id: schema.string({ - meta: { - description: 'Package policy unique identifier.', +export const SimplifiedCreatePackagePolicyRequestBodySchema = + SimplifiedPackagePolicyBaseSchema.extends( + { + policy_id: schema.maybe( + schema.oneOf([schema.literal(null), schema.string()], { + meta: { + description: 'Deprecated. Use policy_ids instead.', + deprecated: true, + }, + }) + ), + policy_ids: schema.maybe( + schema.arrayOf(schema.string(), { + meta: { + description: 'IDs of the agent policies that the package policy will be added to.', + }, + maxSize: MAX_REUSABLE_AGENT_POLICIES_PER_PACKAGE_POLICY, + }) + ), + force: schema.maybe( + schema.boolean({ + meta: { + description: + 'Force package policy creation even if the package is not verified, or if the agent policy is managed.', + }, + }) + ), + package: PackagePolicyPackageSchema, + // supports_agentless is deprecated for package policy creation in favor of agentless policies API + supports_agentless: schema.maybe( + schema.nullable( + schema.boolean({ + defaultValue: false, + meta: { + description: + 'Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API.', + deprecated: true, + }, + }) + ) + ), }, - }), - version: schema.maybe( - schema.string({ + { meta: { id: 'simplified_create_package_policy_request' } } + ); + +export const UpdatePackagePolicyRequestBodySchema = schema.object( + { + ...CreatePackagePolicyProps, + name: schema.maybe(schema.string()), + inputs: schema.maybe( + schema.arrayOf( + schema.object({ + ...PackagePolicyInputsSchema, + streams: schema.maybe( + schema.arrayOf(schema.object(PackagePolicyStreamsSchema), { maxSize: 1000 }) + ), + }), + { maxSize: 1000 } + ) + ), + version: schema.maybe(schema.string()), + force: schema.maybe(schema.boolean()), + }, + { meta: { id: 'update_package_policy_request' } } +); + +export const UpdatePackagePolicySchema = schema.object( + { + ...PackagePolicyBaseSchema, + version: schema.maybe(schema.string()), + }, + { meta: { id: 'update_package_policy' } } +); + +export const PackagePolicySchema = schema.object( + { + ...PackagePolicyBaseSchema, + id: schema.string({ meta: { - description: 'Package policy ES version.', + description: 'Package policy unique identifier.', }, - }) - ), - revision: schema.number({ - meta: { - description: 'Package policy revision.', - }, - }), - updated_at: schema.string(), - updated_by: schema.string(), - created_at: schema.string(), - created_by: schema.string(), - elasticsearch: schema - .maybe( - schema.object({ - privileges: schema.maybe( - schema.object({ - cluster: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), - }) - ), - }) - ) - .extendsDeep({ - unknowns: 'allow', }), - inputs: schema.arrayOf( - schema.object({ - ...PackagePolicyInputsSchema, - compiled_input: schema.maybe(schema.any()), + version: schema.maybe( + schema.string({ + meta: { + description: 'Package policy ES version.', + }, + }) + ), + revision: schema.number({ + meta: { + description: 'Package policy revision.', + }, }), - { maxSize: 100 } - ), - secret_references: schema.maybe( - schema.arrayOf( + updated_at: schema.string(), + updated_by: schema.string(), + created_at: schema.string(), + created_by: schema.string(), + elasticsearch: schema + .maybe( + schema.object({ + privileges: schema.maybe( + schema.object({ + cluster: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), + }) + ), + }) + ) + .extendsDeep({ + unknowns: 'allow', + }), + inputs: schema.arrayOf( schema.object({ - id: schema.string(), + ...PackagePolicyInputsSchema, + compiled_input: schema.maybe(schema.any()), }), - { maxSize: 1000 } - ) - ), -}); - -export const PackagePolicyResponseSchema = PackagePolicySchema.extends({ - vars: schema.maybe( - schema.oneOf([ConfigRecordSchema, schema.maybe(SimplifiedVarsSchema)], { - meta: { - description: 'Package level variable.', - }, - }) - ), - inputs: schema.oneOf( - [ + { maxSize: 100 } + ), + secret_references: schema.maybe( schema.arrayOf( schema.object({ - ...PackagePolicyInputsSchema, - compiled_input: schema.maybe(schema.any()), + id: schema.string(), }), - { maxSize: 100 } - ), - SimplifiedPackagePolicyInputsSchema, - ], - { - meta: { - description: 'Package policy inputs.', - }, - } - ), - spaceIds: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), - agents: schema.maybe(schema.number()), -}); + { maxSize: 1000 } + ) + ), + }, + { meta: { id: 'package_policy' } } +); -export const OrphanedPackagePoliciesResponseSchema = schema.object({ - items: schema.arrayOf(PackagePolicyResponseSchema, { maxSize: 10000 }), - total: schema.number(), -}); +export const PackagePolicyResponseSchema = PackagePolicySchema.extends( + { + vars: schema.maybe( + schema.oneOf([ConfigRecordSchema, schema.maybe(SimplifiedVarsSchema)], { + meta: { + description: 'Package level variable.', + }, + }) + ), + inputs: schema.oneOf( + [ + schema.arrayOf( + schema.object({ + ...PackagePolicyInputsSchema, + compiled_input: schema.maybe(schema.any()), + }), + { maxSize: 100 } + ), + SimplifiedPackagePolicyInputsSchema, + ], + { + meta: { + description: 'Package policy inputs.', + }, + } + ), + spaceIds: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), + agents: schema.maybe(schema.number()), + }, + { meta: { id: 'package_policy_response' } } +); + +export const OrphanedPackagePoliciesResponseSchema = schema.object( + { + items: schema.arrayOf(PackagePolicyResponseSchema, { maxSize: 10000 }), + total: schema.number(), + }, + { meta: { id: 'orphaned_package_policies_response' } } +); export const DryRunPackagePolicySchema = PackagePolicySchema.extends( { @@ -749,13 +785,17 @@ export const DryRunPackagePolicySchema = PackagePolicySchema.extends( }, { unknowns: 'allow', + meta: { id: 'dry_run_package_policy' }, } ); -export const PackagePolicyStatusResponseSchema = schema.object({ - id: schema.string(), - success: schema.boolean(), - name: schema.maybe(schema.string()), - statusCode: schema.maybe(schema.number()), - body: schema.maybe(schema.object({ message: schema.string() })), -}); +export const PackagePolicyStatusResponseSchema = schema.object( + { + id: schema.string(), + success: schema.boolean(), + name: schema.maybe(schema.string()), + statusCode: schema.maybe(schema.number()), + body: schema.maybe(schema.object({ message: schema.string() })), + }, + { meta: { id: 'package_policy_status_response' } } +); diff --git a/x-pack/platform/plugins/shared/fleet/server/types/models/agent_policy.ts b/x-pack/platform/plugins/shared/fleet/server/types/models/agent_policy.ts index a6207da8c3542..f6537bd5439b5 100644 --- a/x-pack/platform/plugins/shared/fleet/server/types/models/agent_policy.ts +++ b/x-pack/platform/plugins/shared/fleet/server/types/models/agent_policy.ts @@ -297,144 +297,166 @@ export const AgentPolicySchemaV3 = schema .object({ ...AgentPolicyBaseSchema, }) - .extends({ - has_agent_version_conditions: schema.maybe(schema.boolean()), - }); - -export const AgentPolicySchemaV4 = AgentPolicySchemaV3.extends({ - min_agent_version: schema.maybe(schema.nullable(schema.string())), - package_agent_version_conditions: schema.maybe( - schema.nullable( - schema.arrayOf( - schema.object({ - name: schema.string(), - title: schema.string(), - version_condition: schema.string(), - }), - { maxSize: 1000 } + .extends( + { + has_agent_version_conditions: schema.maybe(schema.boolean()), + }, + { meta: { id: 'agent_policy_v3' } } + ); + +export const AgentPolicySchemaV4 = AgentPolicySchemaV3.extends( + { + min_agent_version: schema.maybe(schema.nullable(schema.string())), + package_agent_version_conditions: schema.maybe( + schema.nullable( + schema.arrayOf( + schema.object({ + name: schema.string(), + title: schema.string(), + version_condition: schema.string(), + }), + { maxSize: 1000 } + ) ) - ) - ), -}); + ), + }, + { meta: { id: 'agent_policy_v4' } } +); -export const AgentPolicySchemaV5 = AgentPolicySchemaV4.extends({ - is_verifier: schema.maybe(schema.boolean()), -}); +export const AgentPolicySchemaV5 = AgentPolicySchemaV4.extends( + { + is_verifier: schema.maybe(schema.boolean()), + }, + { meta: { id: 'agent_policy_v5' } } +); -export const AgentPolicySchemaV6 = AgentPolicySchemaV5.extends({ - agentless: schema.maybe( - schema.object({ - cloud_connectors: schema.maybe( - schema.object({ - target_csp: schema.maybe( - schema.oneOf([schema.literal('aws'), schema.literal('azure'), schema.literal('gcp')]) - ), - enabled: schema.boolean(), - }) - ), - resources: schema.maybe( - schema.object({ - requests: schema.maybe( - schema.object({ - memory: schema.maybe(schema.string({ validate: validateMemory })), - cpu: schema.maybe(schema.string({ validate: validateCPU })), - }) - ), - }) - ), - cluster_id: schema.maybe(schema.string()), - }) - ), -}); +export const AgentPolicySchemaV6 = AgentPolicySchemaV5.extends( + { + agentless: schema.maybe( + schema.object({ + cloud_connectors: schema.maybe( + schema.object({ + target_csp: schema.maybe( + schema.oneOf([schema.literal('aws'), schema.literal('azure'), schema.literal('gcp')]) + ), + enabled: schema.boolean(), + }) + ), + resources: schema.maybe( + schema.object({ + requests: schema.maybe( + schema.object({ + memory: schema.maybe(schema.string({ validate: validateMemory })), + cpu: schema.maybe(schema.string({ validate: validateCPU })), + }) + ), + }) + ), + cluster_id: schema.maybe(schema.string()), + }) + ), + }, + { meta: { id: 'agent_policy_v6' } } +); -export const NewAgentPolicySchema = AgentPolicySchemaV6.extends({ - supports_agentless: schema.maybe( - schema.oneOf([ - schema.literal(null), - schema.boolean({ - defaultValue: false, - meta: { - description: - 'Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API.', - deprecated: true, - }, - }), - ]) - ), - force: schema.maybe(schema.boolean()), -}); +export const NewAgentPolicySchema = AgentPolicySchemaV6.extends( + { + supports_agentless: schema.maybe( + schema.oneOf([ + schema.literal(null), + schema.boolean({ + defaultValue: false, + meta: { + description: + 'Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API.', + deprecated: true, + }, + }), + ]) + ), + force: schema.maybe(schema.boolean()), + }, + { meta: { id: 'new_agent_policy' } } +); -export const AgentPolicySchema = AgentPolicySchemaV6.extends({ - id: schema.string(), - is_managed: schema.maybe(schema.boolean()), - status: schema.oneOf([ - schema.literal(agentPolicyStatuses.Active), - schema.literal(agentPolicyStatuses.Inactive), - ]), - package_policies: schema.maybe( - schema.oneOf([ - schema.arrayOf(schema.string(), { maxSize: 1000 }), - schema.arrayOf(PackagePolicySchema, { maxSize: 1000 }), - ]) - ), - updated_at: schema.string(), - updated_by: schema.string(), -}); +export const AgentPolicySchema = AgentPolicySchemaV6.extends( + { + id: schema.string(), + is_managed: schema.maybe(schema.boolean()), + status: schema.oneOf([ + schema.literal(agentPolicyStatuses.Active), + schema.literal(agentPolicyStatuses.Inactive), + ]), + package_policies: schema.maybe( + schema.oneOf([ + schema.arrayOf(schema.string(), { maxSize: 1000 }), + schema.arrayOf(PackagePolicySchema, { maxSize: 1000 }), + ]) + ), + updated_at: schema.string(), + updated_by: schema.string(), + }, + { meta: { id: 'agent_policy' } } +); -export const AgentPolicyResponseSchema = AgentPolicySchema.extends({ - revision: schema.number(), - agents: schema.maybe(schema.number()), - unprivileged_agents: schema.maybe(schema.number()), - fips_agents: schema.maybe(schema.number()), - agents_per_version: schema.maybe( - schema.arrayOf( - schema.object({ - version: schema.string(), - count: schema.number(), - }), - { maxSize: 1000 } - ) - ), - is_protected: schema.boolean({ - meta: { - description: - 'Indicates whether the agent policy has tamper protection enabled. Default false.', - }, - }), - version: schema.maybe(schema.string()), - is_preconfigured: schema.maybe(schema.boolean()), - schema_version: schema.maybe(schema.string()), - min_agent_version: schema.maybe(schema.nullable(schema.string())), - package_agent_version_conditions: schema.maybe( - schema.nullable( +export const AgentPolicyResponseSchema = AgentPolicySchema.extends( + { + revision: schema.number(), + agents: schema.maybe(schema.number()), + unprivileged_agents: schema.maybe(schema.number()), + fips_agents: schema.maybe(schema.number()), + agents_per_version: schema.maybe( schema.arrayOf( schema.object({ - name: schema.string(), - title: schema.string(), - version_condition: schema.string(), + version: schema.string(), + count: schema.number(), }), { maxSize: 1000 } ) - ) - ), - created_at: schema.maybe(schema.string()), - package_policies: schema.maybe( - schema.oneOf([ - schema.arrayOf(schema.string(), { maxSize: 10000 }), - schema.arrayOf(PackagePolicyResponseSchema, { - meta: { - description: - 'This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the ?full=true parameter', - }, - maxSize: 10000, - }), - ]) - ), -}); + ), + is_protected: schema.boolean({ + meta: { + description: + 'Indicates whether the agent policy has tamper protection enabled. Defaults to `false`.', + }, + }), + version: schema.maybe(schema.string()), + is_preconfigured: schema.maybe(schema.boolean()), + schema_version: schema.maybe(schema.string()), + min_agent_version: schema.maybe(schema.nullable(schema.string())), + package_agent_version_conditions: schema.maybe( + schema.nullable( + schema.arrayOf( + schema.object({ + name: schema.string(), + title: schema.string(), + version_condition: schema.string(), + }), + { maxSize: 1000 } + ) + ) + ), + created_at: schema.maybe(schema.string()), + package_policies: schema.maybe( + schema.oneOf([ + schema.arrayOf(schema.string(), { maxSize: 10000 }), + schema.arrayOf(PackagePolicyResponseSchema, { + meta: { + description: + 'This field is present only when retrieving a single agent policy, or when retrieving a list of agent policies with the `?full=true` parameter', + }, + maxSize: 10000, + }), + ]) + ), + }, + { meta: { id: 'agent_policy_response' } } +); -export const GetAgentPolicyResponseSchema = schema.object({ - item: AgentPolicyResponseSchema, -}); +export const GetAgentPolicyResponseSchema = schema.object( + { item: AgentPolicyResponseSchema }, + { meta: { id: 'get_agent_policy_response' } } +); export const OTelCollectorPipelineIDSchema = schema.oneOf([ schema.literal('logs'), @@ -466,224 +488,227 @@ export const OtelCollectorConfigSchema = { ), }; -export const FullAgentPolicyResponseSchema = schema.object({ - id: schema.string(), - namespaces: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), - outputs: schema - .recordOf( - schema.string(), - schema.object({ - type: schema.string(), - hosts: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), - ca_sha256: schema.maybe(schema.oneOf([schema.literal(null), schema.string()])), - proxy_url: schema.maybe(schema.string()), - proxy_headers: schema.maybe(ProxyHeadersSchema), - }) - ) - .extendsDeep({ - unknowns: 'allow', - }), - output_permissions: schema.maybe( - schema.recordOf(schema.string(), schema.recordOf(schema.string(), schema.any())) - ), - fleet: schema.maybe( - schema.oneOf([ - schema.object({ - hosts: schema.arrayOf(schema.string(), { maxSize: 100 }), - proxy_url: schema.maybe(schema.string()), - proxy_headers: schema.maybe(ProxyHeadersSchema), - ssl: schema.maybe(BaseSSLSchema), - secrets: schema.maybe(BaseSecretsSchema), +export const FullAgentPolicyResponseSchema = schema.object( + { + id: schema.string(), + namespaces: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), + outputs: schema + .recordOf( + schema.string(), + schema.object({ + type: schema.string(), + hosts: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), + ca_sha256: schema.maybe(schema.oneOf([schema.literal(null), schema.string()])), + proxy_url: schema.maybe(schema.string()), + proxy_headers: schema.maybe(ProxyHeadersSchema), + }) + ) + .extendsDeep({ + unknowns: 'allow', }), - schema.object({ - kibana: schema.object({ + output_permissions: schema.maybe( + schema.recordOf(schema.string(), schema.recordOf(schema.string(), schema.any())) + ), + fleet: schema.maybe( + schema.oneOf([ + schema.object({ hosts: schema.arrayOf(schema.string(), { maxSize: 100 }), - protocol: schema.string(), - path: schema.maybe(schema.string()), + proxy_url: schema.maybe(schema.string()), + proxy_headers: schema.maybe(ProxyHeadersSchema), + ssl: schema.maybe(BaseSSLSchema), + secrets: schema.maybe(BaseSecretsSchema), }), - }), - ]) - ), - inputs: schema.arrayOf( - schema - .object({ - id: schema.string(), - name: schema.string(), - revision: schema.number(), - type: schema.string(), - data_stream: schema.object({ - namespace: schema.string(), + schema.object({ + kibana: schema.object({ + hosts: schema.arrayOf(schema.string(), { maxSize: 100 }), + protocol: schema.string(), + path: schema.maybe(schema.string()), + }), }), - use_output: schema.string(), - package_policy_id: schema.string(), - meta: schema.maybe( - schema.object({ - package: schema - .maybe( + ]) + ), + inputs: schema.arrayOf( + schema + .object({ + id: schema.string(), + name: schema.string(), + revision: schema.number(), + type: schema.string(), + data_stream: schema.object({ + namespace: schema.string(), + }), + use_output: schema.string(), + package_policy_id: schema.string(), + meta: schema.maybe( + schema.object({ + package: schema + .maybe( + schema.object({ + name: schema.string(), + version: schema.string(), + }) + ) + .extendsDeep({ + unknowns: 'allow', + }), + }) + ), + streams: schema.maybe( + schema + .arrayOf( schema.object({ - name: schema.string(), - version: schema.string(), - }) + id: schema.string(), + data_stream: schema.object({ + dataset: schema.string(), + type: schema.maybe(schema.string()), + }), + }), + { maxSize: 10000 } ) .extendsDeep({ unknowns: 'allow', - }), - }) - ), - streams: schema.maybe( - schema - .arrayOf( + }) + ), + processors: schema.maybe( + schema.arrayOf( schema.object({ - id: schema.string(), - data_stream: schema.object({ - dataset: schema.string(), - type: schema.maybe(schema.string()), + add_fields: schema.object({ + target: schema.string(), + fields: schema.recordOf( + schema.string(), + schema.oneOf([schema.string(), schema.number()]) + ), }), }), { maxSize: 10000 } ) - .extendsDeep({ - unknowns: 'allow', + ), + }) + .extendsDeep({ + unknowns: 'allow', + }), + { maxSize: 10000 } + ), + revision: schema.maybe(schema.number()), + agent: schema.maybe( + schema.object({ + monitoring: schema.object({ + namespace: schema.maybe(schema.string()), + use_output: schema.maybe(schema.string()), + enabled: schema.boolean(), + metrics: schema.boolean(), + logs: schema.boolean(), + traces: schema.boolean(), + apm: schema.maybe(schema.any()), + _runtime_experimental: schema.maybe(schema.string()), + pprof: schema.maybe( + schema.object({ + enabled: schema.boolean(), }) - ), - processors: schema.maybe( - schema.arrayOf( + ), + http: schema.maybe( schema.object({ - add_fields: schema.object({ - target: schema.string(), - fields: schema.recordOf( - schema.string(), - schema.oneOf([schema.string(), schema.number()]) - ), - }), - }), - { maxSize: 10000 } - ) - ), - }) - .extendsDeep({ - unknowns: 'allow', - }), - { maxSize: 10000 } - ), - revision: schema.maybe(schema.number()), - agent: schema.maybe( - schema.object({ - monitoring: schema.object({ - namespace: schema.maybe(schema.string()), - use_output: schema.maybe(schema.string()), - enabled: schema.boolean(), - metrics: schema.boolean(), - logs: schema.boolean(), - traces: schema.boolean(), - apm: schema.maybe(schema.any()), - _runtime_experimental: schema.maybe(schema.string()), - pprof: schema.maybe( + enabled: schema.maybe(schema.boolean()), + host: schema.maybe(schema.string()), + port: schema.maybe(schema.number()), + }) + ), + diagnostics: schema.maybe( + schema.object({ + limit: schema.maybe( + schema.object({ + interval: schema.maybe(schema.string()), + burst: schema.maybe(schema.number()), + }) + ), + uploader: schema.maybe( + schema.object({ + max_retries: schema.maybe(schema.number()), + init_dur: schema.maybe(schema.string()), + max_dur: schema.maybe(schema.string()), + }) + ), + }) + ), + }), + download: schema.object({ + sourceURI: schema.string(), + ssl: schema.maybe(BaseSSLSchema), + auth: schema.maybe( + schema.object({ + username: schema.maybe(schema.string()), + password: schema.maybe(schema.string()), + api_key: schema.maybe(schema.string()), + headers: schema.maybe( + schema.arrayOf(schema.object({ key: schema.string(), value: schema.string() }), { + maxSize: 100, + }) + ), + }) + ), + secrets: schema.maybe(BaseSecretsSchema), + timeout: schema.maybe(schema.string()), + target_directory: schema.maybe(schema.string()), + proxy_url: schema.maybe(schema.string()), + proxy_headers: schema.maybe(ProxyHeadersSchema), + }), + features: schema.recordOf( + schema.string(), schema.object({ enabled: schema.boolean(), }) ), - http: schema.maybe( + protection: schema.maybe( schema.object({ - enabled: schema.maybe(schema.boolean()), - host: schema.maybe(schema.string()), - port: schema.maybe(schema.number()), + enabled: schema.boolean(), + uninstall_token_hash: schema.string(), + signing_key: schema.string(), }) ), - diagnostics: schema.maybe( + logging: schema.maybe( schema.object({ - limit: schema.maybe( + level: schema.maybe(schema.string()), + to_files: schema.maybe(schema.boolean()), + files: schema.maybe( schema.object({ + rotateeverybytes: schema.maybe(schema.number()), + keepfiles: schema.maybe(schema.number()), interval: schema.maybe(schema.string()), - burst: schema.maybe(schema.number()), }) ), - uploader: schema.maybe( + metrics: schema.maybe( schema.object({ - max_retries: schema.maybe(schema.number()), - init_dur: schema.maybe(schema.string()), - max_dur: schema.maybe(schema.string()), + period: schema.maybe(schema.string()), }) ), }) ), - }), - download: schema.object({ - sourceURI: schema.string(), - ssl: schema.maybe(BaseSSLSchema), - auth: schema.maybe( + limits: schema.maybe( schema.object({ - username: schema.maybe(schema.string()), - password: schema.maybe(schema.string()), - api_key: schema.maybe(schema.string()), - headers: schema.maybe( - schema.arrayOf(schema.object({ key: schema.string(), value: schema.string() }), { - maxSize: 100, - }) - ), + go_max_procs: schema.maybe(schema.number()), }) ), - secrets: schema.maybe(BaseSecretsSchema), - timeout: schema.maybe(schema.string()), - target_directory: schema.maybe(schema.string()), - proxy_url: schema.maybe(schema.string()), - proxy_headers: schema.maybe(ProxyHeadersSchema), - }), - features: schema.recordOf( - schema.string(), - schema.object({ - enabled: schema.boolean(), - }) - ), - protection: schema.maybe( - schema.object({ - enabled: schema.boolean(), - uninstall_token_hash: schema.string(), - signing_key: schema.string(), - }) - ), - logging: schema.maybe( - schema.object({ - level: schema.maybe(schema.string()), - to_files: schema.maybe(schema.boolean()), - files: schema.maybe( - schema.object({ - rotateeverybytes: schema.maybe(schema.number()), - keepfiles: schema.maybe(schema.number()), - interval: schema.maybe(schema.string()), - }) - ), - metrics: schema.maybe( - schema.object({ - period: schema.maybe(schema.string()), - }) - ), - }) - ), - limits: schema.maybe( + internal: schema.maybe(schema.any()), + }) + ), + secret_references: schema.maybe( + schema.arrayOf( schema.object({ - go_max_procs: schema.maybe(schema.number()), - }) - ), - internal: schema.maybe(schema.any()), - }) - ), - secret_references: schema.maybe( - schema.arrayOf( + id: schema.string(), + }), + { maxSize: 10000 } + ) + ), + signed: schema.maybe( schema.object({ - id: schema.string(), - }), - { maxSize: 10000 } - ) - ), - signed: schema.maybe( - schema.object({ - data: schema.string(), - signature: schema.string(), - }) - ), - ...OtelCollectorConfigSchema, -}); + data: schema.string(), + signature: schema.string(), + }) + ), + ...OtelCollectorConfigSchema, + }, + { meta: { id: 'full_agent_policy' } } +); const MinimalOutputSchema = schema.object({ id: schema.string(), name: schema.string(), @@ -710,10 +735,12 @@ const OutputsForAgentPolicySchema = schema.object({ }), }); -export const GetAgentPolicyOutputsResponseSchema = schema.object({ - item: OutputsForAgentPolicySchema, -}); +export const GetAgentPolicyOutputsResponseSchema = schema.object( + { item: OutputsForAgentPolicySchema }, + { meta: { id: 'get_agent_policy_outputs_response' } } +); -export const GetListAgentPolicyOutputsResponseSchema = schema.object({ - items: schema.arrayOf(OutputsForAgentPolicySchema, { maxSize: 10000 }), -}); +export const GetListAgentPolicyOutputsResponseSchema = schema.object( + { items: schema.arrayOf(OutputsForAgentPolicySchema, { maxSize: 10000 }) }, + { meta: { id: 'get_list_agent_policy_outputs_response' } } +); diff --git a/x-pack/platform/plugins/shared/fleet/server/types/models/enrollment_api_key.ts b/x-pack/platform/plugins/shared/fleet/server/types/models/enrollment_api_key.ts index 7de525b9ad61c..15880e0403738 100644 --- a/x-pack/platform/plugins/shared/fleet/server/types/models/enrollment_api_key.ts +++ b/x-pack/platform/plugins/shared/fleet/server/types/models/enrollment_api_key.ts @@ -7,30 +7,33 @@ import { schema } from '@kbn/config-schema'; -export const EnrollmentAPIKeySchema = schema.object({ - id: schema.string(), - api_key_id: schema.string({ - meta: { description: 'The ID of the API key in the Security API.' }, - }), - api_key: schema.string({ - meta: { description: 'The enrollment API key (token) used for enrolling Elastic Agents.' }, - }), - name: schema.maybe( - schema.string({ - meta: { description: 'The name of the enrollment API key.' }, - }) - ), - active: schema.boolean({ - meta: { - description: - 'When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.', - }, - }), - policy_id: schema.maybe( - schema.string({ - meta: { description: 'The ID of the agent policy the Elastic Agent will be enrolled in.' }, - }) - ), - created_at: schema.string(), - hidden: schema.maybe(schema.boolean()), -}); +export const EnrollmentAPIKeySchema = schema.object( + { + id: schema.string(), + api_key_id: schema.string({ + meta: { description: 'The ID of the API key in the Security API.' }, + }), + api_key: schema.string({ + meta: { description: 'The enrollment API key (token) used for enrolling Elastic Agents.' }, + }), + name: schema.maybe( + schema.string({ + meta: { description: 'The name of the enrollment API key.' }, + }) + ), + active: schema.boolean({ + meta: { + description: + 'When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.', + }, + }), + policy_id: schema.maybe( + schema.string({ + meta: { description: 'The ID of the agent policy the Elastic Agent will be enrolled in.' }, + }) + ), + created_at: schema.string(), + hidden: schema.maybe(schema.boolean()), + }, + { meta: { id: 'enrollment_api_key' } } +); diff --git a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent.ts b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent.ts index 205123a963716..ba19e7355f623 100644 --- a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent.ts +++ b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent.ts @@ -23,12 +23,18 @@ const ActionIdSchema = schema.object({ }); const ActionIdOrMessageSchema = schema.oneOf([ - schema.object({ - actionId: schema.string(), - }), - schema.object({ - message: schema.string(), - }), + schema.object( + { + actionId: schema.string(), + }, + { meta: { id: 'action_id_response' } } + ), + schema.object( + { + message: schema.string(), + }, + { meta: { id: 'action_message_response' } } + ), ]); export const GetAgentsRequestSchema = { diff --git a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent_policy.ts b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent_policy.ts index b2bbdd892c39f..1f98e8c472269 100644 --- a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent_policy.ts +++ b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent_policy.ts @@ -109,9 +109,10 @@ export const BulkGetAgentPoliciesRequestSchema = { }), }; -export const BulkGetAgentPoliciesResponseSchema = schema.object({ - items: schema.arrayOf(AgentPolicyResponseSchema, { maxSize: 10000 }), -}); +export const BulkGetAgentPoliciesResponseSchema = schema.object( + { items: schema.arrayOf(AgentPolicyResponseSchema, { maxSize: 10000 }) }, + { meta: { id: 'bulk_get_agent_policies_response' } } +); export const GetOneAgentPolicyRequestSchema = { params: schema.object({ @@ -163,27 +164,36 @@ export const UpdateAgentPolicyRequestSchema = { export const CopyAgentPolicyRequestSchema = { ...GetOneAgentPolicyRequestSchema, - body: schema.object({ - name: schema.string({ minLength: 1 }), - description: schema.maybe(schema.string()), - }), + body: schema.object( + { + name: schema.string({ minLength: 1 }), + description: schema.maybe(schema.string()), + }, + { meta: { id: 'copy_agent_policy_request' } } + ), }; export const DeleteAgentPolicyRequestSchema = { - body: schema.object({ - agentPolicyId: schema.string({ meta: { description: 'The ID of the agent policy' } }), - force: schema.maybe( - schema.boolean({ - meta: { description: 'bypass validation checks that can prevent agent policy deletion' }, - }) - ), - }), + body: schema.object( + { + agentPolicyId: schema.string({ meta: { description: 'The ID of the agent policy' } }), + force: schema.maybe( + schema.boolean({ + meta: { description: 'bypass validation checks that can prevent agent policy deletion' }, + }) + ), + }, + { meta: { id: 'delete_agent_policy_request' } } + ), }; -export const DeleteAgentPolicyResponseSchema = schema.object({ - id: schema.string(), - name: schema.string(), -}); +export const DeleteAgentPolicyResponseSchema = schema.object( + { + id: schema.string(), + name: schema.string(), + }, + { meta: { id: 'delete_agent_policy_response' } } +); export const GetFullAgentPolicyRequestSchema = { params: schema.object({ @@ -216,9 +226,10 @@ export const GetFullAgentPolicyRequestSchema = { }), }; -export const GetFullAgentPolicyResponseSchema = schema.object({ - item: schema.oneOf([schema.string(), FullAgentPolicyResponseSchema]), -}); +export const GetFullAgentPolicyResponseSchema = schema.object( + { item: schema.oneOf([schema.string(), FullAgentPolicyResponseSchema]) }, + { meta: { id: 'get_full_agent_policy_response' } } +); export const DownloadFullAgentPolicyResponseSchema = schema.string(); @@ -242,9 +253,10 @@ export const GetK8sManifestRequestSchema = { }), }; -export const GetK8sManifestResponseScheme = schema.object({ - item: schema.string(), -}); +export const GetK8sManifestResponseScheme = schema.object( + { item: schema.string() }, + { meta: { id: 'get_k8s_manifest_response' } } +); export const GetAgentPolicyOutputsRequestSchema = { params: schema.object({ @@ -253,34 +265,43 @@ export const GetAgentPolicyOutputsRequestSchema = { }; export const GetListAgentPolicyOutputsRequestSchema = { - body: schema.object({ - ids: schema.arrayOf(schema.string(), { - meta: { description: 'list of package policy ids' }, - maxSize: 1000, - }), - }), + body: schema.object( + { + ids: schema.arrayOf(schema.string(), { + meta: { description: 'list of package policy ids' }, + maxSize: 1000, + }), + }, + { meta: { id: 'get_list_agent_policy_outputs_request' } } + ), }; export const RunAgentPolicyRevisionsCleanupTaskRequestSchema = { - body: schema.object({ - maxRevisions: schema.maybe( - schema.number({ - min: 1, - meta: { description: 'maximum revisions to keep per policy' }, - }) - ), - maxPolicies: schema.maybe( - schema.number({ - min: 1, - meta: { description: 'maximum number of policies to process for this task' }, - }) - ), - }), + body: schema.object( + { + maxRevisions: schema.maybe( + schema.number({ + min: 1, + meta: { description: 'maximum revisions to keep per policy' }, + }) + ), + maxPolicies: schema.maybe( + schema.number({ + min: 1, + meta: { description: 'maximum number of policies to process for this task' }, + }) + ), + }, + { meta: { id: 'run_agent_policy_revisions_cleanup_task_request' } } + ), }; -export const RunAgentPolicyRevisionsCleanupTaskResponseSchema = schema.object({ - success: schema.boolean({ meta: { description: 'whether the cleanup task ran successfully' } }), - totalDeletedRevisions: schema.number({ - meta: { description: 'total number of deleted policy revisions' }, - }), -}); +export const RunAgentPolicyRevisionsCleanupTaskResponseSchema = schema.object( + { + success: schema.boolean({ meta: { description: 'whether the cleanup task ran successfully' } }), + totalDeletedRevisions: schema.number({ + meta: { description: 'total number of deleted policy revisions' }, + }), + }, + { meta: { id: 'run_agent_policy_revisions_cleanup_task_response' } } +); diff --git a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/enrollment_api_key.ts b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/enrollment_api_key.ts index f89f754349f43..eb3e1628194a4 100644 --- a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/enrollment_api_key.ts +++ b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/enrollment_api_key.ts @@ -46,9 +46,10 @@ export const GetOneEnrollmentAPIKeyRequestSchema = { }), }; -export const EnrollmentAPIKeyResponseSchema = schema.object({ - item: EnrollmentAPIKeySchema, -}); +export const EnrollmentAPIKeyResponseSchema = schema.object( + { item: EnrollmentAPIKeySchema }, + { meta: { id: 'enrollment_api_key_response' } } +); export const DeleteEnrollmentAPIKeyRequestSchema = { params: schema.object({ @@ -72,16 +73,20 @@ export const DeleteEnrollmentAPIKeyRequestSchema = { }), }; -export const DeleteEnrollmentAPIKeyResponseSchema = schema.object({ - action: schema.literal('deleted'), -}); +export const DeleteEnrollmentAPIKeyResponseSchema = schema.object( + { action: schema.literal('deleted') }, + { meta: { id: 'delete_enrollment_api_key_response' } } +); export const PostEnrollmentAPIKeyRequestSchema = { - body: schema.object({ - name: schema.maybe(schema.string()), - policy_id: schema.string(), - expiration: schema.maybe(schema.string()), - }), + body: schema.object( + { + name: schema.maybe(schema.string()), + policy_id: schema.string(), + expiration: schema.maybe(schema.string()), + }, + { meta: { id: 'new_enrollment_api_key' } } + ), }; export const BulkDeleteEnrollmentAPIKeysRequestSchema = { @@ -125,6 +130,7 @@ export const BulkDeleteEnrollmentAPIKeysRequestSchema = { }), }, { + meta: { id: 'bulk_delete_enrollment_api_keys_request' }, validate: (value) => { const hasTokenIds = value.tokenIds && value.tokenIds.length > 0; const hasKuery = value.kuery && value.kuery.trim() !== ''; @@ -136,9 +142,12 @@ export const BulkDeleteEnrollmentAPIKeysRequestSchema = { ), }; -export const BulkDeleteEnrollmentAPIKeysResponseSchema = schema.object({ - action: schema.string(), - count: schema.number(), - successCount: schema.number(), - errorCount: schema.number(), -}); +export const BulkDeleteEnrollmentAPIKeysResponseSchema = schema.object( + { + action: schema.string(), + count: schema.number(), + successCount: schema.number(), + errorCount: schema.number(), + }, + { meta: { id: 'bulk_delete_enrollment_api_keys_response' } } +); diff --git a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts index 5e1c721d2f688..ac1bf2e7161cd 100644 --- a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts +++ b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts @@ -28,17 +28,21 @@ export const GetCategoriesRequestSchema = { }), }; -const CategorySummaryItemSchema = schema.object({ - id: schema.string(), - title: schema.string(), - count: schema.number(), - parent_id: schema.maybe(schema.string()), - parent_title: schema.maybe(schema.string()), -}); +const CategorySummaryItemSchema = schema.object( + { + id: schema.string(), + title: schema.string(), + count: schema.number(), + parent_id: schema.maybe(schema.string()), + parent_title: schema.maybe(schema.string()), + }, + { meta: { id: 'category_summary_item' } } +); -export const GetCategoriesResponseSchema = schema.object({ - items: schema.arrayOf(CategorySummaryItemSchema, { maxSize: 10000 }), -}); +export const GetCategoriesResponseSchema = schema.object( + { items: schema.arrayOf(CategorySummaryItemSchema, { maxSize: 10000 }) }, + { meta: { id: 'get_categories_response' } } +); export const GetPackagesRequestSchema = { query: schema.object({ @@ -63,465 +67,537 @@ export const GetPackagesRequestSchema = { }), }; -export const KibanaAssetReferenceSchema = schema.object({ - id: schema.string(), - originId: schema.maybe(schema.string()), - deferred: schema.maybe(schema.boolean()), - type: schema.oneOf([ - schema.oneOf([ - schema.literal('dashboard'), - schema.literal('lens'), - schema.literal('visualization'), - schema.literal('search'), - schema.literal('index-pattern'), - schema.literal('map'), - schema.literal('ml-module'), - schema.literal('security-rule'), - schema.literal('csp-rule-template'), - schema.literal('osquery-pack-asset'), - schema.literal('osquery-saved-query'), - schema.literal('tag'), +export const KibanaAssetReferenceSchema = schema.object( + { + id: schema.string(), + originId: schema.maybe(schema.string()), + deferred: schema.maybe(schema.boolean()), + type: schema.oneOf([ + schema.oneOf([ + schema.literal('dashboard'), + schema.literal('lens'), + schema.literal('visualization'), + schema.literal('search'), + schema.literal('index-pattern'), + schema.literal('map'), + schema.literal('ml-module'), + schema.literal('security-rule'), + schema.literal('csp-rule-template'), + schema.literal('osquery-pack-asset'), + schema.literal('osquery-saved-query'), + schema.literal('tag'), + ]), + schema.string(), ]), - schema.string(), - ]), -}); - -export const EsAssetReferenceSchema = schema.object({ - id: schema.string(), - type: schema.oneOf([ - schema.literal('index'), - schema.literal('index_template'), - schema.literal('component_template'), - schema.literal('ingest_pipeline'), - schema.literal('ilm_policy'), - schema.literal('data_stream_ilm_policy'), - schema.literal('transform'), - schema.literal('ml_model'), - schema.literal('knowledge_base'), - schema.literal('esql_view'), - ]), - deferred: schema.maybe(schema.boolean()), - version: schema.maybe(schema.string()), -}); - -export const InstallationInfoSchema = schema.object({ - type: schema.string(), - created_at: schema.maybe(schema.string()), - updated_at: schema.maybe(schema.string()), - namespaces: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), - installed_kibana: schema.arrayOf(KibanaAssetReferenceSchema, { maxSize: 10000 }), - additional_spaces_installed_kibana: schema.maybe( - schema.recordOf(schema.string(), schema.arrayOf(KibanaAssetReferenceSchema, { maxSize: 100 })) - ), - installed_es: schema.arrayOf(EsAssetReferenceSchema, { maxSize: 10000 }), - name: schema.string(), - version: schema.string(), - install_status: schema.oneOf([ - schema.literal('installed'), - schema.literal('installing'), - schema.literal('install_failed'), - ]), - install_source: schema.oneOf([ - schema.literal('registry'), - schema.literal('upload'), - schema.literal('bundled'), - schema.literal('custom'), - ]), - installed_kibana_space_id: schema.maybe(schema.string()), - install_format_schema_version: schema.maybe(schema.string()), - verification_status: schema.oneOf([ - schema.literal('unverified'), - schema.literal('verified'), - schema.literal('unknown'), - ]), - verification_key_id: schema.maybe(schema.oneOf([schema.string(), schema.literal(null)])), - experimental_data_stream_features: schema.maybe(ExperimentalDataStreamFeaturesSchema), - latest_install_failed_attempts: schema.maybe( - schema.arrayOf( - schema.object({ - created_at: schema.string(), - target_version: schema.string(), - error: schema.object({ - name: schema.string(), - message: schema.string(), - stack: schema.maybe(schema.string()), - }), - }), - { maxSize: 10 } - ) - ), - latest_executed_state: schema.maybe( - schema.object({ - name: schema.maybe(schema.string()), - started_at: schema.maybe(schema.string()), - error: schema.maybe(schema.string()), - }) - ), - previous_version: schema.maybe(schema.oneOf([schema.string(), schema.literal(null)])), - rolled_back: schema.maybe(schema.boolean()), - is_rollback_ttl_expired: schema.maybe(schema.boolean()), -}); + }, + { meta: { id: 'kibana_asset_reference' } } +); -const PackageIconSchema = schema.object({ - path: schema.maybe(schema.string()), - src: schema.string(), - title: schema.maybe(schema.string()), - type: schema.maybe(schema.string()), - size: schema.maybe(schema.string()), - dark_mode: schema.maybe(schema.boolean()), -}); +export const EsAssetReferenceSchema = schema.object( + { + id: schema.string(), + type: schema.oneOf([ + schema.literal('index'), + schema.literal('index_template'), + schema.literal('component_template'), + schema.literal('ingest_pipeline'), + schema.literal('ilm_policy'), + schema.literal('data_stream_ilm_policy'), + schema.literal('transform'), + schema.literal('ml_model'), + schema.literal('knowledge_base'), + schema.literal('esql_view'), + ]), + deferred: schema.maybe(schema.boolean()), + version: schema.maybe(schema.string()), + }, + { meta: { id: 'es_asset_reference' } } +); -export const PackageInfoSchema = schema - .object({ - status: schema.maybe(schema.string()), - installationInfo: schema.maybe(InstallationInfoSchema), +export const InstallationInfoSchema = schema.object( + { + type: schema.string(), + created_at: schema.maybe(schema.string()), + updated_at: schema.maybe(schema.string()), + namespaces: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), + installed_kibana: schema.arrayOf(KibanaAssetReferenceSchema, { maxSize: 10000 }), + additional_spaces_installed_kibana: schema.maybe( + schema.recordOf(schema.string(), schema.arrayOf(KibanaAssetReferenceSchema, { maxSize: 100 })) + ), + installed_es: schema.arrayOf(EsAssetReferenceSchema, { maxSize: 10000 }), name: schema.string(), version: schema.string(), - description: schema.maybe(schema.string()), - title: schema.string(), - icons: schema.maybe(schema.arrayOf(PackageIconSchema, { maxSize: 100 })), - deprecated: schema.maybe(DeprecationInfoSchema), - conditions: schema.maybe( - schema.object({ - kibana: schema.maybe(schema.object({ version: schema.maybe(schema.string()) })), - elastic: schema.maybe( - schema.object({ - subscription: schema.maybe(schema.string()), - capabilities: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 10 })), - }) - ), - deprecated: schema.maybe(DeprecationInfoSchema), - }) - ), - release: schema.maybe( - schema.oneOf([schema.literal('ga'), schema.literal('beta'), schema.literal('experimental')]) - ), - type: schema.maybe( - schema.oneOf([ - schema.literal('integration'), - schema.literal('input'), - schema.literal('content'), - schema.string(), - ]) - ), - path: schema.maybe(schema.string()), - download: schema.maybe(schema.string()), - internal: schema.maybe(schema.boolean()), - data_streams: schema.maybe( - schema.arrayOf(schema.recordOf(schema.string(), schema.any()), { maxSize: 1000 }) - ), - policy_templates: schema.maybe( - schema.arrayOf(schema.recordOf(schema.string(), schema.any()), { maxSize: 1000 }) - ), - categories: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), - owner: schema.maybe( - schema.object({ - github: schema.maybe(schema.string()), - type: schema.maybe( - schema.oneOf([ - schema.literal('elastic'), - schema.literal('partner'), - schema.literal('community'), - ]) - ), - }) - ), - readme: schema.maybe(schema.string()), - signature_path: schema.maybe(schema.string()), - source: schema.maybe( - schema.object({ - license: schema.string(), - }) - ), - format_version: schema.maybe(schema.string()), - vars: schema.maybe( - schema.arrayOf(schema.recordOf(schema.string(), schema.any()), { maxSize: 1000 }) - ), - var_groups: schema.maybe( + install_status: schema.oneOf([ + schema.literal('installed'), + schema.literal('installing'), + schema.literal('install_failed'), + ]), + install_source: schema.oneOf([ + schema.literal('registry'), + schema.literal('upload'), + schema.literal('bundled'), + schema.literal('custom'), + ]), + installed_kibana_space_id: schema.maybe(schema.string()), + install_format_schema_version: schema.maybe(schema.string()), + verification_status: schema.oneOf([ + schema.literal('unverified'), + schema.literal('verified'), + schema.literal('unknown'), + ]), + verification_key_id: schema.maybe(schema.oneOf([schema.string(), schema.literal(null)])), + experimental_data_stream_features: schema.maybe(ExperimentalDataStreamFeaturesSchema), + latest_install_failed_attempts: schema.maybe( schema.arrayOf( schema.object({ - name: schema.string(), - title: schema.string(), - selector_title: schema.string(), - description: schema.maybe(schema.string()), - options: schema.arrayOf( - schema - .object({ - name: schema.string(), - title: schema.string(), - description: schema.maybe(schema.string()), - vars: schema.arrayOf(schema.string(), { maxSize: 100 }), - hide_in_deployment_modes: schema.maybe( - schema.arrayOf( - schema.oneOf([schema.literal('default'), schema.literal('agentless')]), - { maxSize: 2 } - ) - ), - }) - .extendsDeep({ unknowns: 'allow' }), - { maxSize: 100 } - ), + created_at: schema.string(), + target_version: schema.string(), + error: schema.object({ + name: schema.string(), + message: schema.string(), + stack: schema.maybe(schema.string()), + }), }), - { maxSize: 100 } + { maxSize: 10 } ) ), - latestVersion: schema.maybe(schema.string()), - discovery: schema.maybe( + latest_executed_state: schema.maybe( schema.object({ - fields: schema.maybe( - schema.arrayOf(schema.object({ name: schema.string() }), { maxSize: 100 }) - ), - datasets: schema.maybe( - schema.arrayOf(schema.object({ name: schema.string() }), { maxSize: 100 }) - ), + name: schema.maybe(schema.string()), + started_at: schema.maybe(schema.string()), + error: schema.maybe(schema.string()), }) ), - }) + previous_version: schema.maybe(schema.oneOf([schema.string(), schema.literal(null)])), + rolled_back: schema.maybe(schema.boolean()), + is_rollback_ttl_expired: schema.maybe(schema.boolean()), + }, + { meta: { id: 'installation_info' } } +); + +const PackageIconSchema = schema.object( + { + path: schema.maybe(schema.string()), + src: schema.string(), + title: schema.maybe(schema.string()), + type: schema.maybe(schema.string()), + size: schema.maybe(schema.string()), + dark_mode: schema.maybe(schema.boolean()), + }, + { meta: { id: 'package_icon' } } +); + +export const PackageInfoSchema = schema + .object( + { + status: schema.maybe(schema.string()), + installationInfo: schema.maybe(InstallationInfoSchema), + name: schema.string(), + version: schema.string(), + description: schema.maybe(schema.string()), + title: schema.string(), + icons: schema.maybe(schema.arrayOf(PackageIconSchema, { maxSize: 100 })), + deprecated: schema.maybe(DeprecationInfoSchema), + conditions: schema.maybe( + schema.object({ + kibana: schema.maybe(schema.object({ version: schema.maybe(schema.string()) })), + elastic: schema.maybe( + schema.object({ + subscription: schema.maybe(schema.string()), + capabilities: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 10 })), + }) + ), + deprecated: schema.maybe(DeprecationInfoSchema), + }) + ), + release: schema.maybe( + schema.oneOf([schema.literal('ga'), schema.literal('beta'), schema.literal('experimental')]) + ), + type: schema.maybe( + schema.oneOf([ + schema.literal('integration'), + schema.literal('input'), + schema.literal('content'), + schema.string(), + ]) + ), + path: schema.maybe(schema.string()), + download: schema.maybe(schema.string()), + internal: schema.maybe(schema.boolean()), + data_streams: schema.maybe( + schema.arrayOf(schema.recordOf(schema.string(), schema.any()), { maxSize: 1000 }) + ), + policy_templates: schema.maybe( + schema.arrayOf(schema.recordOf(schema.string(), schema.any()), { maxSize: 1000 }) + ), + categories: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), + owner: schema.maybe( + schema.object({ + github: schema.maybe(schema.string()), + type: schema.maybe( + schema.oneOf([ + schema.literal('elastic'), + schema.literal('partner'), + schema.literal('community'), + ]) + ), + }) + ), + readme: schema.maybe(schema.string()), + signature_path: schema.maybe(schema.string()), + source: schema.maybe( + schema.object({ + license: schema.string(), + }) + ), + format_version: schema.maybe(schema.string()), + vars: schema.maybe( + schema.arrayOf(schema.recordOf(schema.string(), schema.any()), { maxSize: 1000 }) + ), + var_groups: schema.maybe( + schema.arrayOf( + schema.object({ + name: schema.string(), + title: schema.string(), + selector_title: schema.string(), + description: schema.maybe(schema.string()), + options: schema.arrayOf( + schema + .object({ + name: schema.string(), + title: schema.string(), + description: schema.maybe(schema.string()), + vars: schema.arrayOf(schema.string(), { maxSize: 100 }), + hide_in_deployment_modes: schema.maybe( + schema.arrayOf( + schema.oneOf([schema.literal('default'), schema.literal('agentless')]), + { maxSize: 2 } + ) + ), + }) + .extendsDeep({ unknowns: 'allow' }), + { maxSize: 100 } + ), + }), + { maxSize: 100 } + ) + ), + latestVersion: schema.maybe(schema.string()), + discovery: schema.maybe( + schema.object({ + fields: schema.maybe( + schema.arrayOf(schema.object({ name: schema.string() }), { maxSize: 100 }) + ), + datasets: schema.maybe( + schema.arrayOf(schema.object({ name: schema.string() }), { maxSize: 100 }) + ), + }) + ), + }, + { meta: { id: 'package_info' } } + ) // sometimes package list response contains extra properties, e.g. installed_kibana .extendsDeep({ unknowns: 'allow', }); -export const PackageListItemSchema = PackageInfoSchema.extends({ - id: schema.string(), - integration: schema.maybe(schema.string()), -}); +export const PackageListItemSchema = PackageInfoSchema.extends( + { + id: schema.string(), + integration: schema.maybe(schema.string()), + }, + { meta: { id: 'package_list_item' } } +); -export const GetPackagesResponseSchema = schema.object({ - items: schema.arrayOf(PackageListItemSchema, { maxSize: 10000 }), -}); +export const GetPackagesResponseSchema = schema.object( + { items: schema.arrayOf(PackageListItemSchema, { maxSize: 10000 }) }, + { meta: { id: 'get_packages_response' } } +); -export const InstalledPackageSchema = schema.object({ - name: schema.string(), - version: schema.string(), - status: schema.string(), - title: schema.maybe(schema.string()), - description: schema.maybe(schema.string()), - icons: schema.maybe(schema.arrayOf(PackageIconSchema, { maxSize: 100 })), - dataStreams: schema.arrayOf( - schema.object({ - name: schema.string(), - title: schema.string(), - }), - { maxSize: 10000 } - ), -}); +export const InstalledPackageSchema = schema.object( + { + name: schema.string(), + version: schema.string(), + status: schema.string(), + title: schema.maybe(schema.string()), + description: schema.maybe(schema.string()), + icons: schema.maybe(schema.arrayOf(PackageIconSchema, { maxSize: 100 })), + dataStreams: schema.arrayOf( + schema.object({ + name: schema.string(), + title: schema.string(), + }), + { maxSize: 10000 } + ), + }, + { meta: { id: 'installed_package' } } +); -export const GetInstalledPackagesResponseSchema = schema.object({ - items: schema.arrayOf(InstalledPackageSchema, { maxSize: 10000 }), - total: schema.number(), - searchAfter: schema.maybe( - schema.arrayOf( - schema.oneOf([ - schema.string(), - schema.number(), - schema.boolean(), - schema.literal(null), - schema.any(), - ]), - { maxSize: 2 } - ) - ), -}); +export const GetInstalledPackagesResponseSchema = schema.object( + { + items: schema.arrayOf(InstalledPackageSchema, { maxSize: 10000 }), + total: schema.number(), + searchAfter: schema.maybe( + schema.arrayOf( + schema.oneOf([ + schema.string(), + schema.number(), + schema.boolean(), + schema.literal(null), + schema.any(), + ]), + { maxSize: 2 } + ) + ), + }, + { meta: { id: 'get_installed_packages_response' } } +); -export const GetLimitedPackagesResponseSchema = schema.object({ - items: schema.arrayOf(schema.string(), { maxSize: 10000 }), -}); +export const GetLimitedPackagesResponseSchema = schema.object( + { items: schema.arrayOf(schema.string(), { maxSize: 10000 }) }, + { meta: { id: 'get_limited_packages_response' } } +); -export const GetStatsResponseSchema = schema.object({ - response: schema.object({ - agent_policy_count: schema.number(), - package_policy_count: schema.number(), - }), -}); +export const GetStatsResponseSchema = schema.object( + { + response: schema.object({ + agent_policy_count: schema.number(), + package_policy_count: schema.number(), + }), + }, + { meta: { id: 'get_stats_response' } } +); export const GetInputsResponseSchema = schema.oneOf([ schema.string(), - schema.object({ - inputs: schema.arrayOf( - schema.object({ - id: schema.string(), - type: schema.string(), - streams: schema.maybe( - schema.arrayOf( - schema - .object({ - id: schema.string(), - data_stream: schema.object({ - dataset: schema.string(), - type: schema.maybe(schema.string()), + schema.object( + { + inputs: schema.arrayOf( + schema.object({ + id: schema.string(), + type: schema.string(), + streams: schema.maybe( + schema.arrayOf( + schema + .object({ + id: schema.string(), + data_stream: schema.object({ + dataset: schema.string(), + type: schema.maybe(schema.string()), + }), + }) + .extendsDeep({ + unknowns: 'allow', }), - }) - .extendsDeep({ - unknowns: 'allow', - }), - { maxSize: 10000 } - ) - ), - }), - { maxSize: 10000 } - ), - ...OtelCollectorConfigSchema, - }), + { maxSize: 10000 } + ) + ), + }), + { maxSize: 10000 } + ), + ...OtelCollectorConfigSchema, + }, + { meta: { id: 'get_inputs_response' } } + ), ]); export const GetFileResponseSchema = schema.any(); -export const PackageMetadataSchema = schema.object({ - has_policies: schema.boolean(), -}); +export const PackageMetadataSchema = schema.object( + { has_policies: schema.boolean() }, + { meta: { id: 'package_metadata' } } +); -export const GetPackageInfoSchema = PackageInfoSchema.extends({ - assets: schema.recordOf(schema.string(), schema.maybe(schema.any())), - notice: schema.maybe(schema.string()), - licensePath: schema.maybe(schema.string()), - keepPoliciesUpToDate: schema.maybe(schema.boolean()), - license: schema.maybe(schema.string()), - screenshots: schema.maybe(schema.arrayOf(PackageIconSchema, { maxSize: 100 })), - elasticsearch: schema.maybe(schema.recordOf(schema.string(), schema.any())), - agent: schema.maybe( - schema.object({ - privileges: schema.maybe( - schema.object({ - root: schema.maybe(schema.boolean()), - }) - ), - }) - ), - asset_tags: schema.maybe( - schema.arrayOf( +export const GetPackageInfoSchema = PackageInfoSchema.extends( + { + assets: schema.recordOf(schema.string(), schema.maybe(schema.any())), + notice: schema.maybe(schema.string()), + licensePath: schema.maybe(schema.string()), + keepPoliciesUpToDate: schema.maybe(schema.boolean()), + license: schema.maybe(schema.string()), + screenshots: schema.maybe(schema.arrayOf(PackageIconSchema, { maxSize: 100 })), + elasticsearch: schema.maybe(schema.recordOf(schema.string(), schema.any())), + agent: schema.maybe( schema.object({ - text: schema.string(), - asset_types: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), - asset_ids: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 1000 })), - }), - { maxSize: 1000 } - ) - ), -}); + privileges: schema.maybe( + schema.object({ + root: schema.maybe(schema.boolean()), + }) + ), + }) + ), + asset_tags: schema.maybe( + schema.arrayOf( + schema.object({ + text: schema.string(), + asset_types: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 100 })), + asset_ids: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 1000 })), + }), + { maxSize: 1000 } + ) + ), + }, + { meta: { id: 'get_package_info' } } +); -export const GetInfoResponseSchema = schema.object({ - item: GetPackageInfoSchema, - metadata: schema.maybe(PackageMetadataSchema), -}); -export const GetKnowledgeBaseResponseSchema = schema.object({ - package: schema.object({ - name: schema.string(), - }), - items: schema.arrayOf( - schema.object({ - fileName: schema.string(), - content: schema.string(), - path: schema.string(), - installed_at: schema.string(), - version: schema.string(), +export const GetInfoResponseSchema = schema.object( + { + item: GetPackageInfoSchema, + metadata: schema.maybe(PackageMetadataSchema), + }, + { meta: { id: 'get_info_response' } } +); +export const GetKnowledgeBaseResponseSchema = schema.object( + { + package: schema.object({ + name: schema.string(), }), - { maxSize: 10000 } - ), -}); + items: schema.arrayOf( + schema.object({ + fileName: schema.string(), + content: schema.string(), + path: schema.string(), + installed_at: schema.string(), + version: schema.string(), + }), + { maxSize: 10000 } + ), + }, + { meta: { id: 'get_knowledge_base_response' } } +); -export const UpdatePackageResponseSchema = schema.object({ - item: GetPackageInfoSchema, -}); +export const UpdatePackageResponseSchema = schema.object( + { item: GetPackageInfoSchema }, + { meta: { id: 'update_package_response' } } +); export const AssetReferenceSchema = schema.oneOf([ KibanaAssetReferenceSchema, EsAssetReferenceSchema, ]); -export const InstallPackageResponseSchema = schema.object({ - items: schema.arrayOf(AssetReferenceSchema, { maxSize: 10000 }), - _meta: schema.object({ - install_source: schema.string(), - name: schema.string(), - }), -}); +export const InstallPackageResponseSchema = schema.object( + { + items: schema.arrayOf(AssetReferenceSchema, { maxSize: 10000 }), + _meta: schema.object({ + install_source: schema.string(), + name: schema.string(), + }), + }, + { meta: { id: 'install_package_response' } } +); -export const InstallKibanaAssetsResponseSchema = schema.object({ - success: schema.boolean(), -}); +export const InstallKibanaAssetsResponseSchema = schema.object( + { success: schema.boolean() }, + { meta: { id: 'install_kibana_assets_response' } } +); -export const DeletePackageDatastreamAssetsResponseSchema = schema.object({ - success: schema.boolean(), -}); +export const DeletePackageDatastreamAssetsResponseSchema = schema.object( + { success: schema.boolean() }, + { meta: { id: 'delete_package_datastream_assets_response' } } +); export const BulkInstallPackagesResponseItemSchema = schema.oneOf([ - schema.object({ - name: schema.string(), - version: schema.string(), - result: schema.object({ - assets: schema.maybe(schema.arrayOf(AssetReferenceSchema, { maxSize: 10000 })), - status: schema.maybe( - schema.oneOf([schema.literal('installed'), schema.literal('already_installed')]) - ), - error: schema.maybe(schema.any()), - installType: schema.string(), - installSource: schema.maybe(schema.string()), - }), - }), - schema.object({ - name: schema.string(), - statusCode: schema.number(), - error: schema.oneOf([schema.string(), schema.any()]), - }), + schema.object( + { + name: schema.string(), + version: schema.string(), + result: schema.object({ + assets: schema.maybe(schema.arrayOf(AssetReferenceSchema, { maxSize: 10000 })), + status: schema.maybe( + schema.oneOf([schema.literal('installed'), schema.literal('already_installed')]) + ), + error: schema.maybe(schema.any()), + installType: schema.string(), + installSource: schema.maybe(schema.string()), + }), + }, + { meta: { id: 'bulk_install_packages_response_item_success' } } + ), + schema.object( + { + name: schema.string(), + statusCode: schema.number(), + error: schema.oneOf([schema.string(), schema.any()]), + }, + { meta: { id: 'bulk_install_packages_response_item_error' } } + ), ]); -export const BulkInstallPackagesFromRegistryResponseSchema = schema.object({ - items: schema.arrayOf(BulkInstallPackagesResponseItemSchema, { maxSize: 10000 }), -}); +export const BulkInstallPackagesFromRegistryResponseSchema = schema.object( + { items: schema.arrayOf(BulkInstallPackagesResponseItemSchema, { maxSize: 10000 }) }, + { meta: { id: 'bulk_install_packages_from_registry_response' } } +); + +export const BulkUpgradePackagesResponseSchema = schema.object( + { taskId: schema.string() }, + { meta: { id: 'bulk_upgrade_packages_response' } } +); -export const BulkUpgradePackagesResponseSchema = schema.object({ taskId: schema.string() }); +export const BulkRollbackPackagesResponseSchema = schema.object( + { taskId: schema.string() }, + { meta: { id: 'bulk_rollback_packages_response' } } +); + +export const GetOneBulkOperationPackagesResponseSchema = schema.object( + { + status: schema.string(), + error: schema.maybe(schema.object({ message: schema.string() })), + results: schema.maybe( + schema.arrayOf( + schema.object({ + name: schema.string(), + success: schema.boolean(), + error: schema.maybe(schema.object({ message: schema.string() })), + }), + { maxSize: 10000 } + ) + ), + }, + { meta: { id: 'get_one_bulk_operation_packages_response' } } +); -export const BulkRollbackPackagesResponseSchema = schema.object({ taskId: schema.string() }); +export const DeletePackageResponseSchema = schema.object( + { items: schema.arrayOf(AssetReferenceSchema, { maxSize: 10000 }) }, + { meta: { id: 'delete_package_response' } } +); -export const GetOneBulkOperationPackagesResponseSchema = schema.object({ - status: schema.string(), - error: schema.maybe(schema.object({ message: schema.string() })), - results: schema.maybe( - schema.arrayOf( +export const GetVerificationKeyIdResponseSchema = schema.object( + { id: schema.oneOf([schema.string(), schema.literal(null)]) }, + { meta: { id: 'get_verification_key_id_response' } } +); + +export const GetDataStreamsResponseSchema = schema.object( + { + items: schema.arrayOf( schema.object({ name: schema.string(), - success: schema.boolean(), - error: schema.maybe(schema.object({ message: schema.string() })), }), { maxSize: 10000 } - ) - ), -}); - -export const DeletePackageResponseSchema = schema.object({ - items: schema.arrayOf(AssetReferenceSchema, { maxSize: 10000 }), -}); - -export const GetVerificationKeyIdResponseSchema = schema.object({ - id: schema.oneOf([schema.string(), schema.literal(null)]), -}); - -export const GetDataStreamsResponseSchema = schema.object({ - items: schema.arrayOf( - schema.object({ - name: schema.string(), - }), - { maxSize: 10000 } - ), -}); + ), + }, + { meta: { id: 'get_data_streams_response' } } +); -export const GetBulkAssetsResponseSchema = schema.object({ - items: schema.arrayOf( - schema.object({ - appLink: schema.maybe(schema.string()), - id: schema.string(), - type: schema.string(), - updatedAt: schema.maybe(schema.string()), - attributes: schema.object({ - service: schema.maybe(schema.string()), - title: schema.maybe(schema.string()), - description: schema.maybe(schema.string()), +export const GetBulkAssetsResponseSchema = schema.object( + { + items: schema.arrayOf( + schema.object({ + appLink: schema.maybe(schema.string()), + id: schema.string(), + type: schema.string(), + updatedAt: schema.maybe(schema.string()), + attributes: schema.object({ + service: schema.maybe(schema.string()), + title: schema.maybe(schema.string()), + description: schema.maybe(schema.string()), + }), }), - }), - { maxSize: 10000 } - ), -}); + { maxSize: 10000 } + ), + }, + { meta: { id: 'get_bulk_assets_response' } } +); export const ReauthorizeTransformResponseSchema = schema.arrayOf( schema.object({ @@ -532,10 +608,13 @@ export const ReauthorizeTransformResponseSchema = schema.arrayOf( { maxSize: 10000 } ); -export const RollbackPackageResponseSchema = schema.object({ - version: schema.string(), - success: schema.boolean(), -}); +export const RollbackPackageResponseSchema = schema.object( + { + version: schema.string(), + success: schema.boolean(), + }, + { meta: { id: 'rollback_package_response' } } +); export const GetInstalledPackagesRequestSchema = { query: schema.object({ @@ -671,39 +750,45 @@ export const GetKnowledgeBaseRequestSchema = { }; export const GetBulkAssetsRequestSchema = { - body: schema.object({ - assetIds: schema.arrayOf(schema.object({ id: schema.string(), type: schema.string() }), { - maxSize: 10000, - }), - }), + body: schema.object( + { + assetIds: schema.arrayOf(schema.object({ id: schema.string(), type: schema.string() }), { + maxSize: 10000, + }), + }, + { meta: { id: 'get_bulk_assets_request' } } + ), }; export const UpdatePackageRequestSchema = { params: PackageVersionRequestParamsSchema, - body: schema.object({ - keepPoliciesUpToDate: schema.maybe(schema.boolean()), - namespace_customization_enabled_for: schema.maybe( - schema.arrayOf( - schema.string({ - validate: (v) => { - if (!v.length) { - return 'Must not be empty'; - } - if (!/^[a-z0-9_]+$/.test(v)) { - return 'Must only contain lowercase letters, numbers, and underscores'; - } - }, - }), - { - maxSize: 100, - meta: { - description: - 'Namespaces for which namespace-level customization is enabled on this package.', - }, - } - ) - ), - }), + body: schema.object( + { + keepPoliciesUpToDate: schema.maybe(schema.boolean()), + namespace_customization_enabled_for: schema.maybe( + schema.arrayOf( + schema.string({ + validate: (v) => { + if (!v.length) { + return 'Must not be empty'; + } + if (!/^[a-z0-9_]+$/.test(v)) { + return 'Must only contain lowercase letters, numbers, and underscores'; + } + }, + }), + { + maxSize: 100, + meta: { + description: + 'Namespaces for which namespace-level customization is enabled on this package.', + }, + } + ) + ), + }, + { meta: { id: 'update_package_request' } } + ), }; export const UpdatePackageWithoutVersionRequestSchema = { @@ -712,64 +797,71 @@ export const UpdatePackageWithoutVersionRequestSchema = { }; export const BulkNamespaceCustomizationRequestSchema = { - body: schema.object({ - packages: schema.arrayOf(schema.string(), { - minSize: 1, - maxSize: 1000, - meta: { - description: 'Package names to apply the customization changes to.', - }, - }), - enable: schema.maybe( - schema.arrayOf( - schema.string({ - validate: (v) => { - if (!v.length) { - return 'Must not be empty'; - } - if (!/^[a-z0-9_]+$/.test(v)) { - return 'Must only contain lowercase letters, numbers, and underscores'; - } - }, - }), - { - maxSize: 100, - meta: { - description: 'Namespaces to enable namespace-level customization for on each package.', - }, - } - ) - ), - disable: schema.maybe( - schema.arrayOf(schema.string(), { - maxSize: 100, + body: schema.object( + { + packages: schema.arrayOf(schema.string(), { + minSize: 1, + maxSize: 1000, meta: { - description: 'Namespaces to disable namespace-level customization for on each package.', + description: 'Package names to apply the customization changes to.', }, - }) - ), - }), -}; - -export const BulkNamespaceCustomizationResponseSchema = schema.object({ - items: schema.arrayOf( - schema.object({ - name: schema.string(), - success: schema.boolean(), - namespace_customization_enabled_for: schema.maybe( + }), + enable: schema.maybe( + schema.arrayOf( + schema.string({ + validate: (v) => { + if (!v.length) { + return 'Must not be empty'; + } + if (!/^[a-z0-9_]+$/.test(v)) { + return 'Must only contain lowercase letters, numbers, and underscores'; + } + }, + }), + { + maxSize: 100, + meta: { + description: + 'Namespaces to enable namespace-level customization for on each package.', + }, + } + ) + ), + disable: schema.maybe( schema.arrayOf(schema.string(), { maxSize: 100, meta: { - description: - 'The opt-in list on the package. Returned whenever the package is installed: the new list on success, or the unchanged list when the request is rejected (for example, because of a namespace-prefix restriction).', + description: 'Namespaces to disable namespace-level customization for on each package.', }, }) ), - error: schema.maybe(schema.string()), - }), - { maxSize: 1000 } + }, + { meta: { id: 'bulk_namespace_customization_request' } } ), -}); +}; + +export const BulkNamespaceCustomizationResponseSchema = schema.object( + { + items: schema.arrayOf( + schema.object({ + name: schema.string(), + success: schema.boolean(), + namespace_customization_enabled_for: schema.maybe( + schema.arrayOf(schema.string(), { + maxSize: 100, + meta: { + description: + 'The opt-in list on the package. Returned whenever the package is installed: the new list on success, or the unchanged list when the request is rejected (for example, because of a namespace-prefix restriction).', + }, + }) + ), + error: schema.maybe(schema.string()), + }), + { maxSize: 1000 } + ), + }, + { meta: { id: 'bulk_namespace_customization_response' } } +); export const ReviewUpgradeRequestSchema = { params: schema.object({ @@ -777,19 +869,23 @@ export const ReviewUpgradeRequestSchema = { meta: { description: 'Package name to review upgrade for' }, }), }), - body: schema.object({ - action: schema.oneOf([ - schema.literal('accept'), - schema.literal('decline'), - schema.literal('pending'), - ]), - target_version: schema.string(), - }), + body: schema.object( + { + action: schema.oneOf([ + schema.literal('accept'), + schema.literal('decline'), + schema.literal('pending'), + ]), + target_version: schema.string(), + }, + { meta: { id: 'review_upgrade_request' } } + ), }; -export const ReviewUpgradeResponseSchema = schema.object({ - success: schema.boolean(), -}); +export const ReviewUpgradeResponseSchema = schema.object( + { success: schema.boolean() }, + { meta: { id: 'review_upgrade_response' } } +); export const GetStatsRequestSchema = { params: schema.object({ @@ -804,16 +900,19 @@ export const GetDependenciesRequestSchema = { }), }; -export const GetDependenciesResponseSchema = schema.object({ - items: schema.arrayOf( - schema.object({ - name: schema.string(), - version: schema.string(), - title: schema.string(), - }), - { maxSize: 1000 } - ), -}); +export const GetDependenciesResponseSchema = schema.object( + { + items: schema.arrayOf( + schema.object({ + name: schema.string(), + version: schema.string(), + title: schema.string(), + }), + { maxSize: 1000 } + ), + }, + { meta: { id: 'get_dependencies_response' } } +); export const InstallPackageFromRegistryRequestSchema = { params: PackageVersionRequestParamsSchema, @@ -837,10 +936,13 @@ export const InstallPackageFromRegistryRequestSchema = { }), }), body: schema.nullable( - schema.object({ - force: schema.boolean({ defaultValue: false }), - ignore_constraints: schema.boolean({ defaultValue: false }), - }) + schema.object( + { + force: schema.boolean({ defaultValue: false }), + ignore_constraints: schema.boolean({ defaultValue: false }), + }, + { meta: { id: 'install_package_from_registry_request' } } + ) ), }; @@ -860,9 +962,14 @@ export const ReauthorizeTransformRequestSchema = { schema.boolean({ meta: { description: 'When true, allow prerelease versions' } }) ), }), - body: schema.object({ - transforms: schema.arrayOf(schema.object({ transformId: schema.string() }), { maxSize: 1000 }), - }), + body: schema.object( + { + transforms: schema.arrayOf(schema.object({ transformId: schema.string() }), { + maxSize: 1000, + }), + }, + { meta: { id: 'reauthorize_transform_request' } } + ), }; export const BulkInstallPackagesFromRegistryRequestSchema = { @@ -871,20 +978,23 @@ export const BulkInstallPackagesFromRegistryRequestSchema = { schema.boolean({ meta: { description: 'When true, allow installing prerelease versions' } }) ), }), - body: schema.object({ - packages: schema.arrayOf( - schema.oneOf([ - schema.string(), - schema.object({ - name: schema.string(), - version: schema.string(), - prerelease: schema.maybe(schema.boolean()), - }), - ]), - { minSize: 1, maxSize: 1000 } - ), - force: schema.boolean({ defaultValue: false }), - }), + body: schema.object( + { + packages: schema.arrayOf( + schema.oneOf([ + schema.string(), + schema.object({ + name: schema.string(), + version: schema.string(), + prerelease: schema.maybe(schema.boolean()), + }), + ]), + { minSize: 1, maxSize: 1000 } + ), + force: schema.boolean({ defaultValue: false }), + }, + { meta: { id: 'bulk_install_packages_from_registry_request' } } + ), }; export const GetOneBulkOperationPackagesRequestSchema = { @@ -898,46 +1008,55 @@ export const GetOneBulkOperationPackagesRequestSchema = { }; export const BulkUpgradePackagesRequestSchema = { - body: schema.object({ - packages: schema.arrayOf( - schema.object({ - name: schema.string(), - version: schema.maybe(schema.string()), - }), - { minSize: 1, maxSize: 1000 } - ), - prerelease: schema.maybe(schema.boolean()), - force: schema.boolean({ defaultValue: false }), - upgrade_package_policies: schema.boolean({ defaultValue: false }), - }), + body: schema.object( + { + packages: schema.arrayOf( + schema.object({ + name: schema.string(), + version: schema.maybe(schema.string()), + }), + { minSize: 1, maxSize: 1000 } + ), + prerelease: schema.maybe(schema.boolean()), + force: schema.boolean({ defaultValue: false }), + upgrade_package_policies: schema.boolean({ defaultValue: false }), + }, + { meta: { id: 'bulk_upgrade_packages_request' } } + ), }; export const BulkUninstallPackagesRequestSchema = { - body: schema.object({ - packages: schema.arrayOf( - schema.object({ - name: schema.string(), - version: schema.string(), - }), - { minSize: 1, maxSize: 1000 } - ), - force: schema.boolean({ defaultValue: false }), - }), + body: schema.object( + { + packages: schema.arrayOf( + schema.object({ + name: schema.string(), + version: schema.string(), + }), + { minSize: 1, maxSize: 1000 } + ), + force: schema.boolean({ defaultValue: false }), + }, + { meta: { id: 'bulk_uninstall_packages_request' } } + ), }; export const BulkRollbackPackagesRequestSchema = { - body: schema.object({ - packages: schema.arrayOf( - schema.object({ - name: schema.string({ - meta: { - description: 'Package name to rollback', - }, + body: schema.object( + { + packages: schema.arrayOf( + schema.object({ + name: schema.string({ + meta: { + description: 'Package name to rollback', + }, + }), }), - }), - { minSize: 1, maxSize: 1000 } - ), - }), + { minSize: 1, maxSize: 1000 } + ), + }, + { meta: { id: 'bulk_rollback_packages_request' } } + ), }; export const InstallPackageByUploadRequestSchema = { @@ -955,23 +1074,26 @@ export const InstallPackageByUploadRequestSchema = { }; export const CreateCustomIntegrationRequestSchema = { - body: schema.object({ - integrationName: schema.string(), - datasets: schema.arrayOf( - schema.object({ - name: schema.string(), - type: schema.oneOf([ - schema.literal('logs'), - schema.literal('metrics'), - schema.literal('traces'), - schema.literal('synthetics'), - schema.literal('profiling'), - ]), - }), - { maxSize: 10 } - ), - force: schema.maybe(schema.boolean()), - }), + body: schema.object( + { + integrationName: schema.string(), + datasets: schema.arrayOf( + schema.object({ + name: schema.string(), + type: schema.oneOf([ + schema.literal('logs'), + schema.literal('metrics'), + schema.literal('traces'), + schema.literal('synthetics'), + schema.literal('profiling'), + ]), + }), + { maxSize: 10 } + ), + force: schema.maybe(schema.boolean()), + }, + { meta: { id: 'create_custom_integration_request' } } + ), }; export const DeletePackageRequestSchema = { @@ -998,19 +1120,22 @@ export const InstallKibanaAssetsRequestSchema = { pkgVersion: schema.string({ meta: { description: 'Package version' } }), }), body: schema.nullable( - schema.object({ - force: schema.maybe(schema.boolean()), - space_ids: schema.maybe( - schema.arrayOf(schema.string(), { - minSize: 1, - maxSize: 100, - meta: { - description: - 'When provided install assets in the specified spaces instead of the current space.', - }, - }) - ), - }) + schema.object( + { + force: schema.maybe(schema.boolean()), + space_ids: schema.maybe( + schema.arrayOf(schema.string(), { + minSize: 1, + maxSize: 100, + meta: { + description: + 'When provided, assets are installed in the specified spaces instead of the current space.', + }, + }) + ), + }, + { meta: { id: 'install_kibana_assets_request' } } + ) ), }; @@ -1020,9 +1145,12 @@ export const InstallRuleAssetsRequestSchema = { pkgVersion: schema.string({ meta: { description: 'Package version' } }), }), body: schema.nullable( - schema.object({ - force: schema.maybe(schema.boolean()), - }) + schema.object( + { + force: schema.maybe(schema.boolean()), + }, + { meta: { id: 'install_rule_assets_request' } } + ) ), }; diff --git a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/package_policy.ts b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/package_policy.ts index 0cce483f75ce8..8d3e28990b425 100644 --- a/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/package_policy.ts +++ b/x-pack/platform/plugins/shared/fleet/server/types/rest_spec/package_policy.ts @@ -86,9 +86,10 @@ export const BulkGetPackagePoliciesRequestSchema = { }), }; -export const BulkGetPackagePoliciesResponseBodySchema = schema.object({ - items: schema.arrayOf(PackagePolicyResponseSchema, { maxSize: 10000 }), -}); +export const BulkGetPackagePoliciesResponseBodySchema = schema.object( + { items: schema.arrayOf(PackagePolicyResponseSchema, { maxSize: 10000 }) }, + { meta: { id: 'bulk_get_package_policies_response' } } +); export const GetOnePackagePolicyRequestSchema = { params: schema.object({ @@ -121,9 +122,10 @@ export const CreatePackagePolicyRequestSchema = { }), }; -export const CreatePackagePolicyResponseSchema = schema.object({ - item: PackagePolicyResponseSchema, -}); +export const CreatePackagePolicyResponseSchema = schema.object( + { item: PackagePolicyResponseSchema }, + { meta: { id: 'create_package_policy_response' } } +); export const UpdatePackagePolicyRequestSchema = { ...GetOnePackagePolicyRequestSchema, @@ -141,10 +143,13 @@ export const UpdatePackagePolicyRequestSchema = { }; export const DeletePackagePoliciesRequestSchema = { - body: schema.object({ - packagePolicyIds: schema.arrayOf(schema.string(), { maxSize: 1000 }), - force: schema.maybe(schema.boolean()), - }), + body: schema.object( + { + packagePolicyIds: schema.arrayOf(schema.string(), { maxSize: 1000 }), + force: schema.maybe(schema.boolean()), + }, + { meta: { id: 'delete_package_policies_request' } } + ), }; export const DeletePackagePoliciesResponseBodySchema = schema.arrayOf( @@ -180,14 +185,16 @@ export const DeleteOnePackagePolicyRequestSchema = { }), }; -export const DeleteOnePackagePolicyResponseSchema = schema.object({ - id: schema.string(), -}); +export const DeleteOnePackagePolicyResponseSchema = schema.object( + { id: schema.string() }, + { meta: { id: 'delete_one_package_policy_response' } } +); export const UpgradePackagePoliciesRequestSchema = { - body: schema.object({ - packagePolicyIds: schema.arrayOf(schema.string(), { maxSize: 1000 }), - }), + body: schema.object( + { packagePolicyIds: schema.arrayOf(schema.string(), { maxSize: 1000 }) }, + { meta: { id: 'upgrade_package_policies_request' } } + ), }; export const UpgradePackagePoliciesResponseBodySchema = schema.arrayOf( @@ -196,10 +203,13 @@ export const UpgradePackagePoliciesResponseBodySchema = schema.arrayOf( ); export const DryRunPackagePoliciesRequestSchema = { - body: schema.object({ - packagePolicyIds: schema.arrayOf(schema.string(), { maxSize: 1000 }), - packageVersion: schema.maybe(schema.string()), - }), + body: schema.object( + { + packagePolicyIds: schema.arrayOf(schema.string(), { maxSize: 1000 }), + packageVersion: schema.maybe(schema.string()), + }, + { meta: { id: 'dry_run_package_policies_request' } } + ), }; export const DryRunPackagePoliciesResponseBodySchema = schema.arrayOf(