{ "components": { "schemas": { "core_status_redactedResponse": { "additionalProperties": false, "description": "A minimal representation of Kibana's operational status.", "properties": { "status": { "additionalProperties": false, "properties": { "overall": { "additionalProperties": false, "properties": { "level": { "description": "Service status levels as human and machine readable values.", "enum": [ "available", "degraded", "unavailable", "critical" ], "type": "string" } }, "required": [ "level" ], "type": "object" } }, "required": [ "overall" ], "type": "object" } }, "required": [ "status" ], "type": "object" }, "core_status_response": { "additionalProperties": false, "description": "Kibana's operational status as well as a detailed breakdown of plugin statuses indication of various loads (like event loop utilization and network traffic) at time of request.", "properties": { "metrics": { "additionalProperties": false, "description": "Metric groups collected by Kibana.", "properties": { "collection_interval_in_millis": { "description": "The interval at which metrics should be collected.", "type": "number" }, "elasticsearch_client": { "additionalProperties": false, "description": "Current network metrics of Kibana's Elasticsearch client.", "properties": { "totalActiveSockets": { "description": "Count of network sockets currently in use.", "type": "number" }, "totalIdleSockets": { "description": "Count of network sockets currently idle.", "type": "number" }, "totalQueuedRequests": { "description": "Count of requests not yet assigned to sockets.", "type": "number" } }, "required": [ "totalActiveSockets", "totalIdleSockets", "totalQueuedRequests" ], "type": "object" }, "last_updated": { "description": "The time metrics were collected.", "type": "string" } }, "required": [ "elasticsearch_client", "last_updated", "collection_interval_in_millis" ], "type": "object" }, "name": { "description": "Kibana instance name.", "type": "string" }, "status": { "additionalProperties": false, "properties": { "core": { "additionalProperties": false, "description": "Statuses of core Kibana services.", "properties": { "elasticsearch": { "additionalProperties": false, "properties": { "detail": { "description": "Human readable detail of the service status.", "type": "string" }, "documentationUrl": { "description": "A URL to further documentation regarding this service.", "type": "string" }, "level": { "description": "Service status levels as human and machine readable values.", "enum": [ "available", "degraded", "unavailable", "critical" ], "type": "string" }, "meta": { "additionalProperties": {}, "description": "An unstructured set of extra metadata about this service.", "type": "object" }, "summary": { "description": "A human readable summary of the service status.", "type": "string" } }, "required": [ "level", "summary", "meta" ], "type": "object" }, "savedObjects": { "additionalProperties": false, "properties": { "detail": { "description": "Human readable detail of the service status.", "type": "string" }, "documentationUrl": { "description": "A URL to further documentation regarding this service.", "type": "string" }, "level": { "description": "Service status levels as human and machine readable values.", "enum": [ "available", "degraded", "unavailable", "critical" ], "type": "string" }, "meta": { "additionalProperties": {}, "description": "An unstructured set of extra metadata about this service.", "type": "object" }, "summary": { "description": "A human readable summary of the service status.", "type": "string" } }, "required": [ "level", "summary", "meta" ], "type": "object" } }, "required": [ "elasticsearch", "savedObjects" ], "type": "object" }, "overall": { "additionalProperties": false, "properties": { "detail": { "description": "Human readable detail of the service status.", "type": "string" }, "documentationUrl": { "description": "A URL to further documentation regarding this service.", "type": "string" }, "level": { "description": "Service status levels as human and machine readable values.", "enum": [ "available", "degraded", "unavailable", "critical" ], "type": "string" }, "meta": { "additionalProperties": {}, "description": "An unstructured set of extra metadata about this service.", "type": "object" }, "summary": { "description": "A human readable summary of the service status.", "type": "string" } }, "required": [ "level", "summary", "meta" ], "type": "object" }, "plugins": { "additionalProperties": { "additionalProperties": false, "properties": { "detail": { "description": "Human readable detail of the service status.", "type": "string" }, "documentationUrl": { "description": "A URL to further documentation regarding this service.", "type": "string" }, "level": { "description": "Service status levels as human and machine readable values.", "enum": [ "available", "degraded", "unavailable", "critical" ], "type": "string" }, "meta": { "additionalProperties": {}, "description": "An unstructured set of extra metadata about this service.", "type": "object" }, "summary": { "description": "A human readable summary of the service status.", "type": "string" } }, "required": [ "level", "summary", "meta" ], "type": "object" }, "description": "A dynamic mapping of plugin ID to plugin status.", "type": "object" } }, "required": [ "overall", "core", "plugins" ], "type": "object" }, "uuid": { "description": "Unique, generated Kibana instance UUID. This UUID should persist even if the Kibana process restarts.", "type": "string" }, "version": { "additionalProperties": false, "properties": { "build_date": { "description": "The date and time of this build.", "type": "string" }, "build_flavor": { "description": "The build flavour determines configuration and behavior of Kibana. On premise users will almost always run the \"traditional\" flavour, while other flavours are reserved for Elastic-specific use cases.", "enum": [ "serverless", "traditional" ], "type": "string" }, "build_hash": { "description": "A unique hash value representing the git commit of this Kibana build.", "type": "string" }, "build_number": { "description": "A monotonically increasing number, each subsequent build will have a higher number.", "type": "number" }, "build_snapshot": { "description": "Whether this build is a snapshot build.", "type": "boolean" }, "number": { "description": "A semantic version number.", "type": "string" } }, "required": [ "number", "build_hash", "build_number", "build_snapshot", "build_flavor", "build_date" ], "type": "object" } }, "required": [ "name", "uuid", "version", "status", "metrics" ], "type": "object" } }, "securitySchemes": { "apiKeyAuth": { "in": "header", "name": "Authorization", "type": "apiKey" }, "basicAuth": { "scheme": "basic", "type": "http" } } }, "info": { "title": "Kibana HTTP APIs", "version": "0.0.0" }, "openapi": "3.0.0", "paths": { "/api/actions/connector/{id}": { "delete": { "description": "WARNING: When you delete a connector, it cannot be recovered.", "operationId": "delete-actions-connector-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "An identifier for the connector.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." } }, "summary": "Delete a connector", "tags": [ "connectors" ] }, "get": { "operationId": "get-actions-connector-id", "parameters": [ { "description": "An identifier for the connector.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "config": { "additionalProperties": {}, "type": "object" }, "connector_type_id": { "description": "The connector type identifier.", "type": "string" }, "id": { "description": "The identifier for the connector.", "type": "string" }, "is_deprecated": { "description": "Indicates whether the connector is deprecated.", "type": "boolean" }, "is_missing_secrets": { "description": "Indicates whether the connector is missing secrets.", "type": "boolean" }, "is_preconfigured": { "description": "Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ", "type": "boolean" }, "is_system_action": { "description": "Indicates whether the connector is used for system actions.", "type": "boolean" }, "name": { "description": " The name of the rule.", "type": "string" } }, "required": [ "id", "name", "connector_type_id", "is_preconfigured", "is_deprecated", "is_system_action" ], "type": "object" } } }, "description": "Indicates a successful call." } }, "summary": "Get connector information", "tags": [ "connectors" ] }, "post": { "operationId": "post-actions-connector-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "An identifier for the connector.", "in": "path", "name": "id", "required": false, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "config": { "additionalProperties": {}, "default": {}, "type": "object" }, "connector_type_id": { "description": "The type of connector.", "type": "string" }, "name": { "description": "The display name for the connector.", "type": "string" }, "secrets": { "additionalProperties": {}, "default": {}, "type": "object" } }, "required": [ "name", "connector_type_id" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "config": { "additionalProperties": {}, "type": "object" }, "connector_type_id": { "description": "The connector type identifier.", "type": "string" }, "id": { "description": "The identifier for the connector.", "type": "string" }, "is_deprecated": { "description": "Indicates whether the connector is deprecated.", "type": "boolean" }, "is_missing_secrets": { "description": "Indicates whether the connector is missing secrets.", "type": "boolean" }, "is_preconfigured": { "description": "Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ", "type": "boolean" }, "is_system_action": { "description": "Indicates whether the connector is used for system actions.", "type": "boolean" }, "name": { "description": " The name of the rule.", "type": "string" } }, "required": [ "id", "name", "connector_type_id", "is_preconfigured", "is_deprecated", "is_system_action" ], "type": "object" } } }, "description": "Indicates a successful call." } }, "summary": "Create a connector", "tags": [ "connectors" ] }, "put": { "operationId": "put-actions-connector-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "An identifier for the connector.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "config": { "additionalProperties": {}, "default": {}, "type": "object" }, "name": { "description": "The display name for the connector.", "type": "string" }, "secrets": { "additionalProperties": {}, "default": {}, "type": "object" } }, "required": [ "name" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "config": { "additionalProperties": {}, "type": "object" }, "connector_type_id": { "description": "The connector type identifier.", "type": "string" }, "id": { "description": "The identifier for the connector.", "type": "string" }, "is_deprecated": { "description": "Indicates whether the connector is deprecated.", "type": "boolean" }, "is_missing_secrets": { "description": "Indicates whether the connector is missing secrets.", "type": "boolean" }, "is_preconfigured": { "description": "Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ", "type": "boolean" }, "is_system_action": { "description": "Indicates whether the connector is used for system actions.", "type": "boolean" }, "name": { "description": " The name of the rule.", "type": "string" } }, "required": [ "id", "name", "connector_type_id", "is_preconfigured", "is_deprecated", "is_system_action" ], "type": "object" } } }, "description": "Indicates a successful call." } }, "summary": "Update a connector", "tags": [ "connectors" ] } }, "/api/actions/connector/{id}/_execute": { "post": { "description": "You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems.", "operationId": "post-actions-connector-id-execute", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "An identifier for the connector.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "params": { "additionalProperties": {}, "type": "object" } }, "required": [ "params" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "config": { "additionalProperties": {}, "type": "object" }, "connector_type_id": { "description": "The connector type identifier.", "type": "string" }, "id": { "description": "The identifier for the connector.", "type": "string" }, "is_deprecated": { "description": "Indicates whether the connector is deprecated.", "type": "boolean" }, "is_missing_secrets": { "description": "Indicates whether the connector is missing secrets.", "type": "boolean" }, "is_preconfigured": { "description": "Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response. ", "type": "boolean" }, "is_system_action": { "description": "Indicates whether the connector is used for system actions.", "type": "boolean" }, "name": { "description": " The name of the rule.", "type": "string" } }, "required": [ "id", "name", "connector_type_id", "is_preconfigured", "is_deprecated", "is_system_action" ], "type": "object" } } }, "description": "Indicates a successful call." } }, "summary": "Run a connector", "tags": [ "connectors" ] } }, "/api/actions/connector_types": { "get": { "description": "You do not need any Kibana feature privileges to run this API.", "operationId": "get-actions-connector-types", "parameters": [ { "description": "A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases).", "in": "query", "name": "feature_id", "required": false, "schema": { "type": "string" } } ], "responses": {}, "summary": "Get connector types", "tags": [ "connectors" ] } }, "/api/actions/connectors": { "get": { "operationId": "get-actions-connectors", "parameters": [], "responses": {}, "summary": "Get all connectors", "tags": [ "connectors" ] } }, "/api/alerting/rule/{id}": { "delete": { "operationId": "delete-alerting-rule-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule with the given ID does not exist." } }, "summary": "Delete a rule", "tags": [ "alerting" ] }, "get": { "operationId": "get-alerting-rule-id", "parameters": [ { "description": "The identifier for the rule.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actions": { "items": { "additionalProperties": false, "properties": { "alerts_filter": { "additionalProperties": false, "description": "Defines a period that limits whether the action runs.", "properties": { "query": { "additionalProperties": false, "properties": { "dsl": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL).", "type": "string" }, "filters": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.", "items": { "additionalProperties": false, "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "A filter can be either specific to an application context or applied globally.", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": {}, "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "kql": { "description": "A filter written in Kibana Query Language (KQL).", "type": "string" } }, "required": [ "kql", "filters" ], "type": "object" }, "timeframe": { "additionalProperties": false, "properties": { "days": { "description": "Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.", "items": { "enum": [ 1, 2, 3, 4, 5, 6, 7 ], "type": "integer" }, "type": "array" }, "hours": { "additionalProperties": false, "properties": { "end": { "description": "The end of the time frame in 24-hour notation (`hh:mm`).", "type": "string" }, "start": { "description": "The start of the time frame in 24-hour notation (`hh:mm`).", "type": "string" } }, "required": [ "start", "end" ], "type": "object" }, "timezone": { "description": "The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.", "type": "string" } }, "required": [ "days", "hours", "timezone" ], "type": "object" } }, "type": "object" }, "connector_type_id": { "description": "The type of connector. This property appears in responses but cannot be set in requests.", "type": "string" }, "frequency": { "additionalProperties": false, "properties": { "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "type": "string" }, "summary": { "description": "Indicates whether the action is a summary.", "type": "boolean" }, "throttle": { "description": "The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" } }, "required": [ "summary", "notify_when", "throttle" ], "type": "object" }, "group": { "description": "The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.", "type": "string" }, "id": { "description": "The identifier for the connector saved object.", "type": "string" }, "params": { "additionalProperties": {}, "description": "The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.", "type": "object" }, "use_alert_data_for_template": { "description": "Indicates whether to use alert data as a template.", "type": "boolean" }, "uuid": { "description": "A universally unique identifier (UUID) for the action.", "type": "string" } }, "required": [ "id", "connector_type_id", "params" ], "type": "object" }, "type": "array" }, "active_snoozes": { "items": { "description": "List of active snoozes for the rule.", "type": "string" }, "type": "array" }, "alert_delay": { "additionalProperties": false, "description": "Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.", "properties": { "active": { "description": "The number of consecutive runs that must meet the rule conditions.", "type": "number" } }, "required": [ "active" ], "type": "object" }, "api_key_created_by_user": { "description": "Indicates whether the API key that is associated with the rule was created by the user.", "nullable": true, "type": "boolean" }, "api_key_owner": { "description": "The owner of the API key that is associated with the rule and used to run background tasks.", "nullable": true, "type": "string" }, "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" }, "created_at": { "description": "The date and time that the rule was created.", "type": "string" }, "created_by": { "description": "The identifier for the user that created the rule.", "nullable": true, "type": "string" }, "enabled": { "description": "Indicates whether you want to run the rule on an interval basis after it is created.", "type": "boolean" }, "execution_status": { "additionalProperties": false, "properties": { "error": { "additionalProperties": false, "properties": { "message": { "description": "Error message.", "type": "string" }, "reason": { "description": "Reason for error.", "enum": [ "read", "decrypt", "execute", "unknown", "license", "timeout", "disabled", "validate" ], "type": "string" } }, "required": [ "reason", "message" ], "type": "object" }, "last_duration": { "description": "Duration of last execution of the rule.", "type": "number" }, "last_execution_date": { "description": "The date and time when rule was executed last.", "type": "string" }, "status": { "description": "Status of rule execution.", "enum": [ "ok", "active", "error", "warning", "pending", "unknown" ], "type": "string" }, "warning": { "additionalProperties": false, "properties": { "message": { "description": "Warning message.", "type": "string" }, "reason": { "description": "Reason for warning.", "enum": [ "maxExecutableActions", "maxAlerts", "maxQueuedActions", "ruleExecution" ], "type": "string" } }, "required": [ "reason", "message" ], "type": "object" } }, "required": [ "status", "last_execution_date" ], "type": "object" }, "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.", "nullable": true, "properties": { "look_back_window": { "description": "The minimum number of runs in which the threshold must be met.", "maximum": 20, "minimum": 2, "type": "number" }, "status_change_threshold": { "description": "The minimum number of times an alert must switch states in the look back window.", "maximum": 20, "minimum": 2, "type": "number" } }, "required": [ "look_back_window", "status_change_threshold" ], "type": "object" }, "id": { "description": "The identifier for the rule.", "type": "string" }, "is_snoozed_until": { "description": "The date when the rule will no longer be snoozed.", "nullable": true, "type": "string" }, "last_run": { "additionalProperties": false, "nullable": true, "properties": { "alerts_count": { "additionalProperties": false, "properties": { "active": { "description": "Number of active alerts during last run.", "nullable": true, "type": "number" }, "ignored": { "description": "Number of ignored alerts during last run.", "nullable": true, "type": "number" }, "new": { "description": "Number of new alerts during last run.", "nullable": true, "type": "number" }, "recovered": { "description": "Number of recovered alerts during last run.", "nullable": true, "type": "number" } }, "type": "object" }, "outcome": { "description": "Outcome of last run of the rule. Value could be succeeded, warning or failed.", "enum": [ "succeeded", "warning", "failed" ], "type": "string" }, "outcome_msg": { "items": { "description": "Outcome message generated during last rule run.", "type": "string" }, "nullable": true, "type": "array" }, "outcome_order": { "description": "Order of the outcome.", "type": "number" }, "warning": { "description": "Warning of last rule execution.", "enum": [ "read", "decrypt", "execute", "unknown", "license", "timeout", "disabled", "validate", "maxExecutableActions", "maxAlerts", "maxQueuedActions", "ruleExecution" ], "nullable": true, "type": "string" } }, "required": [ "outcome", "alerts_count" ], "type": "object" }, "mapped_params": { "additionalProperties": {}, "type": "object" }, "monitoring": { "additionalProperties": false, "description": "Monitoring details of the rule.", "properties": { "run": { "additionalProperties": false, "description": "Rule run details.", "properties": { "calculated_metrics": { "additionalProperties": false, "description": "Calculation of different percentiles and success ratio.", "properties": { "p50": { "type": "number" }, "p95": { "type": "number" }, "p99": { "type": "number" }, "success_ratio": { "type": "number" } }, "required": [ "success_ratio" ], "type": "object" }, "history": { "description": "History of the rule run.", "items": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of the rule run.", "type": "number" }, "outcome": { "description": "Outcome of last run of the rule. Value could be succeeded, warning or failed.", "enum": [ "succeeded", "warning", "failed" ], "type": "string" }, "success": { "description": "Indicates whether the rule run was successful.", "type": "boolean" }, "timestamp": { "description": "Time of rule run.", "type": "number" } }, "required": [ "success", "timestamp" ], "type": "object" }, "type": "array" }, "last_run": { "additionalProperties": false, "properties": { "metrics": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of most recent rule run.", "type": "number" }, "gap_duration_s": { "description": "Duration in seconds of rule run gap.", "nullable": true, "type": "number" }, "gap_range": { "additionalProperties": false, "nullable": true, "properties": { "gte": { "description": "End of the gap range.", "type": "string" }, "lte": { "description": "Start of the gap range.", "type": "string" } }, "required": [ "lte", "gte" ], "type": "object" }, "total_alerts_created": { "description": "Total number of alerts created during last rule run.", "nullable": true, "type": "number" }, "total_alerts_detected": { "description": "Total number of alerts detected during last rule run.", "nullable": true, "type": "number" }, "total_indexing_duration_ms": { "description": "Total time spent indexing documents during last rule run in milliseconds.", "nullable": true, "type": "number" }, "total_search_duration_ms": { "description": "Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.", "nullable": true, "type": "number" } }, "type": "object" }, "timestamp": { "description": "Time of the most recent rule run.", "type": "string" } }, "required": [ "timestamp", "metrics" ], "type": "object" } }, "required": [ "history", "calculated_metrics", "last_run" ], "type": "object" } }, "required": [ "run" ], "type": "object" }, "mute_all": { "description": "Indicates whether all alerts are muted.", "type": "boolean" }, "muted_alert_ids": { "items": { "description": "List of identifiers of muted alerts. ", "type": "string" }, "type": "array" }, "name": { "description": " The name of the rule.", "type": "string" }, "next_run": { "description": "Date and time of the next run of the rule.", "nullable": true, "type": "string" }, "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "nullable": true, "type": "string" }, "params": { "additionalProperties": {}, "description": "The parameters for the rule.", "type": "object" }, "revision": { "description": "The rule revision number.", "type": "number" }, "rule_type_id": { "description": "The rule type identifier.", "type": "string" }, "running": { "description": "Indicates whether the rule is running.", "nullable": true, "type": "boolean" }, "schedule": { "additionalProperties": false, "properties": { "interval": { "description": "The interval is specified in seconds, minutes, hours, or days.", "type": "string" } }, "required": [ "interval" ], "type": "object" }, "scheduled_task_id": { "description": "Identifier of the scheduled task.", "type": "string" }, "snooze_schedule": { "items": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of the rule snooze schedule.", "type": "number" }, "id": { "description": "Identifier of the rule snooze schedule.", "type": "string" }, "rRule": { "additionalProperties": false, "properties": { "byhour": { "items": { "description": "Indicates hours of the day to recur.", "type": "number" }, "nullable": true, "type": "array" }, "byminute": { "items": { "description": "Indicates minutes of the hour to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bymonth": { "items": { "description": "Indicates months of the year that this rule should recur.", "type": "number" }, "nullable": true, "type": "array" }, "bymonthday": { "items": { "description": "Indicates the days of the month to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bysecond": { "items": { "description": "Indicates seconds of the day to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bysetpos": { "items": { "description": "A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.", "type": "number" }, "nullable": true, "type": "array" }, "byweekday": { "items": { "anyOf": [ { "type": "string" }, { "type": "number" } ], "description": "Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination." }, "nullable": true, "type": "array" }, "byweekno": { "items": { "description": "Indicates number of the week hours to recur.", "type": "number" }, "nullable": true, "type": "array" }, "byyearday": { "items": { "description": "Indicates the days of the year that this rule should recur.", "type": "number" }, "nullable": true, "type": "array" }, "count": { "description": "Number of times the rule should recur until it stops.", "type": "number" }, "dtstart": { "description": "Rule start date in Coordinated Universal Time (UTC).", "type": "string" }, "freq": { "description": "Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.", "enum": [ 0, 1, 2, 3, 4, 5, 6 ], "type": "integer" }, "interval": { "description": "Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.", "type": "number" }, "tzid": { "description": "Indicates timezone abbreviation.", "type": "string" }, "until": { "description": "Recur the rule until this date.", "type": "string" }, "wkst": { "description": "Indicates the start of week, defaults to Monday.", "enum": [ "MO", "TU", "WE", "TH", "FR", "SA", "SU" ], "type": "string" } }, "required": [ "dtstart", "tzid" ], "type": "object" }, "skipRecurrences": { "items": { "description": "Skips recurrence of rule on this date.", "type": "string" }, "type": "array" } }, "required": [ "duration", "rRule" ], "type": "object" }, "type": "array" }, "tags": { "items": { "description": "The tags for the rule.", "type": "string" }, "type": "array" }, "throttle": { "deprecated": true, "description": "Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" }, "updated_at": { "description": "The date and time that the rule was updated most recently.", "type": "string" }, "updated_by": { "description": "The identifier for the user that updated this rule most recently.", "nullable": true, "type": "string" }, "view_in_app_relative_url": { "description": "Relative URL to view rule in the app.", "nullable": true, "type": "string" } }, "required": [ "id", "enabled", "name", "tags", "rule_type_id", "consumer", "schedule", "actions", "params", "created_by", "updated_by", "created_at", "updated_at", "api_key_owner", "mute_all", "muted_alert_ids", "execution_status", "revision" ], "type": "object" } } }, "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule with the given ID does not exist." } }, "summary": "Get rule details", "tags": [ "alerting" ] }, "post": { "operationId": "post-alerting-rule-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule. If it is omitted, an ID is randomly generated.", "in": "path", "name": "id", "required": false, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actions": { "default": [], "items": { "additionalProperties": false, "description": "An action that runs under defined conditions.", "properties": { "alerts_filter": { "additionalProperties": false, "description": "Conditions that affect whether the action runs. If you specify multiple conditions, all conditions must be met for the action to run. For example, if an alert occurs within the specified time frame and matches the query, the action runs.", "properties": { "query": { "additionalProperties": false, "properties": { "dsl": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL).", "type": "string" }, "filters": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.", "items": { "additionalProperties": false, "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "A filter can be either specific to an application context or applied globally.", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": {}, "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "kql": { "description": "A filter written in Kibana Query Language (KQL).", "type": "string" } }, "required": [ "kql", "filters" ], "type": "object" }, "timeframe": { "additionalProperties": false, "description": "Defines a period that limits whether the action runs.", "properties": { "days": { "description": "Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.", "items": { "enum": [ 1, 2, 3, 4, 5, 6, 7 ], "type": "integer" }, "type": "array" }, "hours": { "additionalProperties": false, "description": "Defines the range of time in a day that the action can run. If the `start` value is `00:00` and the `end` value is `24:00`, actions be generated all day.", "properties": { "end": { "description": "The end of the time frame in 24-hour notation (`hh:mm`).", "type": "string" }, "start": { "description": "The start of the time frame in 24-hour notation (`hh:mm`).", "type": "string" } }, "required": [ "start", "end" ], "type": "object" }, "timezone": { "description": "The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.", "type": "string" } }, "required": [ "days", "hours", "timezone" ], "type": "object" } }, "type": "object" }, "frequency": { "additionalProperties": false, "properties": { "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "type": "string" }, "summary": { "description": "Indicates whether the action is a summary.", "type": "boolean" }, "throttle": { "description": "The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" } }, "required": [ "summary", "notify_when", "throttle" ], "type": "object" }, "group": { "description": "The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.", "type": "string" }, "id": { "description": "The identifier for the connector saved object.", "type": "string" }, "params": { "additionalProperties": {}, "default": {}, "description": "The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.", "type": "object" }, "use_alert_data_for_template": { "description": "Indicates whether to use alert data as a template.", "type": "boolean" }, "uuid": { "description": "A universally unique identifier (UUID) for the action.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "alert_delay": { "additionalProperties": false, "description": "Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.", "properties": { "active": { "description": "The number of consecutive runs that must meet the rule conditions.", "type": "number" } }, "required": [ "active" ], "type": "object" }, "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 to run the rule on an interval basis after it is created.", "type": "boolean" }, "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.", "nullable": true, "properties": { "look_back_window": { "description": "The minimum number of runs in which the threshold must be met.", "maximum": 20, "minimum": 2, "type": "number" }, "status_change_threshold": { "description": "The minimum number of times an alert must switch states in the look back window.", "maximum": 20, "minimum": 2, "type": "number" } }, "required": [ "look_back_window", "status_change_threshold" ], "type": "object" }, "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 often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "nullable": true, "type": "string" }, "params": { "additionalProperties": {}, "default": {}, "description": "The parameters for the rule.", "type": "object" }, "rule_type_id": { "description": "The rule type identifier.", "type": "string" }, "schedule": { "additionalProperties": false, "description": "The check interval, which specifies how frequently the rule conditions are checked.", "properties": { "interval": { "description": "The interval is specified in seconds, minutes, hours, or days.", "type": "string" } }, "required": [ "interval" ], "type": "object" }, "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 often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" } }, "required": [ "name", "rule_type_id", "consumer", "schedule" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actions": { "items": { "additionalProperties": false, "properties": { "alerts_filter": { "additionalProperties": false, "description": "Defines a period that limits whether the action runs.", "properties": { "query": { "additionalProperties": false, "properties": { "dsl": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL).", "type": "string" }, "filters": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.", "items": { "additionalProperties": false, "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "A filter can be either specific to an application context or applied globally.", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": {}, "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "kql": { "description": "A filter written in Kibana Query Language (KQL).", "type": "string" } }, "required": [ "kql", "filters" ], "type": "object" }, "timeframe": { "additionalProperties": false, "properties": { "days": { "description": "Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.", "items": { "enum": [ 1, 2, 3, 4, 5, 6, 7 ], "type": "integer" }, "type": "array" }, "hours": { "additionalProperties": false, "properties": { "end": { "description": "The end of the time frame in 24-hour notation (`hh:mm`).", "type": "string" }, "start": { "description": "The start of the time frame in 24-hour notation (`hh:mm`).", "type": "string" } }, "required": [ "start", "end" ], "type": "object" }, "timezone": { "description": "The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.", "type": "string" } }, "required": [ "days", "hours", "timezone" ], "type": "object" } }, "type": "object" }, "connector_type_id": { "description": "The type of connector. This property appears in responses but cannot be set in requests.", "type": "string" }, "frequency": { "additionalProperties": false, "properties": { "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "type": "string" }, "summary": { "description": "Indicates whether the action is a summary.", "type": "boolean" }, "throttle": { "description": "The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" } }, "required": [ "summary", "notify_when", "throttle" ], "type": "object" }, "group": { "description": "The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.", "type": "string" }, "id": { "description": "The identifier for the connector saved object.", "type": "string" }, "params": { "additionalProperties": {}, "description": "The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.", "type": "object" }, "use_alert_data_for_template": { "description": "Indicates whether to use alert data as a template.", "type": "boolean" }, "uuid": { "description": "A universally unique identifier (UUID) for the action.", "type": "string" } }, "required": [ "id", "connector_type_id", "params" ], "type": "object" }, "type": "array" }, "active_snoozes": { "items": { "description": "List of active snoozes for the rule.", "type": "string" }, "type": "array" }, "alert_delay": { "additionalProperties": false, "description": "Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.", "properties": { "active": { "description": "The number of consecutive runs that must meet the rule conditions.", "type": "number" } }, "required": [ "active" ], "type": "object" }, "api_key_created_by_user": { "description": "Indicates whether the API key that is associated with the rule was created by the user.", "nullable": true, "type": "boolean" }, "api_key_owner": { "description": "The owner of the API key that is associated with the rule and used to run background tasks.", "nullable": true, "type": "string" }, "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" }, "created_at": { "description": "The date and time that the rule was created.", "type": "string" }, "created_by": { "description": "The identifier for the user that created the rule.", "nullable": true, "type": "string" }, "enabled": { "description": "Indicates whether you want to run the rule on an interval basis after it is created.", "type": "boolean" }, "execution_status": { "additionalProperties": false, "properties": { "error": { "additionalProperties": false, "properties": { "message": { "description": "Error message.", "type": "string" }, "reason": { "description": "Reason for error.", "enum": [ "read", "decrypt", "execute", "unknown", "license", "timeout", "disabled", "validate" ], "type": "string" } }, "required": [ "reason", "message" ], "type": "object" }, "last_duration": { "description": "Duration of last execution of the rule.", "type": "number" }, "last_execution_date": { "description": "The date and time when rule was executed last.", "type": "string" }, "status": { "description": "Status of rule execution.", "enum": [ "ok", "active", "error", "warning", "pending", "unknown" ], "type": "string" }, "warning": { "additionalProperties": false, "properties": { "message": { "description": "Warning message.", "type": "string" }, "reason": { "description": "Reason for warning.", "enum": [ "maxExecutableActions", "maxAlerts", "maxQueuedActions", "ruleExecution" ], "type": "string" } }, "required": [ "reason", "message" ], "type": "object" } }, "required": [ "status", "last_execution_date" ], "type": "object" }, "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.", "nullable": true, "properties": { "look_back_window": { "description": "The minimum number of runs in which the threshold must be met.", "maximum": 20, "minimum": 2, "type": "number" }, "status_change_threshold": { "description": "The minimum number of times an alert must switch states in the look back window.", "maximum": 20, "minimum": 2, "type": "number" } }, "required": [ "look_back_window", "status_change_threshold" ], "type": "object" }, "id": { "description": "The identifier for the rule.", "type": "string" }, "is_snoozed_until": { "description": "The date when the rule will no longer be snoozed.", "nullable": true, "type": "string" }, "last_run": { "additionalProperties": false, "nullable": true, "properties": { "alerts_count": { "additionalProperties": false, "properties": { "active": { "description": "Number of active alerts during last run.", "nullable": true, "type": "number" }, "ignored": { "description": "Number of ignored alerts during last run.", "nullable": true, "type": "number" }, "new": { "description": "Number of new alerts during last run.", "nullable": true, "type": "number" }, "recovered": { "description": "Number of recovered alerts during last run.", "nullable": true, "type": "number" } }, "type": "object" }, "outcome": { "description": "Outcome of last run of the rule. Value could be succeeded, warning or failed.", "enum": [ "succeeded", "warning", "failed" ], "type": "string" }, "outcome_msg": { "items": { "description": "Outcome message generated during last rule run.", "type": "string" }, "nullable": true, "type": "array" }, "outcome_order": { "description": "Order of the outcome.", "type": "number" }, "warning": { "description": "Warning of last rule execution.", "enum": [ "read", "decrypt", "execute", "unknown", "license", "timeout", "disabled", "validate", "maxExecutableActions", "maxAlerts", "maxQueuedActions", "ruleExecution" ], "nullable": true, "type": "string" } }, "required": [ "outcome", "alerts_count" ], "type": "object" }, "mapped_params": { "additionalProperties": {}, "type": "object" }, "monitoring": { "additionalProperties": false, "description": "Monitoring details of the rule.", "properties": { "run": { "additionalProperties": false, "description": "Rule run details.", "properties": { "calculated_metrics": { "additionalProperties": false, "description": "Calculation of different percentiles and success ratio.", "properties": { "p50": { "type": "number" }, "p95": { "type": "number" }, "p99": { "type": "number" }, "success_ratio": { "type": "number" } }, "required": [ "success_ratio" ], "type": "object" }, "history": { "description": "History of the rule run.", "items": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of the rule run.", "type": "number" }, "outcome": { "description": "Outcome of last run of the rule. Value could be succeeded, warning or failed.", "enum": [ "succeeded", "warning", "failed" ], "type": "string" }, "success": { "description": "Indicates whether the rule run was successful.", "type": "boolean" }, "timestamp": { "description": "Time of rule run.", "type": "number" } }, "required": [ "success", "timestamp" ], "type": "object" }, "type": "array" }, "last_run": { "additionalProperties": false, "properties": { "metrics": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of most recent rule run.", "type": "number" }, "gap_duration_s": { "description": "Duration in seconds of rule run gap.", "nullable": true, "type": "number" }, "gap_range": { "additionalProperties": false, "nullable": true, "properties": { "gte": { "description": "End of the gap range.", "type": "string" }, "lte": { "description": "Start of the gap range.", "type": "string" } }, "required": [ "lte", "gte" ], "type": "object" }, "total_alerts_created": { "description": "Total number of alerts created during last rule run.", "nullable": true, "type": "number" }, "total_alerts_detected": { "description": "Total number of alerts detected during last rule run.", "nullable": true, "type": "number" }, "total_indexing_duration_ms": { "description": "Total time spent indexing documents during last rule run in milliseconds.", "nullable": true, "type": "number" }, "total_search_duration_ms": { "description": "Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.", "nullable": true, "type": "number" } }, "type": "object" }, "timestamp": { "description": "Time of the most recent rule run.", "type": "string" } }, "required": [ "timestamp", "metrics" ], "type": "object" } }, "required": [ "history", "calculated_metrics", "last_run" ], "type": "object" } }, "required": [ "run" ], "type": "object" }, "mute_all": { "description": "Indicates whether all alerts are muted.", "type": "boolean" }, "muted_alert_ids": { "items": { "description": "List of identifiers of muted alerts. ", "type": "string" }, "type": "array" }, "name": { "description": " The name of the rule.", "type": "string" }, "next_run": { "description": "Date and time of the next run of the rule.", "nullable": true, "type": "string" }, "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "nullable": true, "type": "string" }, "params": { "additionalProperties": {}, "description": "The parameters for the rule.", "type": "object" }, "revision": { "description": "The rule revision number.", "type": "number" }, "rule_type_id": { "description": "The rule type identifier.", "type": "string" }, "running": { "description": "Indicates whether the rule is running.", "nullable": true, "type": "boolean" }, "schedule": { "additionalProperties": false, "properties": { "interval": { "description": "The interval is specified in seconds, minutes, hours, or days.", "type": "string" } }, "required": [ "interval" ], "type": "object" }, "scheduled_task_id": { "description": "Identifier of the scheduled task.", "type": "string" }, "snooze_schedule": { "items": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of the rule snooze schedule.", "type": "number" }, "id": { "description": "Identifier of the rule snooze schedule.", "type": "string" }, "rRule": { "additionalProperties": false, "properties": { "byhour": { "items": { "description": "Indicates hours of the day to recur.", "type": "number" }, "nullable": true, "type": "array" }, "byminute": { "items": { "description": "Indicates minutes of the hour to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bymonth": { "items": { "description": "Indicates months of the year that this rule should recur.", "type": "number" }, "nullable": true, "type": "array" }, "bymonthday": { "items": { "description": "Indicates the days of the month to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bysecond": { "items": { "description": "Indicates seconds of the day to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bysetpos": { "items": { "description": "A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.", "type": "number" }, "nullable": true, "type": "array" }, "byweekday": { "items": { "anyOf": [ { "type": "string" }, { "type": "number" } ], "description": "Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination." }, "nullable": true, "type": "array" }, "byweekno": { "items": { "description": "Indicates number of the week hours to recur.", "type": "number" }, "nullable": true, "type": "array" }, "byyearday": { "items": { "description": "Indicates the days of the year that this rule should recur.", "type": "number" }, "nullable": true, "type": "array" }, "count": { "description": "Number of times the rule should recur until it stops.", "type": "number" }, "dtstart": { "description": "Rule start date in Coordinated Universal Time (UTC).", "type": "string" }, "freq": { "description": "Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.", "enum": [ 0, 1, 2, 3, 4, 5, 6 ], "type": "integer" }, "interval": { "description": "Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.", "type": "number" }, "tzid": { "description": "Indicates timezone abbreviation.", "type": "string" }, "until": { "description": "Recur the rule until this date.", "type": "string" }, "wkst": { "description": "Indicates the start of week, defaults to Monday.", "enum": [ "MO", "TU", "WE", "TH", "FR", "SA", "SU" ], "type": "string" } }, "required": [ "dtstart", "tzid" ], "type": "object" }, "skipRecurrences": { "items": { "description": "Skips recurrence of rule on this date.", "type": "string" }, "type": "array" } }, "required": [ "duration", "rRule" ], "type": "object" }, "type": "array" }, "tags": { "items": { "description": "The tags for the rule.", "type": "string" }, "type": "array" }, "throttle": { "deprecated": true, "description": "Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" }, "updated_at": { "description": "The date and time that the rule was updated most recently.", "type": "string" }, "updated_by": { "description": "The identifier for the user that updated this rule most recently.", "nullable": true, "type": "string" }, "view_in_app_relative_url": { "description": "Relative URL to view rule in the app.", "nullable": true, "type": "string" } }, "required": [ "id", "enabled", "name", "tags", "rule_type_id", "consumer", "schedule", "actions", "params", "created_by", "updated_by", "created_at", "updated_at", "api_key_owner", "mute_all", "muted_alert_ids", "execution_status", "revision" ], "type": "object" } } }, "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "409": { "description": "Indicates that the rule id is already in use." } }, "summary": "Create a rule", "tags": [ "alerting" ] }, "put": { "operationId": "put-alerting-rule-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actions": { "default": [], "items": { "additionalProperties": false, "description": "An action that runs under defined conditions.", "properties": { "alerts_filter": { "additionalProperties": false, "properties": { "query": { "additionalProperties": false, "properties": { "dsl": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL).", "type": "string" }, "filters": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.", "items": { "additionalProperties": false, "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "A filter can be either specific to an application context or applied globally.", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": {}, "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "kql": { "description": "A filter written in Kibana Query Language (KQL).", "type": "string" } }, "required": [ "kql", "filters" ], "type": "object" }, "timeframe": { "additionalProperties": false, "description": "Defines a period that limits whether the action runs.", "properties": { "days": { "description": "Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.", "items": { "enum": [ 1, 2, 3, 4, 5, 6, 7 ], "type": "integer" }, "type": "array" }, "hours": { "additionalProperties": false, "description": "Defines the range of time in a day that the action can run. If the `start` value is `00:00` and the `end` value is `24:00`, actions be generated all day.", "properties": { "end": { "description": "The end of the time frame in 24-hour notation (`hh:mm`).", "type": "string" }, "start": { "description": "The start of the time frame in 24-hour notation (`hh:mm`).", "type": "string" } }, "required": [ "start", "end" ], "type": "object" }, "timezone": { "description": "The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.", "type": "string" } }, "required": [ "days", "hours", "timezone" ], "type": "object" } }, "type": "object" }, "frequency": { "additionalProperties": false, "properties": { "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "type": "string" }, "summary": { "description": "Indicates whether the action is a summary.", "type": "boolean" }, "throttle": { "description": "The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" } }, "required": [ "summary", "notify_when", "throttle" ], "type": "object" }, "group": { "description": "The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.", "type": "string" }, "id": { "description": "The identifier for the connector saved object.", "type": "string" }, "params": { "additionalProperties": {}, "default": {}, "description": "The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.", "type": "object" }, "use_alert_data_for_template": { "description": "Indicates whether to use alert data as a template.", "type": "boolean" }, "uuid": { "description": "A universally unique identifier (UUID) for the action.", "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "alert_delay": { "additionalProperties": false, "description": "Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.", "properties": { "active": { "description": "The number of consecutive runs that must meet the rule conditions.", "type": "number" } }, "required": [ "active" ], "type": "object" }, "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.", "nullable": true, "properties": { "look_back_window": { "description": "The minimum number of runs in which the threshold must be met.", "maximum": 20, "minimum": 2, "type": "number" }, "status_change_threshold": { "description": "The minimum number of times an alert must switch states in the look back window.", "maximum": 20, "minimum": 2, "type": "number" } }, "required": [ "look_back_window", "status_change_threshold" ], "type": "object" }, "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 often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "nullable": true, "type": "string" }, "params": { "additionalProperties": {}, "default": {}, "description": "The parameters for the rule.", "type": "object" }, "schedule": { "additionalProperties": false, "properties": { "interval": { "description": "The interval is specified in seconds, minutes, hours, or days.", "type": "string" } }, "required": [ "interval" ], "type": "object" }, "tags": { "default": [], "items": { "description": "The tags for the rule.", "type": "string" }, "type": "array" }, "throttle": { "description": "Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" } }, "required": [ "name", "schedule" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actions": { "items": { "additionalProperties": false, "properties": { "alerts_filter": { "additionalProperties": false, "description": "Defines a period that limits whether the action runs.", "properties": { "query": { "additionalProperties": false, "properties": { "dsl": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL).", "type": "string" }, "filters": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.", "items": { "additionalProperties": false, "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "A filter can be either specific to an application context or applied globally.", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": {}, "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "kql": { "description": "A filter written in Kibana Query Language (KQL).", "type": "string" } }, "required": [ "kql", "filters" ], "type": "object" }, "timeframe": { "additionalProperties": false, "properties": { "days": { "description": "Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.", "items": { "enum": [ 1, 2, 3, 4, 5, 6, 7 ], "type": "integer" }, "type": "array" }, "hours": { "additionalProperties": false, "properties": { "end": { "description": "The end of the time frame in 24-hour notation (`hh:mm`).", "type": "string" }, "start": { "description": "The start of the time frame in 24-hour notation (`hh:mm`).", "type": "string" } }, "required": [ "start", "end" ], "type": "object" }, "timezone": { "description": "The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.", "type": "string" } }, "required": [ "days", "hours", "timezone" ], "type": "object" } }, "type": "object" }, "connector_type_id": { "description": "The type of connector. This property appears in responses but cannot be set in requests.", "type": "string" }, "frequency": { "additionalProperties": false, "properties": { "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "type": "string" }, "summary": { "description": "Indicates whether the action is a summary.", "type": "boolean" }, "throttle": { "description": "The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" } }, "required": [ "summary", "notify_when", "throttle" ], "type": "object" }, "group": { "description": "The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.", "type": "string" }, "id": { "description": "The identifier for the connector saved object.", "type": "string" }, "params": { "additionalProperties": {}, "description": "The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.", "type": "object" }, "use_alert_data_for_template": { "description": "Indicates whether to use alert data as a template.", "type": "boolean" }, "uuid": { "description": "A universally unique identifier (UUID) for the action.", "type": "string" } }, "required": [ "id", "connector_type_id", "params" ], "type": "object" }, "type": "array" }, "active_snoozes": { "items": { "description": "List of active snoozes for the rule.", "type": "string" }, "type": "array" }, "alert_delay": { "additionalProperties": false, "description": "Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.", "properties": { "active": { "description": "The number of consecutive runs that must meet the rule conditions.", "type": "number" } }, "required": [ "active" ], "type": "object" }, "api_key_created_by_user": { "description": "Indicates whether the API key that is associated with the rule was created by the user.", "nullable": true, "type": "boolean" }, "api_key_owner": { "description": "The owner of the API key that is associated with the rule and used to run background tasks.", "nullable": true, "type": "string" }, "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" }, "created_at": { "description": "The date and time that the rule was created.", "type": "string" }, "created_by": { "description": "The identifier for the user that created the rule.", "nullable": true, "type": "string" }, "enabled": { "description": "Indicates whether you want to run the rule on an interval basis after it is created.", "type": "boolean" }, "execution_status": { "additionalProperties": false, "properties": { "error": { "additionalProperties": false, "properties": { "message": { "description": "Error message.", "type": "string" }, "reason": { "description": "Reason for error.", "enum": [ "read", "decrypt", "execute", "unknown", "license", "timeout", "disabled", "validate" ], "type": "string" } }, "required": [ "reason", "message" ], "type": "object" }, "last_duration": { "description": "Duration of last execution of the rule.", "type": "number" }, "last_execution_date": { "description": "The date and time when rule was executed last.", "type": "string" }, "status": { "description": "Status of rule execution.", "enum": [ "ok", "active", "error", "warning", "pending", "unknown" ], "type": "string" }, "warning": { "additionalProperties": false, "properties": { "message": { "description": "Warning message.", "type": "string" }, "reason": { "description": "Reason for warning.", "enum": [ "maxExecutableActions", "maxAlerts", "maxQueuedActions", "ruleExecution" ], "type": "string" } }, "required": [ "reason", "message" ], "type": "object" } }, "required": [ "status", "last_execution_date" ], "type": "object" }, "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.", "nullable": true, "properties": { "look_back_window": { "description": "The minimum number of runs in which the threshold must be met.", "maximum": 20, "minimum": 2, "type": "number" }, "status_change_threshold": { "description": "The minimum number of times an alert must switch states in the look back window.", "maximum": 20, "minimum": 2, "type": "number" } }, "required": [ "look_back_window", "status_change_threshold" ], "type": "object" }, "id": { "description": "The identifier for the rule.", "type": "string" }, "is_snoozed_until": { "description": "The date when the rule will no longer be snoozed.", "nullable": true, "type": "string" }, "last_run": { "additionalProperties": false, "nullable": true, "properties": { "alerts_count": { "additionalProperties": false, "properties": { "active": { "description": "Number of active alerts during last run.", "nullable": true, "type": "number" }, "ignored": { "description": "Number of ignored alerts during last run.", "nullable": true, "type": "number" }, "new": { "description": "Number of new alerts during last run.", "nullable": true, "type": "number" }, "recovered": { "description": "Number of recovered alerts during last run.", "nullable": true, "type": "number" } }, "type": "object" }, "outcome": { "description": "Outcome of last run of the rule. Value could be succeeded, warning or failed.", "enum": [ "succeeded", "warning", "failed" ], "type": "string" }, "outcome_msg": { "items": { "description": "Outcome message generated during last rule run.", "type": "string" }, "nullable": true, "type": "array" }, "outcome_order": { "description": "Order of the outcome.", "type": "number" }, "warning": { "description": "Warning of last rule execution.", "enum": [ "read", "decrypt", "execute", "unknown", "license", "timeout", "disabled", "validate", "maxExecutableActions", "maxAlerts", "maxQueuedActions", "ruleExecution" ], "nullable": true, "type": "string" } }, "required": [ "outcome", "alerts_count" ], "type": "object" }, "mapped_params": { "additionalProperties": {}, "type": "object" }, "monitoring": { "additionalProperties": false, "description": "Monitoring details of the rule.", "properties": { "run": { "additionalProperties": false, "description": "Rule run details.", "properties": { "calculated_metrics": { "additionalProperties": false, "description": "Calculation of different percentiles and success ratio.", "properties": { "p50": { "type": "number" }, "p95": { "type": "number" }, "p99": { "type": "number" }, "success_ratio": { "type": "number" } }, "required": [ "success_ratio" ], "type": "object" }, "history": { "description": "History of the rule run.", "items": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of the rule run.", "type": "number" }, "outcome": { "description": "Outcome of last run of the rule. Value could be succeeded, warning or failed.", "enum": [ "succeeded", "warning", "failed" ], "type": "string" }, "success": { "description": "Indicates whether the rule run was successful.", "type": "boolean" }, "timestamp": { "description": "Time of rule run.", "type": "number" } }, "required": [ "success", "timestamp" ], "type": "object" }, "type": "array" }, "last_run": { "additionalProperties": false, "properties": { "metrics": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of most recent rule run.", "type": "number" }, "gap_duration_s": { "description": "Duration in seconds of rule run gap.", "nullable": true, "type": "number" }, "gap_range": { "additionalProperties": false, "nullable": true, "properties": { "gte": { "description": "End of the gap range.", "type": "string" }, "lte": { "description": "Start of the gap range.", "type": "string" } }, "required": [ "lte", "gte" ], "type": "object" }, "total_alerts_created": { "description": "Total number of alerts created during last rule run.", "nullable": true, "type": "number" }, "total_alerts_detected": { "description": "Total number of alerts detected during last rule run.", "nullable": true, "type": "number" }, "total_indexing_duration_ms": { "description": "Total time spent indexing documents during last rule run in milliseconds.", "nullable": true, "type": "number" }, "total_search_duration_ms": { "description": "Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.", "nullable": true, "type": "number" } }, "type": "object" }, "timestamp": { "description": "Time of the most recent rule run.", "type": "string" } }, "required": [ "timestamp", "metrics" ], "type": "object" } }, "required": [ "history", "calculated_metrics", "last_run" ], "type": "object" } }, "required": [ "run" ], "type": "object" }, "mute_all": { "description": "Indicates whether all alerts are muted.", "type": "boolean" }, "muted_alert_ids": { "items": { "description": "List of identifiers of muted alerts. ", "type": "string" }, "type": "array" }, "name": { "description": " The name of the rule.", "type": "string" }, "next_run": { "description": "Date and time of the next run of the rule.", "nullable": true, "type": "string" }, "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "nullable": true, "type": "string" }, "params": { "additionalProperties": {}, "description": "The parameters for the rule.", "type": "object" }, "revision": { "description": "The rule revision number.", "type": "number" }, "rule_type_id": { "description": "The rule type identifier.", "type": "string" }, "running": { "description": "Indicates whether the rule is running.", "nullable": true, "type": "boolean" }, "schedule": { "additionalProperties": false, "properties": { "interval": { "description": "The interval is specified in seconds, minutes, hours, or days.", "type": "string" } }, "required": [ "interval" ], "type": "object" }, "scheduled_task_id": { "description": "Identifier of the scheduled task.", "type": "string" }, "snooze_schedule": { "items": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of the rule snooze schedule.", "type": "number" }, "id": { "description": "Identifier of the rule snooze schedule.", "type": "string" }, "rRule": { "additionalProperties": false, "properties": { "byhour": { "items": { "description": "Indicates hours of the day to recur.", "type": "number" }, "nullable": true, "type": "array" }, "byminute": { "items": { "description": "Indicates minutes of the hour to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bymonth": { "items": { "description": "Indicates months of the year that this rule should recur.", "type": "number" }, "nullable": true, "type": "array" }, "bymonthday": { "items": { "description": "Indicates the days of the month to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bysecond": { "items": { "description": "Indicates seconds of the day to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bysetpos": { "items": { "description": "A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.", "type": "number" }, "nullable": true, "type": "array" }, "byweekday": { "items": { "anyOf": [ { "type": "string" }, { "type": "number" } ], "description": "Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination." }, "nullable": true, "type": "array" }, "byweekno": { "items": { "description": "Indicates number of the week hours to recur.", "type": "number" }, "nullable": true, "type": "array" }, "byyearday": { "items": { "description": "Indicates the days of the year that this rule should recur.", "type": "number" }, "nullable": true, "type": "array" }, "count": { "description": "Number of times the rule should recur until it stops.", "type": "number" }, "dtstart": { "description": "Rule start date in Coordinated Universal Time (UTC).", "type": "string" }, "freq": { "description": "Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.", "enum": [ 0, 1, 2, 3, 4, 5, 6 ], "type": "integer" }, "interval": { "description": "Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.", "type": "number" }, "tzid": { "description": "Indicates timezone abbreviation.", "type": "string" }, "until": { "description": "Recur the rule until this date.", "type": "string" }, "wkst": { "description": "Indicates the start of week, defaults to Monday.", "enum": [ "MO", "TU", "WE", "TH", "FR", "SA", "SU" ], "type": "string" } }, "required": [ "dtstart", "tzid" ], "type": "object" }, "skipRecurrences": { "items": { "description": "Skips recurrence of rule on this date.", "type": "string" }, "type": "array" } }, "required": [ "duration", "rRule" ], "type": "object" }, "type": "array" }, "tags": { "items": { "description": "The tags for the rule.", "type": "string" }, "type": "array" }, "throttle": { "deprecated": true, "description": "Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" }, "updated_at": { "description": "The date and time that the rule was updated most recently.", "type": "string" }, "updated_by": { "description": "The identifier for the user that updated this rule most recently.", "nullable": true, "type": "string" }, "view_in_app_relative_url": { "description": "Relative URL to view rule in the app.", "nullable": true, "type": "string" } }, "required": [ "id", "enabled", "name", "tags", "rule_type_id", "consumer", "schedule", "actions", "params", "created_by", "updated_by", "created_at", "updated_at", "api_key_owner", "mute_all", "muted_alert_ids", "execution_status", "revision" ], "type": "object" } } }, "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule with the given ID does not exist." }, "409": { "description": "Indicates that the rule has already been updated by another user." } }, "summary": "Update a rule", "tags": [ "alerting" ] } }, "/api/alerting/rule/{id}/_disable": { "post": { "operationId": "post-alerting-rule-id-disable", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "nullable": true, "properties": { "untrack": { "description": "Defines whether this rule's alerts should be untracked.", "type": "boolean" } }, "type": "object", "x-oas-optional": true } } } }, "responses": { "204": { "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule with the given ID does not exist." } }, "summary": "Disable a rule", "tags": [ "alerting" ] } }, "/api/alerting/rule/{id}/_enable": { "post": { "operationId": "post-alerting-rule-id-enable", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule with the given ID does not exist." } }, "summary": "Enable a rule", "tags": [ "alerting" ] } }, "/api/alerting/rule/{id}/_mute_all": { "post": { "operationId": "post-alerting-rule-id-mute-all", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule with the given ID does not exist." } }, "summary": "Mute all alerts", "tags": [ "alerting" ] } }, "/api/alerting/rule/{id}/_unmute_all": { "post": { "operationId": "post-alerting-rule-id-unmute-all", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule with the given ID does not exist." } }, "summary": "Unmute all alerts", "tags": [ "alerting" ] } }, "/api/alerting/rule/{id}/_update_api_key": { "post": { "operationId": "post-alerting-rule-id-update-api-key", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule with the given ID does not exist." }, "409": { "description": "Indicates that the rule has already been updated by another user." } }, "summary": "Update the API key for a rule", "tags": [ "alerting" ] } }, "/api/alerting/rule/{rule_id}/alert/{alert_id}/_mute": { "post": { "operationId": "post-alerting-rule-rule-id-alert-alert-id-mute", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule.", "in": "path", "name": "rule_id", "required": true, "schema": { "type": "string" } }, { "description": "The identifier for the alert.", "in": "path", "name": "alert_id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule or alert with the given ID does not exist." } }, "summary": "Mute an alert", "tags": [ "alerting" ] } }, "/api/alerting/rule/{rule_id}/alert/{alert_id}/_unmute": { "post": { "operationId": "post-alerting-rule-rule-id-alert-alert-id-unmute", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The identifier for the rule.", "in": "path", "name": "rule_id", "required": true, "schema": { "type": "string" } }, { "description": "The identifier for the alert.", "in": "path", "name": "alert_id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." }, "404": { "description": "Indicates a rule or alert with the given ID does not exist." } }, "summary": "Unmute an alert", "tags": [ "alerting" ] } }, "/api/alerting/rules/_find": { "get": { "operationId": "get-alerting-rules-find", "parameters": [ { "description": "The number of rules to return per page.", "in": "query", "name": "per_page", "required": false, "schema": { "default": 10, "minimum": 0, "type": "number" } }, { "description": "The page number to return.", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "minimum": 1, "type": "number" } }, { "description": "An Elasticsearch simple_query_string query that filters the objects in the response.", "in": "query", "name": "search", "required": false, "schema": { "type": "string" } }, { "description": "The default operator to use for the simple_query_string.", "in": "query", "name": "default_search_operator", "required": false, "schema": { "default": "OR", "enum": [ "OR", "AND" ], "type": "string" } }, { "description": "The fields to perform the simple_query_string parsed query against.", "in": "query", "name": "search_fields", "required": false, "schema": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] } }, { "description": "Determines which field is used to sort the results. The field must exist in the `attributes` key of the response.", "in": "query", "name": "sort_field", "required": false, "schema": { "type": "string" } }, { "description": "Determines the sort order.", "in": "query", "name": "sort_order", "required": false, "schema": { "enum": [ "asc", "desc" ], "type": "string" } }, { "description": "Filters the rules that have a relation with the reference objects with a specific type and identifier.", "in": "query", "name": "has_reference", "required": false, "schema": { "additionalProperties": false, "nullable": true, "properties": { "id": { "type": "string" }, "type": { "type": "string" } }, "required": [ "type", "id" ], "type": "object" } }, { "in": "query", "name": "fields", "required": false, "schema": { "items": { "description": "The fields to return in the `attributes` key of the response.", "type": "string" }, "type": "array" } }, { "description": "A KQL string that you filter with an attribute from your saved object. It should look like `savedObjectType.attributes.title: \"myTitle\"`. However, if you used a direct attribute of a saved object, such as `updatedAt`, you must define your filter, for example, `savedObjectType.updatedAt > 2018-12-22`.", "in": "query", "name": "filter", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "filter_consumers", "required": false, "schema": { "items": { "description": "List of consumers to filter.", "type": "string" }, "type": "array" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actions": { "items": { "additionalProperties": false, "properties": { "alerts_filter": { "additionalProperties": false, "description": "Defines a period that limits whether the action runs.", "properties": { "query": { "additionalProperties": false, "properties": { "dsl": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL).", "type": "string" }, "filters": { "description": "A filter written in Elasticsearch Query Domain Specific Language (DSL) as defined in the `kbn-es-query` package.", "items": { "additionalProperties": false, "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "A filter can be either specific to an application context or applied globally.", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": {}, "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "kql": { "description": "A filter written in Kibana Query Language (KQL).", "type": "string" } }, "required": [ "kql", "filters" ], "type": "object" }, "timeframe": { "additionalProperties": false, "properties": { "days": { "description": "Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week.", "items": { "enum": [ 1, 2, 3, 4, 5, 6, 7 ], "type": "integer" }, "type": "array" }, "hours": { "additionalProperties": false, "properties": { "end": { "description": "The end of the time frame in 24-hour notation (`hh:mm`).", "type": "string" }, "start": { "description": "The start of the time frame in 24-hour notation (`hh:mm`).", "type": "string" } }, "required": [ "start", "end" ], "type": "object" }, "timezone": { "description": "The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.", "type": "string" } }, "required": [ "days", "hours", "timezone" ], "type": "object" } }, "type": "object" }, "connector_type_id": { "description": "The type of connector. This property appears in responses but cannot be set in requests.", "type": "string" }, "frequency": { "additionalProperties": false, "properties": { "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "type": "string" }, "summary": { "description": "Indicates whether the action is a summary.", "type": "boolean" }, "throttle": { "description": "The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if 'notify_when' is set to 'onThrottleInterval'. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" } }, "required": [ "summary", "notify_when", "throttle" ], "type": "object" }, "group": { "description": "The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.", "type": "string" }, "id": { "description": "The identifier for the connector saved object.", "type": "string" }, "params": { "additionalProperties": {}, "description": "The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.", "type": "object" }, "use_alert_data_for_template": { "description": "Indicates whether to use alert data as a template.", "type": "boolean" }, "uuid": { "description": "A universally unique identifier (UUID) for the action.", "type": "string" } }, "required": [ "id", "connector_type_id", "params" ], "type": "object" }, "type": "array" }, "active_snoozes": { "items": { "description": "List of active snoozes for the rule.", "type": "string" }, "type": "array" }, "alert_delay": { "additionalProperties": false, "description": "Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.", "properties": { "active": { "description": "The number of consecutive runs that must meet the rule conditions.", "type": "number" } }, "required": [ "active" ], "type": "object" }, "api_key_created_by_user": { "description": "Indicates whether the API key that is associated with the rule was created by the user.", "nullable": true, "type": "boolean" }, "api_key_owner": { "description": "The owner of the API key that is associated with the rule and used to run background tasks.", "nullable": true, "type": "string" }, "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" }, "created_at": { "description": "The date and time that the rule was created.", "type": "string" }, "created_by": { "description": "The identifier for the user that created the rule.", "nullable": true, "type": "string" }, "enabled": { "description": "Indicates whether you want to run the rule on an interval basis after it is created.", "type": "boolean" }, "execution_status": { "additionalProperties": false, "properties": { "error": { "additionalProperties": false, "properties": { "message": { "description": "Error message.", "type": "string" }, "reason": { "description": "Reason for error.", "enum": [ "read", "decrypt", "execute", "unknown", "license", "timeout", "disabled", "validate" ], "type": "string" } }, "required": [ "reason", "message" ], "type": "object" }, "last_duration": { "description": "Duration of last execution of the rule.", "type": "number" }, "last_execution_date": { "description": "The date and time when rule was executed last.", "type": "string" }, "status": { "description": "Status of rule execution.", "enum": [ "ok", "active", "error", "warning", "pending", "unknown" ], "type": "string" }, "warning": { "additionalProperties": false, "properties": { "message": { "description": "Warning message.", "type": "string" }, "reason": { "description": "Reason for warning.", "enum": [ "maxExecutableActions", "maxAlerts", "maxQueuedActions", "ruleExecution" ], "type": "string" } }, "required": [ "reason", "message" ], "type": "object" } }, "required": [ "status", "last_execution_date" ], "type": "object" }, "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.", "nullable": true, "properties": { "look_back_window": { "description": "The minimum number of runs in which the threshold must be met.", "maximum": 20, "minimum": 2, "type": "number" }, "status_change_threshold": { "description": "The minimum number of times an alert must switch states in the look back window.", "maximum": 20, "minimum": 2, "type": "number" } }, "required": [ "look_back_window", "status_change_threshold" ], "type": "object" }, "id": { "description": "The identifier for the rule.", "type": "string" }, "is_snoozed_until": { "description": "The date when the rule will no longer be snoozed.", "nullable": true, "type": "string" }, "last_run": { "additionalProperties": false, "nullable": true, "properties": { "alerts_count": { "additionalProperties": false, "properties": { "active": { "description": "Number of active alerts during last run.", "nullable": true, "type": "number" }, "ignored": { "description": "Number of ignored alerts during last run.", "nullable": true, "type": "number" }, "new": { "description": "Number of new alerts during last run.", "nullable": true, "type": "number" }, "recovered": { "description": "Number of recovered alerts during last run.", "nullable": true, "type": "number" } }, "type": "object" }, "outcome": { "description": "Outcome of last run of the rule. Value could be succeeded, warning or failed.", "enum": [ "succeeded", "warning", "failed" ], "type": "string" }, "outcome_msg": { "items": { "description": "Outcome message generated during last rule run.", "type": "string" }, "nullable": true, "type": "array" }, "outcome_order": { "description": "Order of the outcome.", "type": "number" }, "warning": { "description": "Warning of last rule execution.", "enum": [ "read", "decrypt", "execute", "unknown", "license", "timeout", "disabled", "validate", "maxExecutableActions", "maxAlerts", "maxQueuedActions", "ruleExecution" ], "nullable": true, "type": "string" } }, "required": [ "outcome", "alerts_count" ], "type": "object" }, "mapped_params": { "additionalProperties": {}, "type": "object" }, "monitoring": { "additionalProperties": false, "description": "Monitoring details of the rule.", "properties": { "run": { "additionalProperties": false, "description": "Rule run details.", "properties": { "calculated_metrics": { "additionalProperties": false, "description": "Calculation of different percentiles and success ratio.", "properties": { "p50": { "type": "number" }, "p95": { "type": "number" }, "p99": { "type": "number" }, "success_ratio": { "type": "number" } }, "required": [ "success_ratio" ], "type": "object" }, "history": { "description": "History of the rule run.", "items": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of the rule run.", "type": "number" }, "outcome": { "description": "Outcome of last run of the rule. Value could be succeeded, warning or failed.", "enum": [ "succeeded", "warning", "failed" ], "type": "string" }, "success": { "description": "Indicates whether the rule run was successful.", "type": "boolean" }, "timestamp": { "description": "Time of rule run.", "type": "number" } }, "required": [ "success", "timestamp" ], "type": "object" }, "type": "array" }, "last_run": { "additionalProperties": false, "properties": { "metrics": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of most recent rule run.", "type": "number" }, "gap_duration_s": { "description": "Duration in seconds of rule run gap.", "nullable": true, "type": "number" }, "gap_range": { "additionalProperties": false, "nullable": true, "properties": { "gte": { "description": "End of the gap range.", "type": "string" }, "lte": { "description": "Start of the gap range.", "type": "string" } }, "required": [ "lte", "gte" ], "type": "object" }, "total_alerts_created": { "description": "Total number of alerts created during last rule run.", "nullable": true, "type": "number" }, "total_alerts_detected": { "description": "Total number of alerts detected during last rule run.", "nullable": true, "type": "number" }, "total_indexing_duration_ms": { "description": "Total time spent indexing documents during last rule run in milliseconds.", "nullable": true, "type": "number" }, "total_search_duration_ms": { "description": "Total time spent performing Elasticsearch searches as measured by Kibana; includes network latency and time spent serializing or deserializing the request and response.", "nullable": true, "type": "number" } }, "type": "object" }, "timestamp": { "description": "Time of the most recent rule run.", "type": "string" } }, "required": [ "timestamp", "metrics" ], "type": "object" } }, "required": [ "history", "calculated_metrics", "last_run" ], "type": "object" } }, "required": [ "run" ], "type": "object" }, "mute_all": { "description": "Indicates whether all alerts are muted.", "type": "boolean" }, "muted_alert_ids": { "items": { "description": "List of identifiers of muted alerts. ", "type": "string" }, "type": "array" }, "name": { "description": " The name of the rule.", "type": "string" }, "next_run": { "description": "Date and time of the next run of the rule.", "nullable": true, "type": "string" }, "notify_when": { "description": "Indicates how often alerts generate actions. 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. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "enum": [ "onActionGroupChange", "onActiveAlert", "onThrottleInterval" ], "nullable": true, "type": "string" }, "params": { "additionalProperties": {}, "description": "The parameters for the rule.", "type": "object" }, "revision": { "description": "The rule revision number.", "type": "number" }, "rule_type_id": { "description": "The rule type identifier.", "type": "string" }, "running": { "description": "Indicates whether the rule is running.", "nullable": true, "type": "boolean" }, "schedule": { "additionalProperties": false, "properties": { "interval": { "description": "The interval is specified in seconds, minutes, hours, or days.", "type": "string" } }, "required": [ "interval" ], "type": "object" }, "scheduled_task_id": { "description": "Identifier of the scheduled task.", "type": "string" }, "snooze_schedule": { "items": { "additionalProperties": false, "properties": { "duration": { "description": "Duration of the rule snooze schedule.", "type": "number" }, "id": { "description": "Identifier of the rule snooze schedule.", "type": "string" }, "rRule": { "additionalProperties": false, "properties": { "byhour": { "items": { "description": "Indicates hours of the day to recur.", "type": "number" }, "nullable": true, "type": "array" }, "byminute": { "items": { "description": "Indicates minutes of the hour to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bymonth": { "items": { "description": "Indicates months of the year that this rule should recur.", "type": "number" }, "nullable": true, "type": "array" }, "bymonthday": { "items": { "description": "Indicates the days of the month to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bysecond": { "items": { "description": "Indicates seconds of the day to recur.", "type": "number" }, "nullable": true, "type": "array" }, "bysetpos": { "items": { "description": "A positive or negative integer affecting the nth day of the month. For example, -2 combined with `byweekday` of FR is 2nd to last Friday of the month. It is recommended to not set this manually and just use `byweekday`.", "type": "number" }, "nullable": true, "type": "array" }, "byweekday": { "items": { "anyOf": [ { "type": "string" }, { "type": "number" } ], "description": "Indicates the days of the week to recur or else nth-day-of-month strings. For example, \"+2TU\" second Tuesday of month, \"-1FR\" last Friday of the month, which are internally converted to a `byweekday/bysetpos` combination." }, "nullable": true, "type": "array" }, "byweekno": { "items": { "description": "Indicates number of the week hours to recur.", "type": "number" }, "nullable": true, "type": "array" }, "byyearday": { "items": { "description": "Indicates the days of the year that this rule should recur.", "type": "number" }, "nullable": true, "type": "array" }, "count": { "description": "Number of times the rule should recur until it stops.", "type": "number" }, "dtstart": { "description": "Rule start date in Coordinated Universal Time (UTC).", "type": "string" }, "freq": { "description": "Indicates frequency of the rule. Options are YEARLY, MONTHLY, WEEKLY, DAILY.", "enum": [ 0, 1, 2, 3, 4, 5, 6 ], "type": "integer" }, "interval": { "description": "Indicates the interval of frequency. For example, 1 and YEARLY is every 1 year, 2 and WEEKLY is every 2 weeks.", "type": "number" }, "tzid": { "description": "Indicates timezone abbreviation.", "type": "string" }, "until": { "description": "Recur the rule until this date.", "type": "string" }, "wkst": { "description": "Indicates the start of week, defaults to Monday.", "enum": [ "MO", "TU", "WE", "TH", "FR", "SA", "SU" ], "type": "string" } }, "required": [ "dtstart", "tzid" ], "type": "object" }, "skipRecurrences": { "items": { "description": "Skips recurrence of rule on this date.", "type": "string" }, "type": "array" } }, "required": [ "duration", "rRule" ], "type": "object" }, "type": "array" }, "tags": { "items": { "description": "The tags for the rule.", "type": "string" }, "type": "array" }, "throttle": { "deprecated": true, "description": "Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.", "nullable": true, "type": "string" }, "updated_at": { "description": "The date and time that the rule was updated most recently.", "type": "string" }, "updated_by": { "description": "The identifier for the user that updated this rule most recently.", "nullable": true, "type": "string" }, "view_in_app_relative_url": { "description": "Relative URL to view rule in the app.", "nullable": true, "type": "string" } }, "required": [ "id", "enabled", "name", "tags", "rule_type_id", "consumer", "schedule", "actions", "params", "created_by", "updated_by", "created_at", "updated_at", "api_key_owner", "mute_all", "muted_alert_ids", "execution_status", "revision" ], "type": "object" } } }, "description": "Indicates a successful call." }, "400": { "description": "Indicates an invalid schema or parameters." }, "403": { "description": "Indicates that this call is forbidden." } }, "summary": "Get information about rules", "tags": [ "alerting" ] } }, "/api/dashboards/dashboard": { "get": { "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", "operationId": "get-dashboards-dashboard", "parameters": [ { "description": "The page number to return. Default is \"1\".", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "minimum": 1, "type": "number" } }, { "description": "The number of dashboards to display on each page (max 1000). Default is \"20\".", "in": "query", "name": "perPage", "required": false, "schema": { "maximum": 1000, "minimum": 1, "type": "number" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": true, "properties": { "attributes": { "additionalProperties": false, "properties": { "description": { "default": "", "description": "A short description.", "type": "string" }, "timeRestore": { "default": false, "description": "Whether to restore time upon viewing this dashboard", "type": "boolean" }, "title": { "description": "A human-readable title for the dashboard", "type": "string" } }, "required": [ "title" ], "type": "object" }, "createdAt": { "type": "string" }, "createdBy": { "type": "string" }, "error": { "additionalProperties": false, "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "metadata": { "additionalProperties": true, "properties": {}, "type": "object" }, "statusCode": { "type": "number" } }, "required": [ "error", "message", "statusCode" ], "type": "object" }, "id": { "type": "string" }, "managed": { "type": "boolean" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "originId": { "type": "string" }, "references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type", "id" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "updatedAt": { "type": "string" }, "updatedBy": { "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type", "attributes", "references" ], "type": "object" }, "type": "array" }, "total": { "type": "number" } }, "required": [ "items", "total" ], "type": "object" } } } } }, "summary": "Get a list of dashboards", "tags": [ "Dashboards" ], "x-state": "Technical Preview" } }, "/api/dashboards/dashboard/{id}": { "delete": { "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", "operationId": "delete-dashboards-dashboard-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "A unique identifier for the dashboard.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": {}, "summary": "Delete a dashboard", "tags": [ "Dashboards" ], "x-state": "Technical Preview" }, "get": { "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", "operationId": "get-dashboards-dashboard-id", "parameters": [ { "description": "A unique identifier for the dashboard.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": true, "properties": { "attributes": { "additionalProperties": false, "properties": { "controlGroupInput": { "additionalProperties": false, "properties": { "autoApplySelections": { "default": true, "description": "Show apply selections button in controls.", "type": "boolean" }, "chainingSystem": { "default": "HIERARCHICAL", "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", "enum": [ "NONE", "HIERARCHICAL" ], "type": "string" }, "controls": { "default": [], "description": "An array of control panels and their state in the control group.", "items": { "additionalProperties": true, "properties": { "controlConfig": { "additionalProperties": {}, "type": "object" }, "grow": { "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { "description": "The unique ID of the control.", "type": "string" }, "order": { "description": "The order of the control panel in the control group.", "type": "number" }, "type": { "description": "The type of the control panel.", "type": "string" }, "width": { "default": "medium", "description": "Minimum width of the control panel in the control group.", "enum": [ "small", "medium", "large" ], "type": "string" } }, "required": [ "type", "order" ], "type": "object" }, "type": "array" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "ignoreParentSettings": { "additionalProperties": false, "properties": { "ignoreFilters": { "default": false, "description": "Ignore global filters in controls.", "type": "boolean" }, "ignoreQuery": { "default": false, "description": "Ignore the global query bar in controls.", "type": "boolean" }, "ignoreTimerange": { "default": false, "description": "Ignore the global time range in controls.", "type": "boolean" }, "ignoreValidations": { "default": false, "description": "Ignore validations in controls.", "type": "boolean" } }, "type": "object" }, "labelPosition": { "default": "oneLine", "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", "enum": [ "oneLine", "twoLine" ], "type": "string" } }, "required": [ "ignoreParentSettings" ], "type": "object" }, "description": { "default": "", "description": "A short description.", "type": "string" }, "kibanaSavedObjectMeta": { "additionalProperties": false, "default": {}, "description": "A container for various metadata", "properties": { "searchSource": { "additionalProperties": true, "properties": { "filter": { "items": { "additionalProperties": false, "description": "A filter for the search source.", "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": true, "properties": { "alias": { "nullable": true, "type": "string" }, "controlledBy": { "type": "string" }, "disabled": { "type": "boolean" }, "field": { "type": "string" }, "group": { "type": "string" }, "index": { "type": "string" }, "isMultiIndex": { "type": "boolean" }, "key": { "type": "string" }, "negate": { "type": "boolean" }, "params": {}, "type": { "type": "string" }, "value": { "type": "string" } }, "required": [ "params" ], "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "query": { "additionalProperties": false, "properties": { "language": { "description": "The query language such as KQL or Lucene.", "type": "string" }, "query": { "anyOf": [ { "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", "type": "string" }, { "additionalProperties": {}, "type": "object" } ] } }, "required": [ "query", "language" ], "type": "object" }, "sort": { "items": { "additionalProperties": { "anyOf": [ { "enum": [ "asc", "desc" ], "type": "string" }, { "additionalProperties": false, "properties": { "format": { "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" }, { "additionalProperties": false, "properties": { "numeric_type": { "enum": [ "double", "long", "date", "date_nanos" ], "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" } ] }, "type": "object" }, "type": "array" }, "type": { "type": "string" } }, "type": "object" } }, "type": "object" }, "options": { "additionalProperties": false, "properties": { "hidePanelTitles": { "default": false, "description": "Hide the panel titles in the dashboard.", "type": "boolean" }, "syncColors": { "default": true, "description": "Synchronize colors between related panels in the dashboard.", "type": "boolean" }, "syncCursor": { "default": true, "description": "Synchronize cursor position between related panels in the dashboard.", "type": "boolean" }, "syncTooltips": { "default": true, "description": "Synchronize tooltips between related panels in the dashboard.", "type": "boolean" }, "useMargins": { "default": true, "description": "Show margins between panels in the dashboard layout.", "type": "boolean" } }, "type": "object" }, "panels": { "default": [], "items": { "additionalProperties": false, "properties": { "gridData": { "additionalProperties": false, "properties": { "h": { "default": 15, "description": "The height of the panel in grid units", "minimum": 1, "type": "number" }, "i": { "type": "string" }, "w": { "default": 24, "description": "The width of the panel in grid units", "maximum": 48, "minimum": 1, "type": "number" }, "x": { "description": "The x coordinate of the panel in grid units", "type": "number" }, "y": { "description": "The y coordinate of the panel in grid units", "type": "number" } }, "required": [ "x", "y", "i" ], "type": "object" }, "id": { "description": "The saved object id for by reference panels", "type": "string" }, "panelConfig": { "additionalProperties": true, "properties": { "description": { "description": "The description of the panel", "type": "string" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "hidePanelTitles": { "description": "Set to true to hide the panel title in its container.", "type": "boolean" }, "savedObjectId": { "description": "The unique id of the library item to construct the embeddable.", "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "version": { "description": "The version of the embeddable in the panel.", "type": "string" } }, "type": "object" }, "panelIndex": { "type": "string" }, "panelRefName": { "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "type": { "description": "The embeddable type", "type": "string" }, "version": { "deprecated": true, "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", "type": "string" } }, "required": [ "panelConfig", "type", "gridData", "panelIndex" ], "type": "object" }, "type": "array" }, "refreshInterval": { "additionalProperties": false, "description": "A container for various refresh interval settings", "properties": { "display": { "deprecated": true, "description": "A human-readable string indicating the refresh frequency. No longer used.", "type": "string" }, "pause": { "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", "type": "boolean" }, "section": { "deprecated": true, "description": "No longer used.", "type": "number" }, "value": { "description": "A numeric value indicating refresh frequency in milliseconds.", "type": "number" } }, "required": [ "pause", "value" ], "type": "object" }, "timeFrom": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "timeRestore": { "default": false, "description": "Whether to restore time upon viewing this dashboard", "type": "boolean" }, "timeTo": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "title": { "description": "A human-readable title for the dashboard", "type": "string" }, "version": { "deprecated": true, "type": "number" } }, "required": [ "title", "options" ], "type": "object" }, "createdAt": { "type": "string" }, "createdBy": { "type": "string" }, "error": { "additionalProperties": false, "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "metadata": { "additionalProperties": true, "properties": {}, "type": "object" }, "statusCode": { "type": "number" } }, "required": [ "error", "message", "statusCode" ], "type": "object" }, "id": { "type": "string" }, "managed": { "type": "boolean" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "originId": { "type": "string" }, "references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type", "id" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "updatedAt": { "type": "string" }, "updatedBy": { "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type", "attributes", "references" ], "type": "object" }, "meta": { "additionalProperties": false, "properties": { "aliasPurpose": { "enum": [ "savedObjectConversion", "savedObjectImport" ], "type": "string" }, "aliasTargetId": { "type": "string" }, "outcome": { "enum": [ "exactMatch", "aliasMatch", "conflict" ], "type": "string" } }, "required": [ "outcome" ], "type": "object" } }, "required": [ "item", "meta" ], "type": "object" } } } } }, "summary": "Get a dashboard", "tags": [ "Dashboards" ], "x-state": "Technical Preview" }, "post": { "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", "operationId": "post-dashboards-dashboard-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "A unique identifier for the dashboard.", "in": "path", "name": "id", "required": false, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "attributes": { "additionalProperties": false, "properties": { "controlGroupInput": { "additionalProperties": false, "properties": { "autoApplySelections": { "default": true, "description": "Show apply selections button in controls.", "type": "boolean" }, "chainingSystem": { "default": "HIERARCHICAL", "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", "enum": [ "NONE", "HIERARCHICAL" ], "type": "string" }, "controls": { "default": [], "description": "An array of control panels and their state in the control group.", "items": { "additionalProperties": true, "properties": { "controlConfig": { "additionalProperties": {}, "type": "object" }, "grow": { "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { "description": "The unique ID of the control.", "type": "string" }, "order": { "description": "The order of the control panel in the control group.", "type": "number" }, "type": { "description": "The type of the control panel.", "type": "string" }, "width": { "default": "medium", "description": "Minimum width of the control panel in the control group.", "enum": [ "small", "medium", "large" ], "type": "string" } }, "required": [ "type", "order" ], "type": "object" }, "type": "array" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "ignoreParentSettings": { "additionalProperties": false, "properties": { "ignoreFilters": { "default": false, "description": "Ignore global filters in controls.", "type": "boolean" }, "ignoreQuery": { "default": false, "description": "Ignore the global query bar in controls.", "type": "boolean" }, "ignoreTimerange": { "default": false, "description": "Ignore the global time range in controls.", "type": "boolean" }, "ignoreValidations": { "default": false, "description": "Ignore validations in controls.", "type": "boolean" } }, "type": "object" }, "labelPosition": { "default": "oneLine", "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", "enum": [ "oneLine", "twoLine" ], "type": "string" } }, "required": [ "ignoreParentSettings" ], "type": "object" }, "description": { "default": "", "description": "A short description.", "type": "string" }, "kibanaSavedObjectMeta": { "additionalProperties": false, "default": {}, "description": "A container for various metadata", "properties": { "searchSource": { "additionalProperties": true, "properties": { "filter": { "items": { "additionalProperties": false, "description": "A filter for the search source.", "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": true, "properties": { "alias": { "nullable": true, "type": "string" }, "controlledBy": { "type": "string" }, "disabled": { "type": "boolean" }, "field": { "type": "string" }, "group": { "type": "string" }, "index": { "type": "string" }, "isMultiIndex": { "type": "boolean" }, "key": { "type": "string" }, "negate": { "type": "boolean" }, "params": {}, "type": { "type": "string" }, "value": { "type": "string" } }, "required": [ "params" ], "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "query": { "additionalProperties": false, "properties": { "language": { "description": "The query language such as KQL or Lucene.", "type": "string" }, "query": { "anyOf": [ { "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", "type": "string" }, { "additionalProperties": {}, "type": "object" } ] } }, "required": [ "query", "language" ], "type": "object" }, "sort": { "items": { "additionalProperties": { "anyOf": [ { "enum": [ "asc", "desc" ], "type": "string" }, { "additionalProperties": false, "properties": { "format": { "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" }, { "additionalProperties": false, "properties": { "numeric_type": { "enum": [ "double", "long", "date", "date_nanos" ], "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" } ] }, "type": "object" }, "type": "array" }, "type": { "type": "string" } }, "type": "object" } }, "type": "object" }, "options": { "additionalProperties": false, "properties": { "hidePanelTitles": { "default": false, "description": "Hide the panel titles in the dashboard.", "type": "boolean" }, "syncColors": { "default": true, "description": "Synchronize colors between related panels in the dashboard.", "type": "boolean" }, "syncCursor": { "default": true, "description": "Synchronize cursor position between related panels in the dashboard.", "type": "boolean" }, "syncTooltips": { "default": true, "description": "Synchronize tooltips between related panels in the dashboard.", "type": "boolean" }, "useMargins": { "default": true, "description": "Show margins between panels in the dashboard layout.", "type": "boolean" } }, "type": "object" }, "panels": { "default": [], "items": { "additionalProperties": false, "properties": { "gridData": { "additionalProperties": false, "properties": { "h": { "default": 15, "description": "The height of the panel in grid units", "minimum": 1, "type": "number" }, "i": { "description": "The unique identifier of the panel", "type": "string" }, "w": { "default": 24, "description": "The width of the panel in grid units", "maximum": 48, "minimum": 1, "type": "number" }, "x": { "description": "The x coordinate of the panel in grid units", "type": "number" }, "y": { "description": "The y coordinate of the panel in grid units", "type": "number" } }, "required": [ "x", "y" ], "type": "object" }, "id": { "description": "The saved object id for by reference panels", "type": "string" }, "panelConfig": { "additionalProperties": true, "properties": { "description": { "description": "The description of the panel", "type": "string" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "hidePanelTitles": { "description": "Set to true to hide the panel title in its container.", "type": "boolean" }, "savedObjectId": { "description": "The unique id of the library item to construct the embeddable.", "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "version": { "description": "The version of the embeddable in the panel.", "type": "string" } }, "type": "object" }, "panelIndex": { "description": "The unique ID of the panel.", "type": "string" }, "panelRefName": { "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "type": { "description": "The embeddable type", "type": "string" }, "version": { "deprecated": true, "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", "type": "string" } }, "required": [ "panelConfig", "type", "gridData" ], "type": "object" }, "type": "array" }, "refreshInterval": { "additionalProperties": false, "description": "A container for various refresh interval settings", "properties": { "display": { "deprecated": true, "description": "A human-readable string indicating the refresh frequency. No longer used.", "type": "string" }, "pause": { "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", "type": "boolean" }, "section": { "deprecated": true, "description": "No longer used.", "type": "number" }, "value": { "description": "A numeric value indicating refresh frequency in milliseconds.", "type": "number" } }, "required": [ "pause", "value" ], "type": "object" }, "timeFrom": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "timeRestore": { "default": false, "description": "Whether to restore time upon viewing this dashboard", "type": "boolean" }, "timeTo": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "title": { "description": "A human-readable title for the dashboard", "type": "string" }, "version": { "deprecated": true, "type": "number" } }, "required": [ "title", "options" ], "type": "object" }, "references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type", "id" ], "type": "object" }, "type": "array" }, "spaces": { "items": { "type": "string" }, "type": "array" } }, "required": [ "attributes" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": true, "properties": { "attributes": { "additionalProperties": false, "properties": { "controlGroupInput": { "additionalProperties": false, "properties": { "autoApplySelections": { "default": true, "description": "Show apply selections button in controls.", "type": "boolean" }, "chainingSystem": { "default": "HIERARCHICAL", "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", "enum": [ "NONE", "HIERARCHICAL" ], "type": "string" }, "controls": { "default": [], "description": "An array of control panels and their state in the control group.", "items": { "additionalProperties": true, "properties": { "controlConfig": { "additionalProperties": {}, "type": "object" }, "grow": { "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { "description": "The unique ID of the control.", "type": "string" }, "order": { "description": "The order of the control panel in the control group.", "type": "number" }, "type": { "description": "The type of the control panel.", "type": "string" }, "width": { "default": "medium", "description": "Minimum width of the control panel in the control group.", "enum": [ "small", "medium", "large" ], "type": "string" } }, "required": [ "type", "order" ], "type": "object" }, "type": "array" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "ignoreParentSettings": { "additionalProperties": false, "properties": { "ignoreFilters": { "default": false, "description": "Ignore global filters in controls.", "type": "boolean" }, "ignoreQuery": { "default": false, "description": "Ignore the global query bar in controls.", "type": "boolean" }, "ignoreTimerange": { "default": false, "description": "Ignore the global time range in controls.", "type": "boolean" }, "ignoreValidations": { "default": false, "description": "Ignore validations in controls.", "type": "boolean" } }, "type": "object" }, "labelPosition": { "default": "oneLine", "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", "enum": [ "oneLine", "twoLine" ], "type": "string" } }, "required": [ "ignoreParentSettings" ], "type": "object" }, "description": { "default": "", "description": "A short description.", "type": "string" }, "kibanaSavedObjectMeta": { "additionalProperties": false, "default": {}, "description": "A container for various metadata", "properties": { "searchSource": { "additionalProperties": true, "properties": { "filter": { "items": { "additionalProperties": false, "description": "A filter for the search source.", "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": true, "properties": { "alias": { "nullable": true, "type": "string" }, "controlledBy": { "type": "string" }, "disabled": { "type": "boolean" }, "field": { "type": "string" }, "group": { "type": "string" }, "index": { "type": "string" }, "isMultiIndex": { "type": "boolean" }, "key": { "type": "string" }, "negate": { "type": "boolean" }, "params": {}, "type": { "type": "string" }, "value": { "type": "string" } }, "required": [ "params" ], "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "query": { "additionalProperties": false, "properties": { "language": { "description": "The query language such as KQL or Lucene.", "type": "string" }, "query": { "anyOf": [ { "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", "type": "string" }, { "additionalProperties": {}, "type": "object" } ] } }, "required": [ "query", "language" ], "type": "object" }, "sort": { "items": { "additionalProperties": { "anyOf": [ { "enum": [ "asc", "desc" ], "type": "string" }, { "additionalProperties": false, "properties": { "format": { "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" }, { "additionalProperties": false, "properties": { "numeric_type": { "enum": [ "double", "long", "date", "date_nanos" ], "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" } ] }, "type": "object" }, "type": "array" }, "type": { "type": "string" } }, "type": "object" } }, "type": "object" }, "options": { "additionalProperties": false, "properties": { "hidePanelTitles": { "default": false, "description": "Hide the panel titles in the dashboard.", "type": "boolean" }, "syncColors": { "default": true, "description": "Synchronize colors between related panels in the dashboard.", "type": "boolean" }, "syncCursor": { "default": true, "description": "Synchronize cursor position between related panels in the dashboard.", "type": "boolean" }, "syncTooltips": { "default": true, "description": "Synchronize tooltips between related panels in the dashboard.", "type": "boolean" }, "useMargins": { "default": true, "description": "Show margins between panels in the dashboard layout.", "type": "boolean" } }, "type": "object" }, "panels": { "default": [], "items": { "additionalProperties": false, "properties": { "gridData": { "additionalProperties": false, "properties": { "h": { "default": 15, "description": "The height of the panel in grid units", "minimum": 1, "type": "number" }, "i": { "type": "string" }, "w": { "default": 24, "description": "The width of the panel in grid units", "maximum": 48, "minimum": 1, "type": "number" }, "x": { "description": "The x coordinate of the panel in grid units", "type": "number" }, "y": { "description": "The y coordinate of the panel in grid units", "type": "number" } }, "required": [ "x", "y", "i" ], "type": "object" }, "id": { "description": "The saved object id for by reference panels", "type": "string" }, "panelConfig": { "additionalProperties": true, "properties": { "description": { "description": "The description of the panel", "type": "string" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "hidePanelTitles": { "description": "Set to true to hide the panel title in its container.", "type": "boolean" }, "savedObjectId": { "description": "The unique id of the library item to construct the embeddable.", "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "version": { "description": "The version of the embeddable in the panel.", "type": "string" } }, "type": "object" }, "panelIndex": { "type": "string" }, "panelRefName": { "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "type": { "description": "The embeddable type", "type": "string" }, "version": { "deprecated": true, "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", "type": "string" } }, "required": [ "panelConfig", "type", "gridData", "panelIndex" ], "type": "object" }, "type": "array" }, "refreshInterval": { "additionalProperties": false, "description": "A container for various refresh interval settings", "properties": { "display": { "deprecated": true, "description": "A human-readable string indicating the refresh frequency. No longer used.", "type": "string" }, "pause": { "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", "type": "boolean" }, "section": { "deprecated": true, "description": "No longer used.", "type": "number" }, "value": { "description": "A numeric value indicating refresh frequency in milliseconds.", "type": "number" } }, "required": [ "pause", "value" ], "type": "object" }, "timeFrom": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "timeRestore": { "default": false, "description": "Whether to restore time upon viewing this dashboard", "type": "boolean" }, "timeTo": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "title": { "description": "A human-readable title for the dashboard", "type": "string" }, "version": { "deprecated": true, "type": "number" } }, "required": [ "title", "options" ], "type": "object" }, "createdAt": { "type": "string" }, "createdBy": { "type": "string" }, "error": { "additionalProperties": false, "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "metadata": { "additionalProperties": true, "properties": {}, "type": "object" }, "statusCode": { "type": "number" } }, "required": [ "error", "message", "statusCode" ], "type": "object" }, "id": { "type": "string" }, "managed": { "type": "boolean" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "originId": { "type": "string" }, "references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type", "id" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "updatedAt": { "type": "string" }, "updatedBy": { "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type", "attributes", "references" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } } }, "summary": "Create a dashboard", "tags": [ "Dashboards" ], "x-state": "Technical Preview" }, "put": { "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", "operationId": "put-dashboards-dashboard-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "A unique identifier for the dashboard.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "attributes": { "additionalProperties": false, "properties": { "controlGroupInput": { "additionalProperties": false, "properties": { "autoApplySelections": { "default": true, "description": "Show apply selections button in controls.", "type": "boolean" }, "chainingSystem": { "default": "HIERARCHICAL", "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", "enum": [ "NONE", "HIERARCHICAL" ], "type": "string" }, "controls": { "default": [], "description": "An array of control panels and their state in the control group.", "items": { "additionalProperties": true, "properties": { "controlConfig": { "additionalProperties": {}, "type": "object" }, "grow": { "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { "description": "The unique ID of the control.", "type": "string" }, "order": { "description": "The order of the control panel in the control group.", "type": "number" }, "type": { "description": "The type of the control panel.", "type": "string" }, "width": { "default": "medium", "description": "Minimum width of the control panel in the control group.", "enum": [ "small", "medium", "large" ], "type": "string" } }, "required": [ "type", "order" ], "type": "object" }, "type": "array" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "ignoreParentSettings": { "additionalProperties": false, "properties": { "ignoreFilters": { "default": false, "description": "Ignore global filters in controls.", "type": "boolean" }, "ignoreQuery": { "default": false, "description": "Ignore the global query bar in controls.", "type": "boolean" }, "ignoreTimerange": { "default": false, "description": "Ignore the global time range in controls.", "type": "boolean" }, "ignoreValidations": { "default": false, "description": "Ignore validations in controls.", "type": "boolean" } }, "type": "object" }, "labelPosition": { "default": "oneLine", "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", "enum": [ "oneLine", "twoLine" ], "type": "string" } }, "required": [ "ignoreParentSettings" ], "type": "object" }, "description": { "default": "", "description": "A short description.", "type": "string" }, "kibanaSavedObjectMeta": { "additionalProperties": false, "default": {}, "description": "A container for various metadata", "properties": { "searchSource": { "additionalProperties": true, "properties": { "filter": { "items": { "additionalProperties": false, "description": "A filter for the search source.", "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": true, "properties": { "alias": { "nullable": true, "type": "string" }, "controlledBy": { "type": "string" }, "disabled": { "type": "boolean" }, "field": { "type": "string" }, "group": { "type": "string" }, "index": { "type": "string" }, "isMultiIndex": { "type": "boolean" }, "key": { "type": "string" }, "negate": { "type": "boolean" }, "params": {}, "type": { "type": "string" }, "value": { "type": "string" } }, "required": [ "params" ], "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "query": { "additionalProperties": false, "properties": { "language": { "description": "The query language such as KQL or Lucene.", "type": "string" }, "query": { "anyOf": [ { "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", "type": "string" }, { "additionalProperties": {}, "type": "object" } ] } }, "required": [ "query", "language" ], "type": "object" }, "sort": { "items": { "additionalProperties": { "anyOf": [ { "enum": [ "asc", "desc" ], "type": "string" }, { "additionalProperties": false, "properties": { "format": { "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" }, { "additionalProperties": false, "properties": { "numeric_type": { "enum": [ "double", "long", "date", "date_nanos" ], "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" } ] }, "type": "object" }, "type": "array" }, "type": { "type": "string" } }, "type": "object" } }, "type": "object" }, "options": { "additionalProperties": false, "properties": { "hidePanelTitles": { "default": false, "description": "Hide the panel titles in the dashboard.", "type": "boolean" }, "syncColors": { "default": true, "description": "Synchronize colors between related panels in the dashboard.", "type": "boolean" }, "syncCursor": { "default": true, "description": "Synchronize cursor position between related panels in the dashboard.", "type": "boolean" }, "syncTooltips": { "default": true, "description": "Synchronize tooltips between related panels in the dashboard.", "type": "boolean" }, "useMargins": { "default": true, "description": "Show margins between panels in the dashboard layout.", "type": "boolean" } }, "type": "object" }, "panels": { "default": [], "items": { "additionalProperties": false, "properties": { "gridData": { "additionalProperties": false, "properties": { "h": { "default": 15, "description": "The height of the panel in grid units", "minimum": 1, "type": "number" }, "i": { "description": "The unique identifier of the panel", "type": "string" }, "w": { "default": 24, "description": "The width of the panel in grid units", "maximum": 48, "minimum": 1, "type": "number" }, "x": { "description": "The x coordinate of the panel in grid units", "type": "number" }, "y": { "description": "The y coordinate of the panel in grid units", "type": "number" } }, "required": [ "x", "y" ], "type": "object" }, "id": { "description": "The saved object id for by reference panels", "type": "string" }, "panelConfig": { "additionalProperties": true, "properties": { "description": { "description": "The description of the panel", "type": "string" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "hidePanelTitles": { "description": "Set to true to hide the panel title in its container.", "type": "boolean" }, "savedObjectId": { "description": "The unique id of the library item to construct the embeddable.", "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "version": { "description": "The version of the embeddable in the panel.", "type": "string" } }, "type": "object" }, "panelIndex": { "description": "The unique ID of the panel.", "type": "string" }, "panelRefName": { "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "type": { "description": "The embeddable type", "type": "string" }, "version": { "deprecated": true, "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", "type": "string" } }, "required": [ "panelConfig", "type", "gridData" ], "type": "object" }, "type": "array" }, "refreshInterval": { "additionalProperties": false, "description": "A container for various refresh interval settings", "properties": { "display": { "deprecated": true, "description": "A human-readable string indicating the refresh frequency. No longer used.", "type": "string" }, "pause": { "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", "type": "boolean" }, "section": { "deprecated": true, "description": "No longer used.", "type": "number" }, "value": { "description": "A numeric value indicating refresh frequency in milliseconds.", "type": "number" } }, "required": [ "pause", "value" ], "type": "object" }, "timeFrom": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "timeRestore": { "default": false, "description": "Whether to restore time upon viewing this dashboard", "type": "boolean" }, "timeTo": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "title": { "description": "A human-readable title for the dashboard", "type": "string" }, "version": { "deprecated": true, "type": "number" } }, "required": [ "title", "options" ], "type": "object" }, "references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type", "id" ], "type": "object" }, "type": "array" } }, "required": [ "attributes" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": true, "properties": { "attributes": { "additionalProperties": false, "properties": { "controlGroupInput": { "additionalProperties": false, "properties": { "autoApplySelections": { "default": true, "description": "Show apply selections button in controls.", "type": "boolean" }, "chainingSystem": { "default": "HIERARCHICAL", "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", "enum": [ "NONE", "HIERARCHICAL" ], "type": "string" }, "controls": { "default": [], "description": "An array of control panels and their state in the control group.", "items": { "additionalProperties": true, "properties": { "controlConfig": { "additionalProperties": {}, "type": "object" }, "grow": { "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { "description": "The unique ID of the control.", "type": "string" }, "order": { "description": "The order of the control panel in the control group.", "type": "number" }, "type": { "description": "The type of the control panel.", "type": "string" }, "width": { "default": "medium", "description": "Minimum width of the control panel in the control group.", "enum": [ "small", "medium", "large" ], "type": "string" } }, "required": [ "type", "order" ], "type": "object" }, "type": "array" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "ignoreParentSettings": { "additionalProperties": false, "properties": { "ignoreFilters": { "default": false, "description": "Ignore global filters in controls.", "type": "boolean" }, "ignoreQuery": { "default": false, "description": "Ignore the global query bar in controls.", "type": "boolean" }, "ignoreTimerange": { "default": false, "description": "Ignore the global time range in controls.", "type": "boolean" }, "ignoreValidations": { "default": false, "description": "Ignore validations in controls.", "type": "boolean" } }, "type": "object" }, "labelPosition": { "default": "oneLine", "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", "enum": [ "oneLine", "twoLine" ], "type": "string" } }, "required": [ "ignoreParentSettings" ], "type": "object" }, "description": { "default": "", "description": "A short description.", "type": "string" }, "kibanaSavedObjectMeta": { "additionalProperties": false, "default": {}, "description": "A container for various metadata", "properties": { "searchSource": { "additionalProperties": true, "properties": { "filter": { "items": { "additionalProperties": false, "description": "A filter for the search source.", "properties": { "$state": { "additionalProperties": false, "properties": { "store": { "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", "enum": [ "appState", "globalState" ], "type": "string" } }, "required": [ "store" ], "type": "object" }, "meta": { "additionalProperties": true, "properties": { "alias": { "nullable": true, "type": "string" }, "controlledBy": { "type": "string" }, "disabled": { "type": "boolean" }, "field": { "type": "string" }, "group": { "type": "string" }, "index": { "type": "string" }, "isMultiIndex": { "type": "boolean" }, "key": { "type": "string" }, "negate": { "type": "boolean" }, "params": {}, "type": { "type": "string" }, "value": { "type": "string" } }, "required": [ "params" ], "type": "object" }, "query": { "additionalProperties": {}, "type": "object" } }, "required": [ "meta" ], "type": "object" }, "type": "array" }, "query": { "additionalProperties": false, "properties": { "language": { "description": "The query language such as KQL or Lucene.", "type": "string" }, "query": { "anyOf": [ { "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", "type": "string" }, { "additionalProperties": {}, "type": "object" } ] } }, "required": [ "query", "language" ], "type": "object" }, "sort": { "items": { "additionalProperties": { "anyOf": [ { "enum": [ "asc", "desc" ], "type": "string" }, { "additionalProperties": false, "properties": { "format": { "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" }, { "additionalProperties": false, "properties": { "numeric_type": { "enum": [ "double", "long", "date", "date_nanos" ], "type": "string" }, "order": { "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "order" ], "type": "object" } ] }, "type": "object" }, "type": "array" }, "type": { "type": "string" } }, "type": "object" } }, "type": "object" }, "options": { "additionalProperties": false, "properties": { "hidePanelTitles": { "default": false, "description": "Hide the panel titles in the dashboard.", "type": "boolean" }, "syncColors": { "default": true, "description": "Synchronize colors between related panels in the dashboard.", "type": "boolean" }, "syncCursor": { "default": true, "description": "Synchronize cursor position between related panels in the dashboard.", "type": "boolean" }, "syncTooltips": { "default": true, "description": "Synchronize tooltips between related panels in the dashboard.", "type": "boolean" }, "useMargins": { "default": true, "description": "Show margins between panels in the dashboard layout.", "type": "boolean" } }, "type": "object" }, "panels": { "default": [], "items": { "additionalProperties": false, "properties": { "gridData": { "additionalProperties": false, "properties": { "h": { "default": 15, "description": "The height of the panel in grid units", "minimum": 1, "type": "number" }, "i": { "type": "string" }, "w": { "default": 24, "description": "The width of the panel in grid units", "maximum": 48, "minimum": 1, "type": "number" }, "x": { "description": "The x coordinate of the panel in grid units", "type": "number" }, "y": { "description": "The y coordinate of the panel in grid units", "type": "number" } }, "required": [ "x", "y", "i" ], "type": "object" }, "id": { "description": "The saved object id for by reference panels", "type": "string" }, "panelConfig": { "additionalProperties": true, "properties": { "description": { "description": "The description of the panel", "type": "string" }, "enhancements": { "additionalProperties": {}, "type": "object" }, "hidePanelTitles": { "description": "Set to true to hide the panel title in its container.", "type": "boolean" }, "savedObjectId": { "description": "The unique id of the library item to construct the embeddable.", "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "version": { "description": "The version of the embeddable in the panel.", "type": "string" } }, "type": "object" }, "panelIndex": { "type": "string" }, "panelRefName": { "type": "string" }, "title": { "description": "The title of the panel", "type": "string" }, "type": { "description": "The embeddable type", "type": "string" }, "version": { "deprecated": true, "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", "type": "string" } }, "required": [ "panelConfig", "type", "gridData", "panelIndex" ], "type": "object" }, "type": "array" }, "refreshInterval": { "additionalProperties": false, "description": "A container for various refresh interval settings", "properties": { "display": { "deprecated": true, "description": "A human-readable string indicating the refresh frequency. No longer used.", "type": "string" }, "pause": { "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", "type": "boolean" }, "section": { "deprecated": true, "description": "No longer used.", "type": "number" }, "value": { "description": "A numeric value indicating refresh frequency in milliseconds.", "type": "number" } }, "required": [ "pause", "value" ], "type": "object" }, "timeFrom": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "timeRestore": { "default": false, "description": "Whether to restore time upon viewing this dashboard", "type": "boolean" }, "timeTo": { "description": "An ISO string indicating when to restore time from", "type": "string" }, "title": { "description": "A human-readable title for the dashboard", "type": "string" }, "version": { "deprecated": true, "type": "number" } }, "required": [ "title", "options" ], "type": "object" }, "createdAt": { "type": "string" }, "createdBy": { "type": "string" }, "error": { "additionalProperties": false, "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "metadata": { "additionalProperties": true, "properties": {}, "type": "object" }, "statusCode": { "type": "number" } }, "required": [ "error", "message", "statusCode" ], "type": "object" }, "id": { "type": "string" }, "managed": { "type": "boolean" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "originId": { "type": "string" }, "references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type", "id" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "updatedAt": { "type": "string" }, "updatedBy": { "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type", "attributes", "references" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } } }, "summary": "Update an existing dashboard", "tags": [ "Dashboards" ], "x-state": "Technical Preview" } }, "/api/fleet/agent_download_sources": { "get": { "description": "[Required authorization] Route required privileges: ANY of [fleet-agent-policies-read OR fleet-settings-read].", "operationId": "get-fleet-agent-download-sources", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "host": { "format": "uri", "type": "string" }, "id": { "type": "string" }, "is_default": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_id": { "description": "The ID of the proxy to use for this download source. See the proxies API for more information.", "nullable": true, "type": "string" } }, "required": [ "id", "name", "host" ], "type": "object" }, "type": "array" }, "page": { "type": "number" }, "perPage": { "type": "number" }, "total": { "type": "number" } }, "required": [ "items", "total", "page", "perPage" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get agent binary download sources", "tags": [ "Elastic Agent binary download sources" ] }, "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-settings-all].", "operationId": "post-fleet-agent-download-sources", "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": { "schema": { "additionalProperties": false, "properties": { "host": { "format": "uri", "type": "string" }, "id": { "type": "string" }, "is_default": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_id": { "description": "The ID of the proxy to use for this download source. See the proxies API for more information.", "nullable": true, "type": "string" } }, "required": [ "name", "host" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "host": { "format": "uri", "type": "string" }, "id": { "type": "string" }, "is_default": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_id": { "description": "The ID of the proxy to use for this download source. See the proxies API for more information.", "nullable": true, "type": "string" } }, "required": [ "id", "name", "host" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create an agent binary download source", "tags": [ "Elastic Agent binary download sources" ] } }, "/api/fleet/agent_download_sources/{sourceId}": { "delete": { "description": "Delete an agent binary download source by ID.

[Required authorization] Route required privileges: ALL of [fleet-settings-all].", "operationId": "delete-fleet-agent-download-sources-sourceid", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "sourceId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Delete an agent binary download source", "tags": [ "Elastic Agent binary download sources" ] }, "get": { "description": "Get an agent binary download source by ID.

[Required authorization] Route required privileges: ANY of [fleet-agent-policies-read OR fleet-settings-read].", "operationId": "get-fleet-agent-download-sources-sourceid", "parameters": [ { "in": "path", "name": "sourceId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "host": { "format": "uri", "type": "string" }, "id": { "type": "string" }, "is_default": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_id": { "description": "The ID of the proxy to use for this download source. See the proxies API for more information.", "nullable": true, "type": "string" } }, "required": [ "id", "name", "host" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get an agent binary download source", "tags": [ "Elastic Agent binary download sources" ] }, "put": { "description": "Update an agent binary download source by ID.

[Required authorization] Route required privileges: ALL of [fleet-settings-all].", "operationId": "put-fleet-agent-download-sources-sourceid", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "sourceId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "host": { "format": "uri", "type": "string" }, "id": { "type": "string" }, "is_default": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_id": { "description": "The ID of the proxy to use for this download source. See the proxies API for more information.", "nullable": true, "type": "string" } }, "required": [ "name", "host" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "host": { "format": "uri", "type": "string" }, "id": { "type": "string" }, "is_default": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_id": { "description": "The ID of the proxy to use for this download source. See the proxies API for more information.", "nullable": true, "type": "string" } }, "required": [ "id", "name", "host" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Update an agent binary download source", "tags": [ "Elastic Agent binary download sources" ] } }, "/api/fleet/agent_policies": { "get": { "description": "[Required authorization] Route required privileges: ANY of [fleet-agent-policies-read OR fleet-agents-read OR fleet-setup].", "operationId": "get-fleet-agent-policies", "parameters": [ { "in": "query", "name": "page", "required": false, "schema": { "type": "number" } }, { "in": "query", "name": "perPage", "required": false, "schema": { "type": "number" } }, { "in": "query", "name": "sortField", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "sortOrder", "required": false, "schema": { "enum": [ "desc", "asc" ], "type": "string" } }, { "in": "query", "name": "showUpgradeable", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "kuery", "required": false, "schema": { "type": "string" } }, { "description": "use withAgentCount instead", "in": "query", "name": "noAgentCount", "required": false, "schema": { "deprecated": true, "type": "boolean" } }, { "description": "get policies with agent count", "in": "query", "name": "withAgentCount", "required": false, "schema": { "type": "boolean" } }, { "description": "get full policies with package policies populated", "in": "query", "name": "full", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "advanced_settings": { "additionalProperties": false, "properties": { "agent_download_target_directory": { "nullable": true }, "agent_download_timeout": { "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 } }, "type": "object" }, "agent_features": { "items": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "name": { "type": "string" } }, "required": [ "name", "enabled" ], "type": "object" }, "type": "array" }, "agentless": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "requests": { "additionalProperties": false, "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "agents": { "type": "number" }, "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" }, "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, "properties": { "name": { "type": "string" }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "required": [ "name", "value" ], "type": "object" }, "type": "array" }, "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" }, "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" }, "monitoring_diagnostics": { "additionalProperties": false, "properties": { "limit": { "additionalProperties": false, "properties": { "burst": { "type": "number" }, "interval": { "type": "string" } }, "type": "object" }, "uploader": { "additionalProperties": false, "properties": { "init_dur": { "type": "string" }, "max_dur": { "type": "string" }, "max_retries": { "type": "number" } }, "type": "object" } }, "type": "object" }, "monitoring_enabled": { "items": { "enum": [ "logs", "metrics", "traces" ], "type": "string" }, "type": "array" }, "monitoring_http": { "additionalProperties": false, "properties": { "buffer": { "additionalProperties": false, "properties": { "enabled": { "default": false, "type": "boolean" } }, "type": "object" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "port": { "maximum": 65353, "minimum": 0, "type": "number" } }, "type": "object" }, "monitoring_output_id": { "nullable": true, "type": "string" }, "monitoring_pprof_enabled": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "namespace": { "minLength": 1, "type": "string" }, "overrides": { "additionalProperties": {}, "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_policies": { "anyOf": [ { "items": { "type": "string" }, "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, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" }, "type": "array" } ] }, "required_versions": { "items": { "additionalProperties": false, "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" ], "type": "object" }, "nullable": true, "type": "array" }, "revision": { "type": "number" }, "schema_version": { "type": "string" }, "space_ids": { "items": { "type": "string" }, "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_managed", "is_protected", "status", "updated_at", "updated_by", "revision" ], "type": "object" }, "type": "array" }, "page": { "type": "number" }, "perPage": { "type": "number" }, "total": { "type": "number" } }, "required": [ "items", "total", "page", "perPage" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get agent policies", "tags": [ "Elastic Agent policies" ] }, "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agent-policies-all].", "operationId": "post-fleet-agent-policies", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "query", "name": "sys_monitoring", "required": false, "schema": { "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "advanced_settings": { "additionalProperties": false, "properties": { "agent_download_target_directory": { "nullable": true }, "agent_download_timeout": { "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 } }, "type": "object" }, "agent_features": { "items": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "name": { "type": "string" } }, "required": [ "name", "enabled" ], "type": "object" }, "type": "array" }, "agentless": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "requests": { "additionalProperties": false, "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "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, "properties": { "name": { "type": "string" }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "required": [ "name", "value" ], "type": "object" }, "type": "array" }, "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" }, "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" }, "monitoring_diagnostics": { "additionalProperties": false, "properties": { "limit": { "additionalProperties": false, "properties": { "burst": { "type": "number" }, "interval": { "type": "string" } }, "type": "object" }, "uploader": { "additionalProperties": false, "properties": { "init_dur": { "type": "string" }, "max_dur": { "type": "string" }, "max_retries": { "type": "number" } }, "type": "object" } }, "type": "object" }, "monitoring_enabled": { "items": { "enum": [ "logs", "metrics", "traces" ], "type": "string" }, "type": "array" }, "monitoring_http": { "additionalProperties": false, "properties": { "buffer": { "additionalProperties": false, "properties": { "enabled": { "default": false, "type": "boolean" } }, "type": "object" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "port": { "maximum": 65353, "minimum": 0, "type": "number" } }, "type": "object" }, "monitoring_output_id": { "nullable": true, "type": "string" }, "monitoring_pprof_enabled": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "namespace": { "minLength": 1, "type": "string" }, "overrides": { "additionalProperties": {}, "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" }, "required_versions": { "items": { "additionalProperties": false, "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" ], "type": "object" }, "nullable": true, "type": "array" }, "space_ids": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the agent policy supports agentless integrations.", "nullable": true, "type": "boolean" }, "unenroll_timeout": { "minimum": 0, "type": "number" } }, "required": [ "name", "namespace" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "advanced_settings": { "additionalProperties": false, "properties": { "agent_download_target_directory": { "nullable": true }, "agent_download_timeout": { "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 } }, "type": "object" }, "agent_features": { "items": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "name": { "type": "string" } }, "required": [ "name", "enabled" ], "type": "object" }, "type": "array" }, "agentless": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "requests": { "additionalProperties": false, "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "agents": { "type": "number" }, "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" }, "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, "properties": { "name": { "type": "string" }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "required": [ "name", "value" ], "type": "object" }, "type": "array" }, "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" }, "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" }, "monitoring_diagnostics": { "additionalProperties": false, "properties": { "limit": { "additionalProperties": false, "properties": { "burst": { "type": "number" }, "interval": { "type": "string" } }, "type": "object" }, "uploader": { "additionalProperties": false, "properties": { "init_dur": { "type": "string" }, "max_dur": { "type": "string" }, "max_retries": { "type": "number" } }, "type": "object" } }, "type": "object" }, "monitoring_enabled": { "items": { "enum": [ "logs", "metrics", "traces" ], "type": "string" }, "type": "array" }, "monitoring_http": { "additionalProperties": false, "properties": { "buffer": { "additionalProperties": false, "properties": { "enabled": { "default": false, "type": "boolean" } }, "type": "object" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "port": { "maximum": 65353, "minimum": 0, "type": "number" } }, "type": "object" }, "monitoring_output_id": { "nullable": true, "type": "string" }, "monitoring_pprof_enabled": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "namespace": { "minLength": 1, "type": "string" }, "overrides": { "additionalProperties": {}, "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_policies": { "anyOf": [ { "items": { "type": "string" }, "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, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" }, "type": "array" } ] }, "required_versions": { "items": { "additionalProperties": false, "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" ], "type": "object" }, "nullable": true, "type": "array" }, "revision": { "type": "number" }, "schema_version": { "type": "string" }, "space_ids": { "items": { "type": "string" }, "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_managed", "is_protected", "status", "updated_at", "updated_by", "revision" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create an agent policy", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/agent_policies/_bulk_get": { "post": { "description": "[Required authorization] Route required privileges: ANY of [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" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "full": { "description": "get full policies with package policies populated", "type": "boolean" }, "ids": { "description": "list of package policy ids", "items": { "type": "string" }, "type": "array" }, "ignoreMissing": { "type": "boolean" } }, "required": [ "ids" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "advanced_settings": { "additionalProperties": false, "properties": { "agent_download_target_directory": { "nullable": true }, "agent_download_timeout": { "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 } }, "type": "object" }, "agent_features": { "items": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "name": { "type": "string" } }, "required": [ "name", "enabled" ], "type": "object" }, "type": "array" }, "agentless": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "requests": { "additionalProperties": false, "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "agents": { "type": "number" }, "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" }, "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, "properties": { "name": { "type": "string" }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "required": [ "name", "value" ], "type": "object" }, "type": "array" }, "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" }, "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" }, "monitoring_diagnostics": { "additionalProperties": false, "properties": { "limit": { "additionalProperties": false, "properties": { "burst": { "type": "number" }, "interval": { "type": "string" } }, "type": "object" }, "uploader": { "additionalProperties": false, "properties": { "init_dur": { "type": "string" }, "max_dur": { "type": "string" }, "max_retries": { "type": "number" } }, "type": "object" } }, "type": "object" }, "monitoring_enabled": { "items": { "enum": [ "logs", "metrics", "traces" ], "type": "string" }, "type": "array" }, "monitoring_http": { "additionalProperties": false, "properties": { "buffer": { "additionalProperties": false, "properties": { "enabled": { "default": false, "type": "boolean" } }, "type": "object" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "port": { "maximum": 65353, "minimum": 0, "type": "number" } }, "type": "object" }, "monitoring_output_id": { "nullable": true, "type": "string" }, "monitoring_pprof_enabled": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "namespace": { "minLength": 1, "type": "string" }, "overrides": { "additionalProperties": {}, "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_policies": { "anyOf": [ { "items": { "type": "string" }, "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, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" }, "type": "array" } ] }, "required_versions": { "items": { "additionalProperties": false, "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" ], "type": "object" }, "nullable": true, "type": "array" }, "revision": { "type": "number" }, "schema_version": { "type": "string" }, "space_ids": { "items": { "type": "string" }, "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_managed", "is_protected", "status", "updated_at", "updated_by", "revision" ], "type": "object" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Bulk get agent policies", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/agent_policies/delete": { "post": { "description": "Delete an agent policy by ID.

[Required authorization] Route required privileges: ALL of [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": { "schema": { "additionalProperties": false, "properties": { "agentPolicyId": { "type": "string" }, "force": { "description": "bypass validation checks that can prevent agent policy deletion", "type": "boolean" } }, "required": [ "agentPolicyId" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Delete an agent policy", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/agent_policies/outputs": { "post": { "description": "Get a list of outputs associated with agent policies.

[Required authorization] Route required privileges: ALL of [fleet-agent-policies-read, 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": { "schema": { "additionalProperties": false, "properties": { "ids": { "description": "list of package policy ids", "items": { "type": "string" }, "type": "array" } }, "required": [ "ids" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "agentPolicyId": { "type": "string" }, "data": { "additionalProperties": false, "properties": { "integrations": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "integrationPolicyName": { "type": "string" }, "name": { "type": "string" }, "pkgName": { "type": "string" } }, "type": "object" }, "type": "array" }, "output": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ], "type": "object" } }, "required": [ "output" ], "type": "object" }, "monitoring": { "additionalProperties": false, "properties": { "output": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ], "type": "object" } }, "required": [ "output" ], "type": "object" } }, "required": [ "monitoring", "data" ], "type": "object" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get outputs for agent policies", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/agent_policies/{agentPolicyId}": { "get": { "description": "Get an agent policy by ID.

[Required authorization] Route required privileges: ANY of [fleet-agent-policies-read OR fleet-agents-read OR fleet-setup].", "operationId": "get-fleet-agent-policies-agentpolicyid", "parameters": [ { "in": "path", "name": "agentPolicyId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "advanced_settings": { "additionalProperties": false, "properties": { "agent_download_target_directory": { "nullable": true }, "agent_download_timeout": { "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 } }, "type": "object" }, "agent_features": { "items": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "name": { "type": "string" } }, "required": [ "name", "enabled" ], "type": "object" }, "type": "array" }, "agentless": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "requests": { "additionalProperties": false, "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "agents": { "type": "number" }, "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" }, "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, "properties": { "name": { "type": "string" }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "required": [ "name", "value" ], "type": "object" }, "type": "array" }, "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" }, "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" }, "monitoring_diagnostics": { "additionalProperties": false, "properties": { "limit": { "additionalProperties": false, "properties": { "burst": { "type": "number" }, "interval": { "type": "string" } }, "type": "object" }, "uploader": { "additionalProperties": false, "properties": { "init_dur": { "type": "string" }, "max_dur": { "type": "string" }, "max_retries": { "type": "number" } }, "type": "object" } }, "type": "object" }, "monitoring_enabled": { "items": { "enum": [ "logs", "metrics", "traces" ], "type": "string" }, "type": "array" }, "monitoring_http": { "additionalProperties": false, "properties": { "buffer": { "additionalProperties": false, "properties": { "enabled": { "default": false, "type": "boolean" } }, "type": "object" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "port": { "maximum": 65353, "minimum": 0, "type": "number" } }, "type": "object" }, "monitoring_output_id": { "nullable": true, "type": "string" }, "monitoring_pprof_enabled": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "namespace": { "minLength": 1, "type": "string" }, "overrides": { "additionalProperties": {}, "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_policies": { "anyOf": [ { "items": { "type": "string" }, "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, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" }, "type": "array" } ] }, "required_versions": { "items": { "additionalProperties": false, "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" ], "type": "object" }, "nullable": true, "type": "array" }, "revision": { "type": "number" }, "schema_version": { "type": "string" }, "space_ids": { "items": { "type": "string" }, "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_managed", "is_protected", "status", "updated_at", "updated_by", "revision" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get an agent policy", "tags": [ "Elastic Agent policies" ] }, "put": { "description": "Update an agent policy by ID.

[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "agentPolicyId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "advanced_settings": { "additionalProperties": false, "properties": { "agent_download_target_directory": { "nullable": true }, "agent_download_timeout": { "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 } }, "type": "object" }, "agent_features": { "items": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "name": { "type": "string" } }, "required": [ "name", "enabled" ], "type": "object" }, "type": "array" }, "agentless": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "requests": { "additionalProperties": false, "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "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, "properties": { "name": { "type": "string" }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "required": [ "name", "value" ], "type": "object" }, "type": "array" }, "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" }, "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" }, "monitoring_diagnostics": { "additionalProperties": false, "properties": { "limit": { "additionalProperties": false, "properties": { "burst": { "type": "number" }, "interval": { "type": "string" } }, "type": "object" }, "uploader": { "additionalProperties": false, "properties": { "init_dur": { "type": "string" }, "max_dur": { "type": "string" }, "max_retries": { "type": "number" } }, "type": "object" } }, "type": "object" }, "monitoring_enabled": { "items": { "enum": [ "logs", "metrics", "traces" ], "type": "string" }, "type": "array" }, "monitoring_http": { "additionalProperties": false, "properties": { "buffer": { "additionalProperties": false, "properties": { "enabled": { "default": false, "type": "boolean" } }, "type": "object" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "port": { "maximum": 65353, "minimum": 0, "type": "number" } }, "type": "object" }, "monitoring_output_id": { "nullable": true, "type": "string" }, "monitoring_pprof_enabled": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "namespace": { "minLength": 1, "type": "string" }, "overrides": { "additionalProperties": {}, "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" }, "required_versions": { "items": { "additionalProperties": false, "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" ], "type": "object" }, "nullable": true, "type": "array" }, "space_ids": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the agent policy supports agentless integrations.", "nullable": true, "type": "boolean" }, "unenroll_timeout": { "minimum": 0, "type": "number" } }, "required": [ "name", "namespace" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "advanced_settings": { "additionalProperties": false, "properties": { "agent_download_target_directory": { "nullable": true }, "agent_download_timeout": { "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 } }, "type": "object" }, "agent_features": { "items": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "name": { "type": "string" } }, "required": [ "name", "enabled" ], "type": "object" }, "type": "array" }, "agentless": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "requests": { "additionalProperties": false, "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "agents": { "type": "number" }, "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" }, "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, "properties": { "name": { "type": "string" }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "required": [ "name", "value" ], "type": "object" }, "type": "array" }, "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" }, "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" }, "monitoring_diagnostics": { "additionalProperties": false, "properties": { "limit": { "additionalProperties": false, "properties": { "burst": { "type": "number" }, "interval": { "type": "string" } }, "type": "object" }, "uploader": { "additionalProperties": false, "properties": { "init_dur": { "type": "string" }, "max_dur": { "type": "string" }, "max_retries": { "type": "number" } }, "type": "object" } }, "type": "object" }, "monitoring_enabled": { "items": { "enum": [ "logs", "metrics", "traces" ], "type": "string" }, "type": "array" }, "monitoring_http": { "additionalProperties": false, "properties": { "buffer": { "additionalProperties": false, "properties": { "enabled": { "default": false, "type": "boolean" } }, "type": "object" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "port": { "maximum": 65353, "minimum": 0, "type": "number" } }, "type": "object" }, "monitoring_output_id": { "nullable": true, "type": "string" }, "monitoring_pprof_enabled": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "namespace": { "minLength": 1, "type": "string" }, "overrides": { "additionalProperties": {}, "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_policies": { "anyOf": [ { "items": { "type": "string" }, "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, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" }, "type": "array" } ] }, "required_versions": { "items": { "additionalProperties": false, "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" ], "type": "object" }, "nullable": true, "type": "array" }, "revision": { "type": "number" }, "schema_version": { "type": "string" }, "space_ids": { "items": { "type": "string" }, "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_managed", "is_protected", "status", "updated_at", "updated_by", "revision" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Update an agent policy", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/agent_policies/{agentPolicyId}/copy": { "post": { "description": "Copy an agent policy by ID.

[Required authorization] Route required privileges: ALL of [fleet-agent-policies-all].", "operationId": "post-fleet-agent-policies-agentpolicyid-copy", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "agentPolicyId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "description": { "type": "string" }, "name": { "minLength": 1, "type": "string" } }, "required": [ "name" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "advanced_settings": { "additionalProperties": false, "properties": { "agent_download_target_directory": { "nullable": true }, "agent_download_timeout": { "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 } }, "type": "object" }, "agent_features": { "items": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "name": { "type": "string" } }, "required": [ "name", "enabled" ], "type": "object" }, "type": "array" }, "agentless": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "requests": { "additionalProperties": false, "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "agents": { "type": "number" }, "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" }, "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, "properties": { "name": { "type": "string" }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "required": [ "name", "value" ], "type": "object" }, "type": "array" }, "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" }, "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" }, "monitoring_diagnostics": { "additionalProperties": false, "properties": { "limit": { "additionalProperties": false, "properties": { "burst": { "type": "number" }, "interval": { "type": "string" } }, "type": "object" }, "uploader": { "additionalProperties": false, "properties": { "init_dur": { "type": "string" }, "max_dur": { "type": "string" }, "max_retries": { "type": "number" } }, "type": "object" } }, "type": "object" }, "monitoring_enabled": { "items": { "enum": [ "logs", "metrics", "traces" ], "type": "string" }, "type": "array" }, "monitoring_http": { "additionalProperties": false, "properties": { "buffer": { "additionalProperties": false, "properties": { "enabled": { "default": false, "type": "boolean" } }, "type": "object" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "port": { "maximum": 65353, "minimum": 0, "type": "number" } }, "type": "object" }, "monitoring_output_id": { "nullable": true, "type": "string" }, "monitoring_pprof_enabled": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "namespace": { "minLength": 1, "type": "string" }, "overrides": { "additionalProperties": {}, "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_policies": { "anyOf": [ { "items": { "type": "string" }, "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, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" }, "type": "array" } ] }, "required_versions": { "items": { "additionalProperties": false, "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" ], "type": "object" }, "nullable": true, "type": "array" }, "revision": { "type": "number" }, "schema_version": { "type": "string" }, "space_ids": { "items": { "type": "string" }, "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_managed", "is_protected", "status", "updated_at", "updated_by", "revision" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Copy an agent policy", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/agent_policies/{agentPolicyId}/download": { "get": { "description": "Download an agent policy by ID.

[Required authorization] Route required privileges: ALL of [fleet-agent-policies-read, fleet-setup].", "operationId": "get-fleet-agent-policies-agentpolicyid-download", "parameters": [ { "in": "path", "name": "agentPolicyId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "download", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "standalone", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "kubernetes", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Download an agent policy", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/agent_policies/{agentPolicyId}/full": { "get": { "description": "Get a full agent policy by ID.

[Required authorization] Route required privileges: ALL of [fleet-agent-policies-read].", "operationId": "get-fleet-agent-policies-agentpolicyid-full", "parameters": [ { "in": "path", "name": "agentPolicyId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "download", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "standalone", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "kubernetes", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "anyOf": [ { "type": "string" }, { "additionalProperties": false, "properties": { "agent": { "additionalProperties": false, "properties": { "download": { "additionalProperties": false, "properties": { "sourceURI": { "type": "string" } }, "required": [ "sourceURI" ], "type": "object" }, "features": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" } }, "required": [ "enabled" ], "type": "object" }, "type": "object" }, "limits": { "additionalProperties": false, "properties": { "go_max_procs": { "type": "number" } }, "type": "object" }, "logging": { "additionalProperties": false, "properties": { "files": { "additionalProperties": false, "properties": { "interval": { "type": "string" }, "keepfiles": { "type": "number" }, "rotateeverybytes": { "type": "number" } }, "type": "object" }, "level": { "type": "string" }, "to_files": { "type": "boolean" } }, "type": "object" }, "monitoring": { "additionalProperties": false, "properties": { "apm": {}, "enabled": { "type": "boolean" }, "logs": { "type": "boolean" }, "metrics": { "type": "boolean" }, "namespace": { "type": "string" }, "traces": { "type": "boolean" }, "use_output": { "type": "string" } }, "required": [ "enabled", "metrics", "logs", "traces", "apm" ], "type": "object" }, "protection": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "signing_key": { "type": "string" }, "uninstall_token_hash": { "type": "string" } }, "required": [ "enabled", "uninstall_token_hash", "signing_key" ], "type": "object" } }, "required": [ "monitoring", "download", "features" ], "type": "object" }, "fleet": { "anyOf": [ { "additionalProperties": false, "properties": { "hosts": { "items": { "type": "string" }, "type": "array" }, "proxy_headers": {}, "proxy_url": { "type": "string" }, "ssl": { "additionalProperties": false, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "renegotiation": { "type": "string" }, "verification_mode": { "type": "string" } }, "type": "object" } }, "required": [ "hosts", "proxy_headers" ], "type": "object" }, { "additionalProperties": false, "properties": { "kibana": { "additionalProperties": false, "properties": { "hosts": { "items": { "type": "string" }, "type": "array" }, "path": { "type": "string" }, "protocol": { "type": "string" } }, "required": [ "hosts", "protocol" ], "type": "object" } }, "required": [ "kibana" ], "type": "object" } ] }, "id": { "type": "string" }, "inputs": { "items": { "additionalProperties": true, "properties": { "data_stream": { "additionalProperties": true, "properties": { "namespace": { "type": "string" } }, "required": [ "namespace" ], "type": "object" }, "id": { "type": "string" }, "meta": { "additionalProperties": true, "properties": { "package": { "additionalProperties": true, "properties": { "name": { "type": "string" }, "version": { "type": "string" } }, "required": [ "name", "version" ], "type": "object" } }, "type": "object" }, "name": { "type": "string" }, "package_policy_id": { "type": "string" }, "processors": { "items": { "additionalProperties": true, "properties": { "add_fields": { "additionalProperties": true, "properties": { "fields": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, "type": "object" }, "target": { "type": "string" } }, "required": [ "target", "fields" ], "type": "object" } }, "required": [ "add_fields" ], "type": "object" }, "type": "array" }, "revision": { "type": "number" }, "streams": { "items": { "additionalProperties": true, "properties": { "data_stream": { "additionalProperties": true, "properties": { "dataset": { "type": "string" }, "type": { "type": "string" } }, "required": [ "dataset" ], "type": "object" }, "id": { "type": "string" } }, "required": [ "id", "data_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "use_output": { "type": "string" } }, "required": [ "id", "name", "revision", "type", "data_stream", "use_output", "package_policy_id" ], "type": "object" }, "type": "array" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "output_permissions": { "additionalProperties": { "additionalProperties": {}, "type": "object" }, "type": "object" }, "outputs": { "additionalProperties": { "additionalProperties": true, "properties": { "ca_sha256": { "nullable": true, "type": "string" }, "hosts": { "items": { "type": "string" }, "type": "array" }, "proxy_headers": {}, "proxy_url": { "type": "string" }, "type": { "type": "string" } }, "required": [ "type", "proxy_headers" ], "type": "object" }, "type": "object" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "signed": { "additionalProperties": false, "properties": { "data": { "type": "string" }, "signature": { "type": "string" } }, "required": [ "data", "signature" ], "type": "object" } }, "required": [ "id", "outputs", "inputs" ], "type": "object" } ] } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get a full agent policy", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/agent_policies/{agentPolicyId}/outputs": { "get": { "description": "Get a list of outputs associated with agent policy by policy id.

[Required authorization] Route required privileges: ALL of [fleet-agent-policies-read, fleet-settings-read].", "operationId": "get-fleet-agent-policies-agentpolicyid-outputs", "parameters": [ { "in": "path", "name": "agentPolicyId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "agentPolicyId": { "type": "string" }, "data": { "additionalProperties": false, "properties": { "integrations": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "integrationPolicyName": { "type": "string" }, "name": { "type": "string" }, "pkgName": { "type": "string" } }, "type": "object" }, "type": "array" }, "output": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ], "type": "object" } }, "required": [ "output" ], "type": "object" }, "monitoring": { "additionalProperties": false, "properties": { "output": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ], "type": "object" } }, "required": [ "output" ], "type": "object" } }, "required": [ "monitoring", "data" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get outputs for an agent policy", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/agent_status": { "get": { "operationId": "get-fleet-agent-status", "parameters": [ { "in": "query", "name": "policyId", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "policyIds", "required": false, "schema": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] } }, { "in": "query", "name": "kuery", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "results": { "additionalProperties": false, "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" ], "type": "object" } }, "required": [ "results" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get an agent status summary", "tags": [ "Elastic Agent status" ] } }, "/api/fleet/agent_status/data": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "get-fleet-agent-status-data", "parameters": [ { "in": "query", "name": "agentsIds", "required": true, "schema": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] } }, { "in": "query", "name": "pkgName", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "pkgVersion", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "previewData", "required": false, "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "dataPreview": { "items": {}, "type": "array" }, "items": { "items": { "additionalProperties": { "additionalProperties": false, "properties": { "data": { "type": "boolean" } }, "required": [ "data" ], "type": "object" }, "type": "object" }, "type": "array" } }, "required": [ "items", "dataPreview" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get incoming agent data", "tags": [ "Elastic Agents" ] } }, "/api/fleet/agents": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "get-fleet-agents", "parameters": [ { "in": "query", "name": "page", "required": false, "schema": { "default": 1, "type": "number" } }, { "in": "query", "name": "perPage", "required": false, "schema": { "default": 20, "type": "number" } }, { "in": "query", "name": "kuery", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "showInactive", "required": false, "schema": { "default": false, "type": "boolean" } }, { "in": "query", "name": "withMetrics", "required": false, "schema": { "default": false, "type": "boolean" } }, { "in": "query", "name": "showUpgradeable", "required": false, "schema": { "default": false, "type": "boolean" } }, { "in": "query", "name": "getStatusSummary", "required": false, "schema": { "default": false, "type": "boolean" } }, { "in": "query", "name": "sortField", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "sortOrder", "required": false, "schema": { "enum": [ "asc", "desc" ], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "access_api_key": { "type": "string" }, "access_api_key_id": { "type": "string" }, "active": { "type": "boolean" }, "agent": { "additionalProperties": true, "properties": { "id": { "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "version" ], "type": "object" }, "audit_unenrolled_reason": { "type": "string" }, "components": { "items": { "additionalProperties": false, "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, "properties": { "id": { "type": "string" }, "message": { "type": "string" }, "payload": { "additionalProperties": {}, "type": "object" }, "status": { "enum": [ "STARTING", "CONFIGURING", "HEALTHY", "DEGRADED", "FAILED", "STOPPING", "STOPPED" ], "type": "string" }, "type": { "enum": [ "input", "output" ], "type": "string" } }, "required": [ "id", "type", "status", "message" ], "type": "object" }, "type": "array" } }, "required": [ "id", "type", "status", "message" ], "type": "object" }, "type": "array" }, "default_api_key": { "type": "string" }, "default_api_key_history": { "items": { "additionalProperties": false, "deprecated": true, "properties": { "id": { "type": "string" }, "retired_at": { "type": "string" } }, "required": [ "id", "retired_at" ], "type": "object" }, "type": "array" }, "default_api_key_id": { "type": "string" }, "enrolled_at": { "type": "string" }, "id": { "type": "string" }, "last_checkin": { "type": "string" }, "last_checkin_message": { "type": "string" }, "last_checkin_status": { "enum": [ "error", "online", "degraded", "updating", "starting" ], "type": "string" }, "local_metadata": { "additionalProperties": {}, "type": "object" }, "metrics": { "additionalProperties": false, "properties": { "cpu_avg": { "type": "number" }, "memory_size_byte_avg": { "type": "number" } }, "type": "object" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "outputs": { "additionalProperties": { "additionalProperties": false, "properties": { "api_key_id": { "type": "string" }, "to_retire_api_key_ids": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "retired_at": { "type": "string" } }, "required": [ "id", "retired_at" ], "type": "object" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "api_key_id", "type" ], "type": "object" }, "type": "object" }, "packages": { "items": { "type": "string" }, "type": "array" }, "policy_id": { "type": "string" }, "policy_revision": { "nullable": true, "type": "number" }, "sort": { "items": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "enum": [], "nullable": true } ] }, "type": "array" }, "status": { "enum": [ "offline", "error", "online", "inactive", "enrolling", "unenrolling", "unenrolled", "updating", "degraded", "uninstalled", "orphaned" ], "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "enum": [ "PERMANENT", "EPHEMERAL", "TEMPORARY" ], "type": "string" }, "unenrolled_at": { "type": "string" }, "unenrollment_started_at": { "type": "string" }, "unhealthy_reason": { "items": { "enum": [ "input", "output", "other" ], "type": "string" }, "nullable": true, "type": "array" }, "upgrade_details": { "additionalProperties": false, "nullable": true, "properties": { "action_id": { "type": "string" }, "metadata": { "additionalProperties": false, "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" }, "retry_error_msg": { "type": "string" }, "retry_until": { "type": "string" }, "scheduled_at": { "type": "string" } }, "type": "object" }, "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" ], "type": "object" }, "upgrade_started_at": { "nullable": true, "type": "string" }, "upgraded_at": { "nullable": true, "type": "string" }, "user_provided_metadata": { "additionalProperties": {}, "type": "object" } }, "required": [ "id", "packages", "type", "active", "enrolled_at", "local_metadata" ], "type": "object" }, "type": "array" }, "page": { "type": "number" }, "perPage": { "type": "number" }, "statusSummary": { "additionalProperties": { "type": "number" }, "type": "object" }, "total": { "type": "number" } }, "required": [ "items", "total", "page", "perPage" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get agents", "tags": [ "Elastic Agents" ] }, "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "post-fleet-agents", "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": { "schema": { "additionalProperties": false, "properties": { "actionIds": { "items": { "type": "string" }, "type": "array" } }, "required": [ "actionIds" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "type": "string" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get agents by action ids", "tags": [ "Elastic Agents" ] } }, "/api/fleet/agents/action_status": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "get-fleet-agents-action-status", "parameters": [ { "in": "query", "name": "page", "required": false, "schema": { "default": 0, "type": "number" } }, { "in": "query", "name": "perPage", "required": false, "schema": { "default": 20, "type": "number" } }, { "in": "query", "name": "date", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "latest", "required": false, "schema": { "type": "number" } }, { "in": "query", "name": "errorSize", "required": false, "schema": { "default": 5, "type": "number" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "actionId": { "type": "string" }, "cancellationTime": { "type": "string" }, "completionTime": { "type": "string" }, "creationTime": { "description": "creation time of action", "type": "string" }, "expiration": { "type": "string" }, "hasRolloutPeriod": { "type": "boolean" }, "latestErrors": { "items": { "additionalProperties": false, "description": "latest errors that happened when the agents executed the action", "properties": { "agentId": { "type": "string" }, "error": { "type": "string" }, "hostname": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "agentId", "error", "timestamp" ], "type": "object" }, "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" ], "type": "string" }, "version": { "description": "agent version number (UPGRADE action)", "type": "string" } }, "required": [ "actionId", "nbAgentsActionCreated", "nbAgentsAck", "nbAgentsFailed", "type", "nbAgentsActioned", "status", "creationTime" ], "type": "object" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get an agent action status", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/actions/{actionId}/cancel": { "post": { "description": "[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "actionId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "ack_data": {}, "agents": { "items": { "type": "string" }, "type": "array" }, "created_at": { "type": "string" }, "data": {}, "expiration": { "type": "string" }, "id": { "type": "string" }, "minimum_execution_duration": { "type": "number" }, "namespaces": { "items": { "type": "string" }, "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" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Cancel an agent action", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/available_versions": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "get-fleet-agents-available-versions", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "type": "string" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get available agent versions", "tags": [ "Elastic Agents" ] } }, "/api/fleet/agents/bulk_reassign": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "post-fleet-agents-bulk-reassign", "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": { "schema": { "additionalProperties": false, "properties": { "agents": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] }, "batchSize": { "type": "number" }, "includeInactive": { "default": false, "type": "boolean" }, "policy_id": { "type": "string" } }, "required": [ "policy_id", "agents" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actionId": { "type": "string" } }, "required": [ "actionId" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Bulk reassign agents", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/bulk_request_diagnostics": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "post-fleet-agents-bulk-request-diagnostics", "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": { "schema": { "additionalProperties": false, "properties": { "additional_metrics": { "items": { "enum": [ "CPU" ], "type": "string" }, "type": "array" }, "agents": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] }, "batchSize": { "type": "number" } }, "required": [ "agents" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actionId": { "type": "string" } }, "required": [ "actionId" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Bulk request diagnostics from agents", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/bulk_unenroll": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "post-fleet-agents-bulk-unenroll", "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": { "schema": { "additionalProperties": false, "properties": { "agents": { "anyOf": [ { "items": { "description": "KQL query string, leave empty to action all agents", "type": "string" }, "type": "array" }, { "description": "list of agent IDs", "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" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actionId": { "type": "string" } }, "required": [ "actionId" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Bulk unenroll agents", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/bulk_update_agent_tags": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "post-fleet-agents-bulk-update-agent-tags", "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": { "schema": { "additionalProperties": false, "properties": { "agents": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] }, "batchSize": { "type": "number" }, "includeInactive": { "default": false, "type": "boolean" }, "tagsToAdd": { "items": { "type": "string" }, "type": "array" }, "tagsToRemove": { "items": { "type": "string" }, "type": "array" } }, "required": [ "agents" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actionId": { "type": "string" } }, "required": [ "actionId" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Bulk update agent tags", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/bulk_upgrade": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "post-fleet-agents-bulk-upgrade", "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": { "schema": { "additionalProperties": false, "properties": { "agents": { "anyOf": [ { "items": { "type": "string" }, "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" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actionId": { "type": "string" } }, "required": [ "actionId" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Bulk upgrade agents", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/files/{fileId}": { "delete": { "description": "Delete a file uploaded by an agent.

[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "fileId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "deleted": { "type": "boolean" }, "id": { "type": "string" } }, "required": [ "id", "deleted" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Delete an uploaded file", "tags": [ "Elastic Agents" ] } }, "/api/fleet/agents/files/{fileId}/{fileName}": { "get": { "description": "Get a file uploaded by an agent.

[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "get-fleet-agents-files-fileid-filename", "parameters": [ { "in": "path", "name": "fileId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "fileName", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get an uploaded file", "tags": [ "Elastic Agents" ] } }, "/api/fleet/agents/setup": { "get": { "description": "[Required authorization] Route required privileges: ANY of [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": { "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.", "properties": { "isReady": { "type": "boolean" }, "is_secrets_storage_enabled": { "type": "boolean" }, "is_space_awareness_enabled": { "type": "boolean" }, "missing_optional_features": { "items": { "enum": [ "encrypted_saved_object_encryption_key_required" ], "type": "string" }, "type": "array" }, "missing_requirements": { "items": { "enum": [ "security_required", "tls_required", "api_keys", "fleet_admin_user", "fleet_server" ], "type": "string" }, "type": "array" }, "package_verification_key_id": { "type": "string" } }, "required": [ "isReady", "missing_requirements", "missing_optional_features" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get agent setup info", "tags": [ "Elastic Agents" ] }, "post": { "description": "[Required authorization] Route required privileges: ANY of [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", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "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.", "properties": { "isInitialized": { "type": "boolean" }, "nonFatalErrors": { "items": { "additionalProperties": false, "properties": { "message": { "type": "string" }, "name": { "type": "string" } }, "required": [ "name", "message" ], "type": "object" }, "type": "array" } }, "required": [ "isInitialized", "nonFatalErrors" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Initiate agent setup", "tags": [ "Elastic Agents" ] } }, "/api/fleet/agents/tags": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "get-fleet-agents-tags", "parameters": [ { "in": "query", "name": "kuery", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "showInactive", "required": false, "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "type": "string" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get agent tags", "tags": [ "Elastic Agents" ] } }, "/api/fleet/agents/{agentId}": { "delete": { "description": "Delete an agent by ID.

[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "delete-fleet-agents-agentid", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "agentId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "action": { "enum": [ "deleted" ], "type": "string" } }, "required": [ "action" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Delete an agent", "tags": [ "Elastic Agents" ] }, "get": { "description": "Get an agent by ID.

[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "get-fleet-agents-agentid", "parameters": [ { "in": "path", "name": "agentId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "withMetrics", "required": false, "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "access_api_key": { "type": "string" }, "access_api_key_id": { "type": "string" }, "active": { "type": "boolean" }, "agent": { "additionalProperties": true, "properties": { "id": { "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "version" ], "type": "object" }, "audit_unenrolled_reason": { "type": "string" }, "components": { "items": { "additionalProperties": false, "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, "properties": { "id": { "type": "string" }, "message": { "type": "string" }, "payload": { "additionalProperties": {}, "type": "object" }, "status": { "enum": [ "STARTING", "CONFIGURING", "HEALTHY", "DEGRADED", "FAILED", "STOPPING", "STOPPED" ], "type": "string" }, "type": { "enum": [ "input", "output" ], "type": "string" } }, "required": [ "id", "type", "status", "message" ], "type": "object" }, "type": "array" } }, "required": [ "id", "type", "status", "message" ], "type": "object" }, "type": "array" }, "default_api_key": { "type": "string" }, "default_api_key_history": { "items": { "additionalProperties": false, "deprecated": true, "properties": { "id": { "type": "string" }, "retired_at": { "type": "string" } }, "required": [ "id", "retired_at" ], "type": "object" }, "type": "array" }, "default_api_key_id": { "type": "string" }, "enrolled_at": { "type": "string" }, "id": { "type": "string" }, "last_checkin": { "type": "string" }, "last_checkin_message": { "type": "string" }, "last_checkin_status": { "enum": [ "error", "online", "degraded", "updating", "starting" ], "type": "string" }, "local_metadata": { "additionalProperties": {}, "type": "object" }, "metrics": { "additionalProperties": false, "properties": { "cpu_avg": { "type": "number" }, "memory_size_byte_avg": { "type": "number" } }, "type": "object" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "outputs": { "additionalProperties": { "additionalProperties": false, "properties": { "api_key_id": { "type": "string" }, "to_retire_api_key_ids": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "retired_at": { "type": "string" } }, "required": [ "id", "retired_at" ], "type": "object" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "api_key_id", "type" ], "type": "object" }, "type": "object" }, "packages": { "items": { "type": "string" }, "type": "array" }, "policy_id": { "type": "string" }, "policy_revision": { "nullable": true, "type": "number" }, "sort": { "items": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "enum": [], "nullable": true } ] }, "type": "array" }, "status": { "enum": [ "offline", "error", "online", "inactive", "enrolling", "unenrolling", "unenrolled", "updating", "degraded", "uninstalled", "orphaned" ], "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "enum": [ "PERMANENT", "EPHEMERAL", "TEMPORARY" ], "type": "string" }, "unenrolled_at": { "type": "string" }, "unenrollment_started_at": { "type": "string" }, "unhealthy_reason": { "items": { "enum": [ "input", "output", "other" ], "type": "string" }, "nullable": true, "type": "array" }, "upgrade_details": { "additionalProperties": false, "nullable": true, "properties": { "action_id": { "type": "string" }, "metadata": { "additionalProperties": false, "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" }, "retry_error_msg": { "type": "string" }, "retry_until": { "type": "string" }, "scheduled_at": { "type": "string" } }, "type": "object" }, "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" ], "type": "object" }, "upgrade_started_at": { "nullable": true, "type": "string" }, "upgraded_at": { "nullable": true, "type": "string" }, "user_provided_metadata": { "additionalProperties": {}, "type": "object" } }, "required": [ "id", "packages", "type", "active", "enrolled_at", "local_metadata" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get an agent", "tags": [ "Elastic Agents" ] }, "put": { "description": "Update an agent by ID.

[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "put-fleet-agents-agentid", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "agentId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "tags": { "items": { "type": "string" }, "type": "array" }, "user_provided_metadata": { "additionalProperties": {}, "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "access_api_key": { "type": "string" }, "access_api_key_id": { "type": "string" }, "active": { "type": "boolean" }, "agent": { "additionalProperties": true, "properties": { "id": { "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "version" ], "type": "object" }, "audit_unenrolled_reason": { "type": "string" }, "components": { "items": { "additionalProperties": false, "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, "properties": { "id": { "type": "string" }, "message": { "type": "string" }, "payload": { "additionalProperties": {}, "type": "object" }, "status": { "enum": [ "STARTING", "CONFIGURING", "HEALTHY", "DEGRADED", "FAILED", "STOPPING", "STOPPED" ], "type": "string" }, "type": { "enum": [ "input", "output" ], "type": "string" } }, "required": [ "id", "type", "status", "message" ], "type": "object" }, "type": "array" } }, "required": [ "id", "type", "status", "message" ], "type": "object" }, "type": "array" }, "default_api_key": { "type": "string" }, "default_api_key_history": { "items": { "additionalProperties": false, "deprecated": true, "properties": { "id": { "type": "string" }, "retired_at": { "type": "string" } }, "required": [ "id", "retired_at" ], "type": "object" }, "type": "array" }, "default_api_key_id": { "type": "string" }, "enrolled_at": { "type": "string" }, "id": { "type": "string" }, "last_checkin": { "type": "string" }, "last_checkin_message": { "type": "string" }, "last_checkin_status": { "enum": [ "error", "online", "degraded", "updating", "starting" ], "type": "string" }, "local_metadata": { "additionalProperties": {}, "type": "object" }, "metrics": { "additionalProperties": false, "properties": { "cpu_avg": { "type": "number" }, "memory_size_byte_avg": { "type": "number" } }, "type": "object" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "outputs": { "additionalProperties": { "additionalProperties": false, "properties": { "api_key_id": { "type": "string" }, "to_retire_api_key_ids": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "retired_at": { "type": "string" } }, "required": [ "id", "retired_at" ], "type": "object" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "api_key_id", "type" ], "type": "object" }, "type": "object" }, "packages": { "items": { "type": "string" }, "type": "array" }, "policy_id": { "type": "string" }, "policy_revision": { "nullable": true, "type": "number" }, "sort": { "items": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "enum": [], "nullable": true } ] }, "type": "array" }, "status": { "enum": [ "offline", "error", "online", "inactive", "enrolling", "unenrolling", "unenrolled", "updating", "degraded", "uninstalled", "orphaned" ], "type": "string" }, "tags": { "items": { "type": "string" }, "type": "array" }, "type": { "enum": [ "PERMANENT", "EPHEMERAL", "TEMPORARY" ], "type": "string" }, "unenrolled_at": { "type": "string" }, "unenrollment_started_at": { "type": "string" }, "unhealthy_reason": { "items": { "enum": [ "input", "output", "other" ], "type": "string" }, "nullable": true, "type": "array" }, "upgrade_details": { "additionalProperties": false, "nullable": true, "properties": { "action_id": { "type": "string" }, "metadata": { "additionalProperties": false, "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" }, "retry_error_msg": { "type": "string" }, "retry_until": { "type": "string" }, "scheduled_at": { "type": "string" } }, "type": "object" }, "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" ], "type": "object" }, "upgrade_started_at": { "nullable": true, "type": "string" }, "upgraded_at": { "nullable": true, "type": "string" }, "user_provided_metadata": { "additionalProperties": {}, "type": "object" } }, "required": [ "id", "packages", "type", "active", "enrolled_at", "local_metadata" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Update an agent", "tags": [ "Elastic Agents" ] } }, "/api/fleet/agents/{agentId}/actions": { "post": { "description": "[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "agentId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "action": { "anyOf": [ { "additionalProperties": false, "properties": { "ack_data": {}, "data": {}, "type": { "enum": [ "UNENROLL", "UPGRADE", "POLICY_REASSIGN" ], "type": "string" } }, "required": [ "type", "data", "ack_data" ], "type": "object" }, { "additionalProperties": false, "properties": { "data": { "additionalProperties": false, "properties": { "log_level": { "enum": [ "debug", "info", "warning", "error" ], "nullable": true, "type": "string" } }, "required": [ "log_level" ], "type": "object" }, "type": { "enum": [ "SETTINGS" ], "type": "string" } }, "required": [ "type", "data" ], "type": "object" } ] } }, "required": [ "action" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "ack_data": {}, "agents": { "items": { "type": "string" }, "type": "array" }, "created_at": { "type": "string" }, "data": {}, "expiration": { "type": "string" }, "id": { "type": "string" }, "minimum_execution_duration": { "type": "number" }, "namespaces": { "items": { "type": "string" }, "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" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create an agent action", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/{agentId}/reassign": { "post": { "description": "[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "agentId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "policy_id": { "type": "string" } }, "required": [ "policy_id" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Reassign an agent", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/{agentId}/request_diagnostics": { "post": { "description": "[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "agentId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "nullable": true, "properties": { "additional_metrics": { "items": { "enum": [ "CPU" ], "type": "string" }, "type": "array" } }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "actionId": { "type": "string" } }, "required": [ "actionId" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Request agent diagnostics", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/{agentId}/unenroll": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "post-fleet-agents-agentid-unenroll", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "agentId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "nullable": true, "properties": { "force": { "type": "boolean" }, "revoke": { "type": "boolean" } }, "type": "object" } } } }, "responses": {}, "summary": "Unenroll an agent", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/{agentId}/upgrade": { "post": { "description": "[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "agentId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "force": { "type": "boolean" }, "skipRateLimitCheck": { "type": "boolean" }, "source_uri": { "type": "string" }, "version": { "type": "string" } }, "required": [ "version" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Upgrade an agent", "tags": [ "Elastic Agent actions" ] } }, "/api/fleet/agents/{agentId}/uploads": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-read].", "operationId": "get-fleet-agents-agentid-uploads", "parameters": [ { "in": "path", "name": "agentId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "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" ], "type": "object" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get agent uploads", "tags": [ "Elastic Agents" ] } }, "/api/fleet/check-permissions": { "get": { "operationId": "get-fleet-check-permissions", "parameters": [ { "in": "query", "name": "fleetServerSetup", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "error": { "enum": [ "MISSING_SECURITY", "MISSING_PRIVILEGES", "MISSING_FLEET_SERVER_SETUP_PRIVILEGES" ], "type": "string" }, "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Check permissions", "tags": [ "Fleet internals" ] } }, "/api/fleet/data_streams": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-all, fleet-agent-policies-all, fleet-settings-all].", "operationId": "get-fleet-data-streams", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "data_streams": { "items": { "additionalProperties": false, "properties": { "dashboards": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id", "title" ], "type": "object" }, "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, "properties": { "environment": { "type": "string" }, "serviceName": { "type": "string" } }, "required": [ "environment", "serviceName" ], "type": "object" }, "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" ], "type": "object" }, "type": "array" } }, "required": [ "data_streams" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get data streams", "tags": [ "Data streams" ] } }, "/api/fleet/enrollment_api_keys": { "get": { "description": "[Required authorization] Route required privileges: ANY of [fleet-agents-all OR fleet-setup].", "operationId": "get-fleet-enrollment-api-keys", "parameters": [ { "in": "query", "name": "page", "required": false, "schema": { "default": 1, "type": "number" } }, { "in": "query", "name": "perPage", "required": false, "schema": { "default": 20, "type": "number" } }, { "in": "query", "name": "kuery", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "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" }, "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" ], "type": "object" }, "type": "array" }, "list": { "deprecated": true, "items": { "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" }, "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" ], "type": "object" }, "type": "array" }, "page": { "type": "number" }, "perPage": { "type": "number" }, "total": { "type": "number" } }, "required": [ "items", "total", "page", "perPage", "list" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get enrollment API keys", "tags": [ "Fleet enrollment API keys" ] }, "post": { "description": "[Required authorization] Route required privileges: ALL of [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": { "schema": { "additionalProperties": false, "properties": { "expiration": { "type": "string" }, "name": { "type": "string" }, "policy_id": { "type": "string" } }, "required": [ "policy_id" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "action": { "enum": [ "created" ], "type": "string" }, "item": { "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" }, "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" ], "type": "object" } }, "required": [ "item", "action" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create an enrollment API key", "tags": [ "Fleet enrollment API keys" ] } }, "/api/fleet/enrollment_api_keys/{keyId}": { "delete": { "description": "Revoke an enrollment API key by ID by marking it as inactive.

[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "delete-fleet-enrollment-api-keys-keyid", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "keyId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "action": { "enum": [ "deleted" ], "type": "string" } }, "required": [ "action" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Revoke an enrollment API key", "tags": [ "Fleet enrollment API keys" ] }, "get": { "description": "Get an enrollment API key by ID.

[Required authorization] Route required privileges: ANY of [fleet-agents-all OR fleet-setup].", "operationId": "get-fleet-enrollment-api-keys-keyid", "parameters": [ { "in": "path", "name": "keyId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "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" }, "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" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get an enrollment API key", "tags": [ "Fleet enrollment API keys" ] } }, "/api/fleet/epm/bulk_assets": { "post": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "post-fleet-epm-bulk-assets", "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": { "schema": { "additionalProperties": false, "properties": { "assetIds": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" } }, "required": [ "assetIds" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "appLink": { "type": "string" }, "attributes": { "additionalProperties": false, "properties": { "description": { "type": "string" }, "service": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }, "id": { "type": "string" }, "type": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "type", "attributes" ], "type": "object" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Bulk get assets", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/categories": { "get": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "get-fleet-epm-categories", "parameters": [ { "in": "query", "name": "prerelease", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "include_policy_templates", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "count": { "type": "number" }, "id": { "type": "string" }, "parent_id": { "type": "string" }, "parent_title": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id", "title", "count" ], "type": "object" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get package categories", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/custom_integrations": { "post": { "description": "[Required authorization] Route required privileges: ALL of [integrations-all, fleet-agent-policies-all].", "operationId": "post-fleet-epm-custom-integrations", "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": { "schema": { "additionalProperties": false, "properties": { "datasets": { "items": { "additionalProperties": false, "properties": { "name": { "type": "string" }, "type": { "enum": [ "logs", "metrics", "traces", "synthetics", "profiling" ], "type": "string" } }, "required": [ "name", "type" ], "type": "object" }, "type": "array" }, "force": { "type": "boolean" }, "integrationName": { "type": "string" } }, "required": [ "integrationName", "datasets" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "_meta": { "additionalProperties": false, "properties": { "install_source": { "type": "string" } }, "required": [ "install_source" ], "type": "object" }, "items": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, { "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" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" } ] }, "type": "array" } }, "required": [ "items", "_meta" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create a custom integration", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/data_streams": { "get": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "get-fleet-epm-data-streams", "parameters": [ { "in": "query", "name": "type", "required": false, "schema": { "enum": [ "logs", "metrics", "traces", "synthetics", "profiling" ], "type": "string" } }, { "in": "query", "name": "datasetQuery", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "sortOrder", "required": false, "schema": { "default": "asc", "enum": [ "asc", "desc" ], "type": "string" } }, { "in": "query", "name": "uncategorisedOnly", "required": false, "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get data streams", "tags": [ "Data streams" ] } }, "/api/fleet/epm/packages": { "get": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "get-fleet-epm-packages", "parameters": [ { "in": "query", "name": "category", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "prerelease", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "excludeInstallStatus", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": true, "properties": { "categories": { "items": { "type": "string" }, "type": "array" }, "conditions": { "additionalProperties": true, "properties": { "elastic": { "additionalProperties": true, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "subscription": { "type": "string" } }, "type": "object" }, "kibana": { "additionalProperties": true, "properties": { "version": { "type": "string" } }, "type": "object" } }, "type": "object" }, "data_streams": { "items": { "additionalProperties": {}, "type": "object" }, "type": "array" }, "description": { "type": "string" }, "discovery": { "additionalProperties": true, "properties": { "fields": { "items": { "additionalProperties": true, "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "type": "array" } }, "type": "object" }, "download": { "type": "string" }, "format_version": { "type": "string" }, "icons": { "items": { "additionalProperties": true, "properties": { "dark_mode": { "type": "boolean" }, "path": { "type": "string" }, "size": { "type": "string" }, "src": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "src" ], "type": "object" }, "type": "array" }, "id": { "type": "string" }, "installationInfo": { "additionalProperties": true, "properties": { "additional_spaces_installed_kibana": { "additionalProperties": { "items": { "additionalProperties": true, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" }, "type": "object" }, "created_at": { "type": "string" }, "experimental_data_stream_features": { "items": { "additionalProperties": true, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": true, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "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, "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" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" }, "installed_kibana": { "items": { "additionalProperties": true, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" }, "installed_kibana_space_id": { "type": "string" }, "latest_executed_state": { "additionalProperties": true, "properties": { "error": { "type": "string" }, "name": { "type": "string" }, "started_at": { "type": "string" } }, "required": [ "name", "started_at" ], "type": "object" }, "latest_install_failed_attempts": { "items": { "additionalProperties": true, "properties": { "created_at": { "type": "string" }, "error": { "additionalProperties": true, "properties": { "message": { "type": "string" }, "name": { "type": "string" }, "stack": { "type": "string" } }, "required": [ "name", "message" ], "type": "object" }, "target_version": { "type": "string" } }, "required": [ "created_at", "target_version", "error" ], "type": "object" }, "type": "array" }, "name": { "type": "string" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "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" ], "type": "object" }, "integration": { "type": "string" }, "internal": { "type": "boolean" }, "latestVersion": { "type": "string" }, "name": { "type": "string" }, "owner": { "additionalProperties": true, "properties": { "github": { "type": "string" }, "type": { "enum": [ "elastic", "partner", "community" ], "type": "string" } }, "type": "object" }, "path": { "type": "string" }, "policy_templates": { "items": { "additionalProperties": {}, "type": "object" }, "type": "array" }, "readme": { "type": "string" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "signature_path": { "type": "string" }, "source": { "additionalProperties": true, "properties": { "license": { "type": "string" } }, "required": [ "license" ], "type": "object" }, "status": { "type": "string" }, "title": { "type": "string" }, "type": { "enum": [ "integration", "input", "content" ], "type": "string" }, "vars": { "items": { "additionalProperties": {}, "type": "object" }, "type": "array" }, "version": { "type": "string" } }, "required": [ "name", "version", "title", "id" ], "type": "object" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get packages", "tags": [ "Elastic Package Manager (EPM)" ] }, "post": { "description": "[Required authorization] Route required privileges: ALL of [integrations-all, fleet-agent-policies-all].", "operationId": "post-fleet-epm-packages", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "query", "name": "ignoreMappingUpdateErrors", "required": false, "schema": { "default": false, "type": "boolean" } }, { "in": "query", "name": "skipDataStreamRollover", "required": false, "schema": { "default": false, "type": "boolean" } } ], "requestBody": { "content": { "application/gzip; application/zip": { "schema": { "format": "binary", "type": "string" } } } }, "responses": { "200": { "content": { "application/gzip; application/zip": { "schema": { "additionalProperties": false, "properties": { "_meta": { "additionalProperties": false, "properties": { "install_source": { "type": "string" } }, "required": [ "install_source" ], "type": "object" }, "items": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, { "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" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" } ] }, "type": "array" } }, "required": [ "items", "_meta" ], "type": "object" } } } }, "400": { "content": { "application/gzip; application/zip": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Install a package by upload", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/packages/_bulk": { "post": { "description": "[Required authorization] Route required privileges: ALL of [integrations-all, 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" } }, { "in": "query", "name": "prerelease", "required": false, "schema": { "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "force": { "default": false, "type": "boolean" }, "packages": { "items": { "anyOf": [ { "type": "string" }, { "additionalProperties": false, "properties": { "name": { "type": "string" }, "prerelease": { "type": "boolean" }, "version": { "type": "string" } }, "required": [ "name", "version" ], "type": "object" } ] }, "minItems": 1, "type": "array" } }, "required": [ "packages" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "name": { "type": "string" }, "result": { "additionalProperties": false, "properties": { "assets": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, { "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" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" } ] }, "type": "array" }, "error": {}, "installSource": { "type": "string" }, "installType": { "type": "string" }, "status": { "enum": [ "installed", "already_installed" ], "type": "string" } }, "required": [ "error", "installType" ], "type": "object" }, "version": { "type": "string" } }, "required": [ "name", "version", "result" ], "type": "object" }, { "additionalProperties": false, "properties": { "error": { "anyOf": [ { "type": "string" }, {} ] }, "name": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "name", "statusCode", "error" ], "type": "object" } ] }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Bulk install packages", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/packages/installed": { "get": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "get-fleet-epm-packages-installed", "parameters": [ { "in": "query", "name": "dataStreamType", "required": false, "schema": { "enum": [ "logs", "metrics", "traces", "synthetics", "profiling" ], "type": "string" } }, { "in": "query", "name": "showOnlyActiveDataStreams", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "nameQuery", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "searchAfter", "required": false, "schema": { "items": { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, "type": "array" } }, { "in": "query", "name": "perPage", "required": false, "schema": { "default": 15, "type": "number" } }, { "in": "query", "name": "sortOrder", "required": false, "schema": { "default": "asc", "enum": [ "asc", "desc" ], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "dataStreams": { "items": { "additionalProperties": false, "properties": { "name": { "type": "string" }, "title": { "type": "string" } }, "required": [ "name", "title" ], "type": "object" }, "type": "array" }, "description": { "type": "string" }, "icons": { "items": { "additionalProperties": false, "properties": { "dark_mode": { "type": "boolean" }, "path": { "type": "string" }, "size": { "type": "string" }, "src": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "src" ], "type": "object" }, "type": "array" }, "name": { "type": "string" }, "status": { "type": "string" }, "title": { "type": "string" }, "version": { "type": "string" } }, "required": [ "name", "version", "status", "dataStreams" ], "type": "object" }, "type": "array" }, "searchAfter": { "items": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "enum": [], "nullable": true }, {} ] }, "type": "array" }, "total": { "type": "number" } }, "required": [ "items", "total" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get installed packages", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/packages/limited": { "get": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "get-fleet-epm-packages-limited", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "type": "string" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get a limited package list", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/packages/{pkgName}/stats": { "get": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "get-fleet-epm-packages-pkgname-stats", "parameters": [ { "in": "path", "name": "pkgName", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "response": { "additionalProperties": false, "properties": { "agent_policy_count": { "type": "number" } }, "required": [ "agent_policy_count" ], "type": "object" } }, "required": [ "response" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get package stats", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/packages/{pkgName}/{pkgVersion}": { "delete": { "description": "[Required authorization] Route required privileges: ALL of [integrations-all, 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" } }, { "in": "path", "name": "pkgName", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "pkgVersion", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "force", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, { "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" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" } ] }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Delete a package", "tags": [ "Elastic Package Manager (EPM)" ] }, "get": { "operationId": "get-fleet-epm-packages-pkgname-pkgversion", "parameters": [ { "in": "path", "name": "pkgName", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "pkgVersion", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "ignoreUnverified", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "prerelease", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "full", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "withMetadata", "required": false, "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": true, "properties": { "agent": { "additionalProperties": false, "properties": { "privileges": { "additionalProperties": false, "properties": { "root": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "asset_tags": { "items": { "additionalProperties": false, "properties": { "asset_ids": { "items": { "type": "string" }, "type": "array" }, "asset_types": { "items": { "type": "string" }, "type": "array" }, "text": { "type": "string" } }, "required": [ "text" ], "type": "object" }, "type": "array" }, "assets": { "additionalProperties": {}, "type": "object" }, "categories": { "items": { "type": "string" }, "type": "array" }, "conditions": { "additionalProperties": true, "properties": { "elastic": { "additionalProperties": true, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "subscription": { "type": "string" } }, "type": "object" }, "kibana": { "additionalProperties": true, "properties": { "version": { "type": "string" } }, "type": "object" } }, "type": "object" }, "data_streams": { "items": { "additionalProperties": {}, "type": "object" }, "type": "array" }, "description": { "type": "string" }, "discovery": { "additionalProperties": true, "properties": { "fields": { "items": { "additionalProperties": true, "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "type": "array" } }, "type": "object" }, "download": { "type": "string" }, "elasticsearch": { "additionalProperties": {}, "type": "object" }, "format_version": { "type": "string" }, "icons": { "items": { "additionalProperties": true, "properties": { "dark_mode": { "type": "boolean" }, "path": { "type": "string" }, "size": { "type": "string" }, "src": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "src" ], "type": "object" }, "type": "array" }, "installationInfo": { "additionalProperties": true, "properties": { "additional_spaces_installed_kibana": { "additionalProperties": { "items": { "additionalProperties": true, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" }, "type": "object" }, "created_at": { "type": "string" }, "experimental_data_stream_features": { "items": { "additionalProperties": true, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": true, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "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, "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" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" }, "installed_kibana": { "items": { "additionalProperties": true, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" }, "installed_kibana_space_id": { "type": "string" }, "latest_executed_state": { "additionalProperties": true, "properties": { "error": { "type": "string" }, "name": { "type": "string" }, "started_at": { "type": "string" } }, "required": [ "name", "started_at" ], "type": "object" }, "latest_install_failed_attempts": { "items": { "additionalProperties": true, "properties": { "created_at": { "type": "string" }, "error": { "additionalProperties": true, "properties": { "message": { "type": "string" }, "name": { "type": "string" }, "stack": { "type": "string" } }, "required": [ "name", "message" ], "type": "object" }, "target_version": { "type": "string" } }, "required": [ "created_at", "target_version", "error" ], "type": "object" }, "type": "array" }, "name": { "type": "string" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "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" ], "type": "object" }, "internal": { "type": "boolean" }, "keepPoliciesUpToDate": { "type": "boolean" }, "latestVersion": { "type": "string" }, "license": { "type": "string" }, "licensePath": { "type": "string" }, "name": { "type": "string" }, "notice": { "type": "string" }, "owner": { "additionalProperties": true, "properties": { "github": { "type": "string" }, "type": { "enum": [ "elastic", "partner", "community" ], "type": "string" } }, "type": "object" }, "path": { "type": "string" }, "policy_templates": { "items": { "additionalProperties": {}, "type": "object" }, "type": "array" }, "readme": { "type": "string" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "screenshots": { "items": { "additionalProperties": false, "properties": { "dark_mode": { "type": "boolean" }, "path": { "type": "string" }, "size": { "type": "string" }, "src": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "src" ], "type": "object" }, "type": "array" }, "signature_path": { "type": "string" }, "source": { "additionalProperties": true, "properties": { "license": { "type": "string" } }, "required": [ "license" ], "type": "object" }, "status": { "type": "string" }, "title": { "type": "string" }, "type": { "enum": [ "integration", "input", "content" ], "type": "string" }, "vars": { "items": { "additionalProperties": {}, "type": "object" }, "type": "array" }, "version": { "type": "string" } }, "required": [ "name", "version", "title", "assets" ], "type": "object" }, "metadata": { "additionalProperties": false, "properties": { "has_policies": { "type": "boolean" } }, "required": [ "has_policies" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get a package", "tags": [ "Elastic Package Manager (EPM)" ] }, "post": { "description": "[Required authorization] Route required privileges: ALL of [integrations-all, fleet-agent-policies-all].", "operationId": "post-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" } }, { "in": "path", "name": "pkgName", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "pkgVersion", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "prerelease", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "ignoreMappingUpdateErrors", "required": false, "schema": { "default": false, "type": "boolean" } }, { "in": "query", "name": "skipDataStreamRollover", "required": false, "schema": { "default": false, "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "nullable": true, "properties": { "force": { "default": false, "type": "boolean" }, "ignore_constraints": { "default": false, "type": "boolean" } }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "_meta": { "additionalProperties": false, "properties": { "install_source": { "type": "string" } }, "required": [ "install_source" ], "type": "object" }, "items": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, { "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" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" } ] }, "type": "array" } }, "required": [ "items", "_meta" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Install a package from the registry", "tags": [ "Elastic Package Manager (EPM)" ] }, "put": { "description": "[Required authorization] Route required privileges: ALL of [integrations-all, fleet-agent-policies-all].", "operationId": "put-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" } }, { "in": "path", "name": "pkgName", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "pkgVersion", "required": false, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "keepPoliciesUpToDate": { "type": "boolean" } }, "required": [ "keepPoliciesUpToDate" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": true, "properties": { "agent": { "additionalProperties": false, "properties": { "privileges": { "additionalProperties": false, "properties": { "root": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "asset_tags": { "items": { "additionalProperties": false, "properties": { "asset_ids": { "items": { "type": "string" }, "type": "array" }, "asset_types": { "items": { "type": "string" }, "type": "array" }, "text": { "type": "string" } }, "required": [ "text" ], "type": "object" }, "type": "array" }, "assets": { "additionalProperties": {}, "type": "object" }, "categories": { "items": { "type": "string" }, "type": "array" }, "conditions": { "additionalProperties": true, "properties": { "elastic": { "additionalProperties": true, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "subscription": { "type": "string" } }, "type": "object" }, "kibana": { "additionalProperties": true, "properties": { "version": { "type": "string" } }, "type": "object" } }, "type": "object" }, "data_streams": { "items": { "additionalProperties": {}, "type": "object" }, "type": "array" }, "description": { "type": "string" }, "discovery": { "additionalProperties": true, "properties": { "fields": { "items": { "additionalProperties": true, "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "type": "array" } }, "type": "object" }, "download": { "type": "string" }, "elasticsearch": { "additionalProperties": {}, "type": "object" }, "format_version": { "type": "string" }, "icons": { "items": { "additionalProperties": true, "properties": { "dark_mode": { "type": "boolean" }, "path": { "type": "string" }, "size": { "type": "string" }, "src": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "src" ], "type": "object" }, "type": "array" }, "installationInfo": { "additionalProperties": true, "properties": { "additional_spaces_installed_kibana": { "additionalProperties": { "items": { "additionalProperties": true, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" }, "type": "object" }, "created_at": { "type": "string" }, "experimental_data_stream_features": { "items": { "additionalProperties": true, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": true, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "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, "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" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" }, "installed_kibana": { "items": { "additionalProperties": true, "properties": { "id": { "type": "string" }, "originId": { "type": "string" }, "type": { "enum": [ "dashboard", "lens", "visualization", "search", "index-pattern", "map", "ml-module", "security-rule", "csp-rule-template", "osquery-pack-asset", "osquery-saved-query", "tag" ], "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" }, "installed_kibana_space_id": { "type": "string" }, "latest_executed_state": { "additionalProperties": true, "properties": { "error": { "type": "string" }, "name": { "type": "string" }, "started_at": { "type": "string" } }, "required": [ "name", "started_at" ], "type": "object" }, "latest_install_failed_attempts": { "items": { "additionalProperties": true, "properties": { "created_at": { "type": "string" }, "error": { "additionalProperties": true, "properties": { "message": { "type": "string" }, "name": { "type": "string" }, "stack": { "type": "string" } }, "required": [ "name", "message" ], "type": "object" }, "target_version": { "type": "string" } }, "required": [ "created_at", "target_version", "error" ], "type": "object" }, "type": "array" }, "name": { "type": "string" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "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" ], "type": "object" }, "internal": { "type": "boolean" }, "keepPoliciesUpToDate": { "type": "boolean" }, "latestVersion": { "type": "string" }, "license": { "type": "string" }, "licensePath": { "type": "string" }, "name": { "type": "string" }, "notice": { "type": "string" }, "owner": { "additionalProperties": true, "properties": { "github": { "type": "string" }, "type": { "enum": [ "elastic", "partner", "community" ], "type": "string" } }, "type": "object" }, "path": { "type": "string" }, "policy_templates": { "items": { "additionalProperties": {}, "type": "object" }, "type": "array" }, "readme": { "type": "string" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "screenshots": { "items": { "additionalProperties": false, "properties": { "dark_mode": { "type": "boolean" }, "path": { "type": "string" }, "size": { "type": "string" }, "src": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "src" ], "type": "object" }, "type": "array" }, "signature_path": { "type": "string" }, "source": { "additionalProperties": true, "properties": { "license": { "type": "string" } }, "required": [ "license" ], "type": "object" }, "status": { "type": "string" }, "title": { "type": "string" }, "type": { "enum": [ "integration", "input", "content" ], "type": "string" }, "vars": { "items": { "additionalProperties": {}, "type": "object" }, "type": "array" }, "version": { "type": "string" } }, "required": [ "name", "version", "title", "assets" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Update package settings", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize": { "post": { "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" } }, { "in": "path", "name": "pkgName", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "pkgVersion", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "prerelease", "required": false, "schema": { "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "transforms": { "items": { "additionalProperties": false, "properties": { "transformId": { "type": "string" } }, "required": [ "transformId" ], "type": "object" }, "type": "array" } }, "required": [ "transforms" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "items": { "additionalProperties": false, "properties": { "error": { "nullable": true }, "success": { "type": "boolean" }, "transformId": { "type": "string" } }, "required": [ "transformId", "success", "error" ], "type": "object" }, "type": "array" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Authorize transforms", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}": { "get": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "get-fleet-epm-packages-pkgname-pkgversion-filepath", "parameters": [ { "in": "path", "name": "pkgName", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "pkgVersion", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "filePath", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get a package file", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs": { "get": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "get-fleet-epm-templates-pkgname-pkgversion-inputs", "parameters": [ { "in": "path", "name": "pkgName", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "pkgVersion", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "format", "required": false, "schema": { "default": "json", "enum": [ "json", "yml", "yaml" ], "type": "string" } }, { "in": "query", "name": "prerelease", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "ignoreUnverified", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "additionalProperties": false, "properties": { "inputs": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "streams": { "items": { "additionalProperties": true, "properties": { "data_stream": { "additionalProperties": true, "properties": { "dataset": { "type": "string" }, "type": { "type": "string" } }, "required": [ "dataset" ], "type": "object" }, "id": { "type": "string" } }, "required": [ "id", "data_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "id", "type" ], "type": "object" }, "type": "array" } }, "required": [ "inputs" ], "type": "object" } ] } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get an inputs template", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/epm/verification_key_id": { "get": { "description": "[Required authorization] Route required privileges: ANY of [integrations-read OR fleet-setup OR fleet-all].", "operationId": "get-fleet-epm-verification-key-id", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "nullable": true, "type": "string" } }, "required": [ "id" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get a package signature verification key ID", "tags": [ "Elastic Package Manager (EPM)" ] } }, "/api/fleet/fleet_server_hosts": { "get": { "description": "[Required authorization] Route required privileges: ANY of [fleet-agents-all OR fleet-settings-read].", "operationId": "get-fleet-fleet-server-hosts", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "host_urls": { "items": { "type": "string" }, "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" } }, "required": [ "id", "name", "host_urls" ], "type": "object" }, "type": "array" }, "page": { "type": "number" }, "perPage": { "type": "number" }, "total": { "type": "number" } }, "required": [ "items", "total", "page", "perPage" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get Fleet Server hosts", "tags": [ "Fleet Server hosts" ] }, "post": { "description": "[Required authorization] Route required privileges: ALL of [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": { "schema": { "additionalProperties": false, "properties": { "host_urls": { "items": { "type": "string" }, "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" } }, "required": [ "name", "host_urls" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "host_urls": { "items": { "type": "string" }, "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" } }, "required": [ "id", "name", "host_urls" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create a Fleet Server host", "tags": [ "Fleet Server hosts" ] } }, "/api/fleet/fleet_server_hosts/{itemId}": { "delete": { "description": "Delete a Fleet Server host by ID.

[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "itemId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Delete a Fleet Server host", "tags": [ "Fleet Server hosts" ] }, "get": { "description": "Get a Fleet Server host by ID.

[Required authorization] Route required privileges: ALL of [fleet-settings-read].", "operationId": "get-fleet-fleet-server-hosts-itemid", "parameters": [ { "in": "path", "name": "itemId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "host_urls": { "items": { "type": "string" }, "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" } }, "required": [ "id", "name", "host_urls" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get a Fleet Server host", "tags": [ "Fleet Server hosts" ] }, "put": { "description": "Update a Fleet Server host by ID.

[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "itemId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "host_urls": { "items": { "type": "string" }, "minItems": 1, "type": "array" }, "is_default": { "type": "boolean" }, "is_internal": { "type": "boolean" }, "name": { "type": "string" }, "proxy_id": { "nullable": true, "type": "string" } }, "required": [ "proxy_id" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "host_urls": { "items": { "type": "string" }, "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" } }, "required": [ "id", "name", "host_urls" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Update a Fleet Server host", "tags": [ "Fleet Server hosts" ] } }, "/api/fleet/health_check": { "post": { "description": "[Required authorization] Route required privileges: ALL of [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": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "host_id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" } }, "required": [ "status" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Check Fleet Server health", "tags": [ "Fleet internals" ] } }, "/api/fleet/kubernetes": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agent-policies-read, fleet-setup].", "operationId": "get-fleet-kubernetes", "parameters": [ { "in": "query", "name": "download", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "fleetServer", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "enrolToken", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "type": "string" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get a full K8s agent manifest", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/kubernetes/download": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agent-policies-read, fleet-setup].", "operationId": "get-fleet-kubernetes-download", "parameters": [ { "in": "query", "name": "download", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "fleetServer", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "enrolToken", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Download an agent manifest", "tags": [ "Elastic Agent policies" ] } }, "/api/fleet/logstash_api_keys": { "post": { "description": "[Required authorization] Route required privileges: ALL of [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": { "schema": { "additionalProperties": false, "properties": { "api_key": { "type": "string" } }, "required": [ "api_key" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Generate a Logstash API key", "tags": [ "Fleet outputs" ] } }, "/api/fleet/message_signing_service/rotate_key_pair": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-all, fleet-agent-policies-all, 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" } }, { "in": "query", "name": "acknowledge", "required": false, "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "500": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Rotate a Fleet message signing key pair", "tags": [ "Message Signing Service" ] } }, "/api/fleet/outputs": { "get": { "description": "[Required authorization] Route required privileges: ANY of [fleet-settings-read OR fleet-agent-policies-read].", "operationId": "get-fleet-outputs", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "anyOf": [ { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "name": { "type": "string" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": true, "properties": { "kibana_api_key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "service_token": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" }, "service_token": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "sync_integrations": { "type": "boolean" }, "type": { "enum": [ "remote_elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "config_yaml": { "nullable": true, "type": "string" }, "hosts": { "items": { "type": "string" }, "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" }, "name": { "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": true, "properties": { "ssl": { "additionalProperties": true, "properties": { "key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "logstash" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "auth_type": { "enum": [ "none", "user_pass", "ssl", "kerberos" ], "type": "string" }, "broker_timeout": { "type": "number" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "client_id": { "type": "string" }, "compression": { "enum": [ "gzip", "snappy", "lz4", "none" ], "type": "string" }, "compression_level": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "number" }, { "not": {} } ] }, "config_yaml": { "nullable": true, "type": "string" }, "connection_type": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "enum": [ "plaintext", "encryption" ], "type": "string" }, { "not": {} } ] }, "hash": { "additionalProperties": true, "properties": { "hash": { "type": "string" }, "random": { "type": "boolean" } }, "type": "object" }, "headers": { "items": { "additionalProperties": true, "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ], "type": "object" }, "type": "array" }, "hosts": { "items": { "type": "string" }, "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" }, "key": { "type": "string" }, "name": { "type": "string" }, "partition": { "enum": [ "random", "round_robin", "hash" ], "type": "string" }, "password": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "not": {} }, { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] } ] }, "proxy_id": { "nullable": true, "type": "string" }, "random": { "additionalProperties": true, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "required_acks": { "enum": [ 1, 0, -1 ], "type": "integer" }, "round_robin": { "additionalProperties": true, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "sasl": { "additionalProperties": true, "nullable": true, "properties": { "mechanism": { "enum": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" ], "type": "string" } }, "type": "object" }, "secrets": { "additionalProperties": true, "properties": { "password": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "ssl": { "additionalProperties": true, "properties": { "key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "required": [ "key" ], "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "timeout": { "type": "number" }, "topic": { "type": "string" }, "type": { "enum": [ "kafka" ], "type": "string" }, "username": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] }, "version": { "type": "string" } }, "required": [ "name", "type", "hosts", "compression_level", "auth_type", "connection_type", "username", "password" ], "type": "object" } ] }, "type": "array" }, "page": { "type": "number" }, "perPage": { "type": "number" }, "total": { "type": "number" } }, "required": [ "items", "total", "page", "perPage" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get outputs", "tags": [ "Fleet outputs" ] }, "post": { "description": "[Required authorization] Route required privileges: ALL of [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": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "name": { "type": "string" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": false, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": false, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": false, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": false, "properties": { "kibana_api_key": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "service_token": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" }, "service_token": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": false, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": false, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "sync_integrations": { "type": "boolean" }, "type": { "enum": [ "remote_elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": false, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "config_yaml": { "nullable": true, "type": "string" }, "hosts": { "items": { "type": "string" }, "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" }, "name": { "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": false, "properties": { "ssl": { "additionalProperties": false, "properties": { "key": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": false, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": false, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "logstash" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": false, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "auth_type": { "enum": [ "none", "user_pass", "ssl", "kerberos" ], "type": "string" }, "broker_timeout": { "type": "number" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "client_id": { "type": "string" }, "compression": { "enum": [ "gzip", "snappy", "lz4", "none" ], "type": "string" }, "compression_level": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "number" }, { "not": {} } ] }, "config_yaml": { "nullable": true, "type": "string" }, "connection_type": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "enum": [ "plaintext", "encryption" ], "type": "string" }, { "not": {} } ] }, "hash": { "additionalProperties": false, "properties": { "hash": { "type": "string" }, "random": { "type": "boolean" } }, "type": "object" }, "headers": { "items": { "additionalProperties": false, "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ], "type": "object" }, "type": "array" }, "hosts": { "items": { "type": "string" }, "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" }, "key": { "type": "string" }, "name": { "type": "string" }, "partition": { "enum": [ "random", "round_robin", "hash" ], "type": "string" }, "password": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "not": {} }, { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] } ] }, "proxy_id": { "nullable": true, "type": "string" }, "random": { "additionalProperties": false, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "required_acks": { "enum": [ 1, 0, -1 ], "type": "integer" }, "round_robin": { "additionalProperties": false, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "sasl": { "additionalProperties": false, "nullable": true, "properties": { "mechanism": { "enum": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" ], "type": "string" } }, "type": "object" }, "secrets": { "additionalProperties": false, "properties": { "password": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "ssl": { "additionalProperties": false, "properties": { "key": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "required": [ "key" ], "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": false, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": false, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "timeout": { "type": "number" }, "topic": { "type": "string" }, "type": { "enum": [ "kafka" ], "type": "string" }, "username": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] }, "version": { "type": "string" } }, "required": [ "name", "type", "hosts", "compression_level", "auth_type", "connection_type", "username", "password" ], "type": "object" } ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "anyOf": [ { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "name": { "type": "string" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": true, "properties": { "kibana_api_key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "service_token": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" }, "service_token": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "sync_integrations": { "type": "boolean" }, "type": { "enum": [ "remote_elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "config_yaml": { "nullable": true, "type": "string" }, "hosts": { "items": { "type": "string" }, "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" }, "name": { "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": true, "properties": { "ssl": { "additionalProperties": true, "properties": { "key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "logstash" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "auth_type": { "enum": [ "none", "user_pass", "ssl", "kerberos" ], "type": "string" }, "broker_timeout": { "type": "number" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "client_id": { "type": "string" }, "compression": { "enum": [ "gzip", "snappy", "lz4", "none" ], "type": "string" }, "compression_level": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "number" }, { "not": {} } ] }, "config_yaml": { "nullable": true, "type": "string" }, "connection_type": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "enum": [ "plaintext", "encryption" ], "type": "string" }, { "not": {} } ] }, "hash": { "additionalProperties": true, "properties": { "hash": { "type": "string" }, "random": { "type": "boolean" } }, "type": "object" }, "headers": { "items": { "additionalProperties": true, "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ], "type": "object" }, "type": "array" }, "hosts": { "items": { "type": "string" }, "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" }, "key": { "type": "string" }, "name": { "type": "string" }, "partition": { "enum": [ "random", "round_robin", "hash" ], "type": "string" }, "password": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "not": {} }, { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] } ] }, "proxy_id": { "nullable": true, "type": "string" }, "random": { "additionalProperties": true, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "required_acks": { "enum": [ 1, 0, -1 ], "type": "integer" }, "round_robin": { "additionalProperties": true, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "sasl": { "additionalProperties": true, "nullable": true, "properties": { "mechanism": { "enum": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" ], "type": "string" } }, "type": "object" }, "secrets": { "additionalProperties": true, "properties": { "password": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "ssl": { "additionalProperties": true, "properties": { "key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "required": [ "key" ], "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "timeout": { "type": "number" }, "topic": { "type": "string" }, "type": { "enum": [ "kafka" ], "type": "string" }, "username": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] }, "version": { "type": "string" } }, "required": [ "name", "type", "hosts", "compression_level", "auth_type", "connection_type", "username", "password" ], "type": "object" } ] } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create output", "tags": [ "Fleet outputs" ] } }, "/api/fleet/outputs/{outputId}": { "delete": { "description": "Delete output by ID.

[Required authorization] Route required privileges: ALL of [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" } }, { "in": "path", "name": "outputId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Delete output", "tags": [ "Fleet outputs" ] }, "get": { "description": "Get output by ID.

[Required authorization] Route required privileges: ANY of [fleet-settings-read OR fleet-agent-policies-read].", "operationId": "get-fleet-outputs-outputid", "parameters": [ { "in": "path", "name": "outputId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "anyOf": [ { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "name": { "type": "string" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": true, "properties": { "kibana_api_key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "service_token": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" }, "service_token": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "sync_integrations": { "type": "boolean" }, "type": { "enum": [ "remote_elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "config_yaml": { "nullable": true, "type": "string" }, "hosts": { "items": { "type": "string" }, "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" }, "name": { "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": true, "properties": { "ssl": { "additionalProperties": true, "properties": { "key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "logstash" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "auth_type": { "enum": [ "none", "user_pass", "ssl", "kerberos" ], "type": "string" }, "broker_timeout": { "type": "number" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "client_id": { "type": "string" }, "compression": { "enum": [ "gzip", "snappy", "lz4", "none" ], "type": "string" }, "compression_level": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "number" }, { "not": {} } ] }, "config_yaml": { "nullable": true, "type": "string" }, "connection_type": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "enum": [ "plaintext", "encryption" ], "type": "string" }, { "not": {} } ] }, "hash": { "additionalProperties": true, "properties": { "hash": { "type": "string" }, "random": { "type": "boolean" } }, "type": "object" }, "headers": { "items": { "additionalProperties": true, "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ], "type": "object" }, "type": "array" }, "hosts": { "items": { "type": "string" }, "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" }, "key": { "type": "string" }, "name": { "type": "string" }, "partition": { "enum": [ "random", "round_robin", "hash" ], "type": "string" }, "password": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "not": {} }, { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] } ] }, "proxy_id": { "nullable": true, "type": "string" }, "random": { "additionalProperties": true, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "required_acks": { "enum": [ 1, 0, -1 ], "type": "integer" }, "round_robin": { "additionalProperties": true, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "sasl": { "additionalProperties": true, "nullable": true, "properties": { "mechanism": { "enum": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" ], "type": "string" } }, "type": "object" }, "secrets": { "additionalProperties": true, "properties": { "password": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "ssl": { "additionalProperties": true, "properties": { "key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "required": [ "key" ], "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "timeout": { "type": "number" }, "topic": { "type": "string" }, "type": { "enum": [ "kafka" ], "type": "string" }, "username": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] }, "version": { "type": "string" } }, "required": [ "name", "type", "hosts", "compression_level", "auth_type", "connection_type", "username", "password" ], "type": "object" } ] } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get output", "tags": [ "Fleet outputs" ] }, "put": { "description": "Update output by ID.

[Required authorization] Route required privileges: ANY of [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" } }, { "in": "path", "name": "outputId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "minItems": 1, "type": "array" }, "id": { "type": "string" }, "is_default": { "type": "boolean" }, "is_default_monitoring": { "type": "boolean" }, "is_internal": { "type": "boolean" }, "is_preconfigured": { "type": "boolean" }, "name": { "type": "string" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": false, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": false, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "elasticsearch" ], "type": "string" } }, "type": "object" }, { "additionalProperties": false, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "minItems": 1, "type": "array" }, "id": { "type": "string" }, "is_default": { "type": "boolean" }, "is_default_monitoring": { "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" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": false, "properties": { "kibana_api_key": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "service_token": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" }, "service_token": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": false, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": false, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "sync_integrations": { "type": "boolean" }, "type": { "enum": [ "remote_elasticsearch" ], "type": "string" } }, "type": "object" }, { "additionalProperties": false, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "config_yaml": { "nullable": true, "type": "string" }, "hosts": { "items": { "type": "string" }, "minItems": 1, "type": "array" }, "id": { "type": "string" }, "is_default": { "type": "boolean" }, "is_default_monitoring": { "type": "boolean" }, "is_internal": { "type": "boolean" }, "is_preconfigured": { "type": "boolean" }, "name": { "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": false, "properties": { "ssl": { "additionalProperties": false, "properties": { "key": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": false, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": false, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "logstash" ], "type": "string" } }, "type": "object" }, { "additionalProperties": false, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "auth_type": { "enum": [ "none", "user_pass", "ssl", "kerberos" ], "type": "string" }, "broker_timeout": { "type": "number" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "client_id": { "type": "string" }, "compression": { "enum": [ "gzip", "snappy", "lz4", "none" ], "type": "string" }, "compression_level": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "number" }, { "not": {} } ] }, "config_yaml": { "nullable": true, "type": "string" }, "connection_type": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "enum": [ "plaintext", "encryption" ], "type": "string" }, { "not": {} } ] }, "hash": { "additionalProperties": false, "properties": { "hash": { "type": "string" }, "random": { "type": "boolean" } }, "type": "object" }, "headers": { "items": { "additionalProperties": false, "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ], "type": "object" }, "type": "array" }, "hosts": { "items": { "type": "string" }, "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" }, "key": { "type": "string" }, "name": { "type": "string" }, "partition": { "enum": [ "random", "round_robin", "hash" ], "type": "string" }, "password": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "not": {} }, { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] } ] }, "proxy_id": { "nullable": true, "type": "string" }, "random": { "additionalProperties": false, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "required_acks": { "enum": [ 1, 0, -1 ], "type": "integer" }, "round_robin": { "additionalProperties": false, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "sasl": { "additionalProperties": false, "nullable": true, "properties": { "mechanism": { "enum": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" ], "type": "string" } }, "type": "object" }, "secrets": { "additionalProperties": false, "properties": { "password": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "ssl": { "additionalProperties": false, "properties": { "key": { "anyOf": [ { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "required": [ "key" ], "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": false, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": false, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "timeout": { "type": "number" }, "topic": { "type": "string" }, "type": { "enum": [ "kafka" ], "type": "string" }, "username": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] }, "version": { "type": "string" } }, "required": [ "name", "compression_level", "connection_type", "username", "password" ], "type": "object" } ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "anyOf": [ { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "name": { "type": "string" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "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" }, "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" }, "preset": { "enum": [ "balanced", "custom", "throughput", "scale", "latency" ], "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": true, "properties": { "kibana_api_key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "service_token": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" }, "service_token": { "nullable": true, "type": "string" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "sync_integrations": { "type": "boolean" }, "type": { "enum": [ "remote_elasticsearch" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "config_yaml": { "nullable": true, "type": "string" }, "hosts": { "items": { "type": "string" }, "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" }, "name": { "type": "string" }, "proxy_id": { "nullable": true, "type": "string" }, "secrets": { "additionalProperties": true, "properties": { "ssl": { "additionalProperties": true, "properties": { "key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "type": { "enum": [ "logstash" ], "type": "string" } }, "required": [ "name", "type", "hosts" ], "type": "object" }, { "additionalProperties": true, "properties": { "allow_edit": { "items": { "type": "string" }, "type": "array" }, "auth_type": { "enum": [ "none", "user_pass", "ssl", "kerberos" ], "type": "string" }, "broker_timeout": { "type": "number" }, "ca_sha256": { "nullable": true, "type": "string" }, "ca_trusted_fingerprint": { "nullable": true, "type": "string" }, "client_id": { "type": "string" }, "compression": { "enum": [ "gzip", "snappy", "lz4", "none" ], "type": "string" }, "compression_level": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "number" }, { "not": {} } ] }, "config_yaml": { "nullable": true, "type": "string" }, "connection_type": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "enum": [ "plaintext", "encryption" ], "type": "string" }, { "not": {} } ] }, "hash": { "additionalProperties": true, "properties": { "hash": { "type": "string" }, "random": { "type": "boolean" } }, "type": "object" }, "headers": { "items": { "additionalProperties": true, "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "key", "value" ], "type": "object" }, "type": "array" }, "hosts": { "items": { "type": "string" }, "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" }, "key": { "type": "string" }, "name": { "type": "string" }, "partition": { "enum": [ "random", "round_robin", "hash" ], "type": "string" }, "password": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "not": {} }, { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] } ] }, "proxy_id": { "nullable": true, "type": "string" }, "random": { "additionalProperties": true, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "required_acks": { "enum": [ 1, 0, -1 ], "type": "integer" }, "round_robin": { "additionalProperties": true, "properties": { "group_events": { "type": "number" } }, "type": "object" }, "sasl": { "additionalProperties": true, "nullable": true, "properties": { "mechanism": { "enum": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" ], "type": "string" } }, "type": "object" }, "secrets": { "additionalProperties": true, "properties": { "password": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] }, "ssl": { "additionalProperties": true, "properties": { "key": { "anyOf": [ { "additionalProperties": true, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, { "type": "string" } ] } }, "required": [ "key" ], "type": "object" } }, "type": "object" }, "shipper": { "additionalProperties": true, "nullable": 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" ], "type": "object" }, "ssl": { "additionalProperties": true, "nullable": true, "properties": { "certificate": { "type": "string" }, "certificate_authorities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "verification_mode": { "enum": [ "full", "none", "certificate", "strict" ], "type": "string" } }, "type": "object" }, "timeout": { "type": "number" }, "topic": { "type": "string" }, "type": { "enum": [ "kafka" ], "type": "string" }, "username": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "type": "string" }, { "not": {} } ] }, "version": { "type": "string" } }, "required": [ "name", "type", "hosts", "compression_level", "auth_type", "connection_type", "username", "password" ], "type": "object" } ] } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Update output", "tags": [ "Fleet outputs" ] } }, "/api/fleet/outputs/{outputId}/health": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-settings-read].", "operationId": "get-fleet-outputs-outputid-health", "parameters": [ { "in": "path", "name": "outputId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "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" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get the latest output health", "tags": [ "Fleet outputs" ] } }, "/api/fleet/package_policies": { "get": { "operationId": "get-fleet-package-policies", "parameters": [ { "in": "query", "name": "page", "required": false, "schema": { "type": "number" } }, { "in": "query", "name": "perPage", "required": false, "schema": { "type": "number" } }, { "in": "query", "name": "sortField", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "sortOrder", "required": false, "schema": { "enum": [ "desc", "asc" ], "type": "string" } }, { "in": "query", "name": "showUpgradeable", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "kuery", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } }, { "in": "query", "name": "withAgentCount", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" }, "type": "array" }, "page": { "type": "number" }, "perPage": { "type": "number" }, "total": { "type": "number" } }, "required": [ "items", "total", "page", "perPage" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get package policies", "tags": [ "Fleet package policies" ] }, "post": { "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" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "description": { "description": "Package policy description", "type": "string" }, "enabled": { "type": "boolean" }, "force": { "description": "Force package policy creation even if package is not verified, or if the agent policy is managed.", "type": "boolean" }, "id": { "description": "Package policy unique identifier", "type": "string" }, "inputs": { "items": { "additionalProperties": false, "properties": { "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled" ], "type": "object" }, "type": "array" }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "name", "inputs" ], "type": "object" }, { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "description": { "type": "string" }, "force": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "output_id": { "nullable": true, "type": "string" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "nullable": true, "type": "string" }, "policy_ids": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "required": [ "name", "package" ], "type": "object" } ], "description": "You should use inputs as an object and not use the deprecated inputs array." } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "409": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create a package policy", "tags": [ "Fleet package policies" ] } }, "/api/fleet/package_policies/_bulk_get": { "post": { "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" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "ids": { "description": "list of package policy ids", "items": { "type": "string" }, "type": "array" }, "ignoreMissing": { "type": "boolean" } }, "required": [ "ids" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "summary": "Bulk get package policies", "tags": [ "Fleet package policies" ] } }, "/api/fleet/package_policies/delete": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agent-policies-all, integrations-all].", "operationId": "post-fleet-package-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": { "schema": { "additionalProperties": false, "properties": { "force": { "type": "boolean" }, "packagePolicyIds": { "items": { "type": "string" }, "type": "array" } }, "required": [ "packagePolicyIds" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "items": { "additionalProperties": false, "properties": { "body": { "additionalProperties": false, "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" }, "id": { "type": "string" }, "name": { "type": "string" }, "output_id": { "nullable": true, "type": "string" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Use `policy_ids` instead", "nullable": true, "type": "string" }, "policy_ids": { "items": { "type": "string" }, "type": "array" }, "statusCode": { "type": "number" }, "success": { "type": "boolean" } }, "required": [ "id", "success", "policy_ids", "package" ], "type": "object" }, "type": "array" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Bulk delete package policies", "tags": [ "Fleet package policies" ] } }, "/api/fleet/package_policies/upgrade": { "post": { "description": "Upgrade a package policy to a newer package version.

[Required authorization] Route required privileges: ALL of [fleet-agent-policies-all, integrations-all].", "operationId": "post-fleet-package-policies-upgrade", "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": { "schema": { "additionalProperties": false, "properties": { "packagePolicyIds": { "items": { "type": "string" }, "type": "array" } }, "required": [ "packagePolicyIds" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "items": { "additionalProperties": false, "properties": { "body": { "additionalProperties": false, "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" }, "id": { "type": "string" }, "name": { "type": "string" }, "statusCode": { "type": "number" }, "success": { "type": "boolean" } }, "required": [ "id", "success" ], "type": "object" }, "type": "array" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Upgrade a package policy", "tags": [ "Fleet package policies" ] } }, "/api/fleet/package_policies/upgrade/dryrun": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agent-policies-read, integrations-read].", "operationId": "post-fleet-package-policies-upgrade-dryrun", "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": { "schema": { "additionalProperties": false, "properties": { "packagePolicyIds": { "items": { "type": "string" }, "type": "array" }, "packageVersion": { "type": "string" } }, "required": [ "packagePolicyIds" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "items": { "additionalProperties": false, "properties": { "agent_diff": { "items": { "items": { "additionalProperties": true, "properties": { "data_stream": { "additionalProperties": true, "properties": { "namespace": { "type": "string" } }, "required": [ "namespace" ], "type": "object" }, "id": { "type": "string" }, "meta": { "additionalProperties": true, "properties": { "package": { "additionalProperties": true, "properties": { "name": { "type": "string" }, "version": { "type": "string" } }, "required": [ "name", "version" ], "type": "object" } }, "required": [ "package" ], "type": "object" }, "name": { "type": "string" }, "package_policy_id": { "type": "string" }, "processors": { "items": { "additionalProperties": true, "properties": { "add_fields": { "additionalProperties": true, "properties": { "fields": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, "type": "object" }, "target": { "type": "string" } }, "required": [ "target", "fields" ], "type": "object" } }, "required": [ "add_fields" ], "type": "object" }, "type": "array" }, "revision": { "type": "number" }, "streams": { "items": { "additionalProperties": true, "properties": { "data_stream": { "additionalProperties": true, "properties": { "dataset": { "type": "string" }, "type": { "type": "string" } }, "required": [ "dataset" ], "type": "object" }, "id": { "type": "string" } }, "required": [ "id", "data_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "use_output": { "type": "string" } }, "required": [ "id", "name", "revision", "type", "data_stream", "use_output", "package_policy_id" ], "type": "object" }, "type": "array" }, "type": "array" }, "body": { "additionalProperties": false, "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" }, "diff": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" }, { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "description": { "description": "Package policy description", "type": "string" }, "enabled": { "type": "boolean" }, "errors": { "items": { "additionalProperties": false, "properties": { "key": { "type": "string" }, "message": { "type": "string" } }, "required": [ "message" ], "type": "object" }, "type": "array" }, "force": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "items": { "additionalProperties": false, "properties": { "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams" ], "type": "object" }, "type": "array" }, "is_managed": { "type": "boolean" }, "missingVars": { "items": { "type": "string" }, "type": "array" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "name", "enabled", "inputs" ], "type": "object" } ] }, "type": "array" }, "hasErrors": { "type": "boolean" }, "name": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "hasErrors" ], "type": "object" }, "type": "array" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Dry run a package policy upgrade", "tags": [ "Fleet package policies" ] } }, "/api/fleet/package_policies/{packagePolicyId}": { "delete": { "description": "Delete a package policy by ID.

[Required authorization] Route required privileges: ALL of [fleet-agent-policies-all, 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" } }, { "in": "path", "name": "packagePolicyId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "force", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Delete a package policy", "tags": [ "Fleet package policies" ] }, "get": { "description": "Get a package policy by ID.", "operationId": "get-fleet-package-policies-packagepolicyid", "parameters": [ { "in": "path", "name": "packagePolicyId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "summary": "Get a package policy", "tags": [ "Fleet package policies" ] }, "put": { "description": "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" } }, { "in": "path", "name": "packagePolicyId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "format", "required": false, "schema": { "enum": [ "simplified", "legacy" ], "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "description": { "description": "Package policy description", "type": "string" }, "enabled": { "type": "boolean" }, "force": { "type": "boolean" }, "inputs": { "items": { "additionalProperties": false, "properties": { "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled" ], "type": "object" }, "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "version": { "type": "string" } }, "type": "object" }, { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "description": { "type": "string" }, "force": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "output_id": { "nullable": true, "type": "string" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "nullable": true, "type": "string" }, "policy_ids": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "required": [ "name", "package" ], "type": "object" } ] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "additional_datastreams_permissions": { "description": "Additional datastream permissions, that will be added to the agent policy.", "items": { "type": "string" }, "nullable": true, "type": "array" }, "agents": { "type": "number" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "description": "Package policy description", "type": "string" }, "elasticsearch": { "additionalProperties": true, "properties": { "privileges": { "additionalProperties": true, "properties": { "cluster": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "inputs": { "anyOf": [ { "items": { "additionalProperties": false, "properties": { "compiled_input": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "policy_template": { "type": "string" }, "streams": { "items": { "additionalProperties": false, "properties": { "compiled_stream": {}, "config": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, "data_stream": { "additionalProperties": false, "properties": { "dataset": { "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "dynamic_dataset": { "type": "boolean" }, "dynamic_namespace": { "type": "boolean" }, "privileges": { "additionalProperties": false, "properties": { "indices": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "required": [ "dataset", "type" ], "type": "object" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "keep_enabled": { "type": "boolean" }, "release": { "enum": [ "ga", "beta", "experimental" ], "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "enabled", "data_stream", "compiled_stream" ], "type": "object" }, "type": "array" }, "type": { "type": "string" }, "vars": { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" } }, "required": [ "type", "enabled", "streams", "compiled_input" ], "type": "object" }, "type": "array" }, { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that input, (default to true)", "type": "boolean" }, "streams": { "additionalProperties": { "additionalProperties": false, "properties": { "enabled": { "description": "enable or disable that stream, (default to true)", "type": "boolean" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Input streams (see integration documentation to know what streams are available)", "type": "object" }, "vars": { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object" } }, "type": "object" }, "description": "Package policy inputs (see integration documentation to know what inputs are available)", "type": "object", "x-oas-optional": true } ] }, "is_managed": { "type": "boolean" }, "name": { "description": "Package policy name (should be unique)", "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, "properties": { "inputs": { "additionalProperties": {}, "type": "object" } }, "type": "object" }, "package": { "additionalProperties": false, "properties": { "experimental_data_stream_features": { "items": { "additionalProperties": false, "properties": { "data_stream": { "type": "string" }, "features": { "additionalProperties": false, "properties": { "doc_value_only_numeric": { "type": "boolean" }, "doc_value_only_other": { "type": "boolean" }, "synthetic_source": { "type": "boolean" }, "tsdb": { "type": "boolean" } }, "type": "object" } }, "required": [ "data_stream", "features" ], "type": "object" }, "type": "array" }, "name": { "description": "Package name", "type": "string" }, "requires_root": { "type": "boolean" }, "title": { "type": "string" }, "version": { "description": "Package version", "type": "string" } }, "required": [ "name", "version" ], "type": "object" }, "policy_id": { "deprecated": true, "description": "Agent policy ID where that package policy will be added", "nullable": true, "type": "string" }, "policy_ids": { "items": { "description": "Agent policy IDs where that package policy will be added", "type": "string" }, "type": "array" }, "revision": { "type": "number" }, "secret_references": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "spaceIds": { "items": { "type": "string" }, "type": "array" }, "supports_agentless": { "default": false, "description": "Indicates whether the package policy belongs to an agentless agent policy.", "nullable": true, "type": "boolean" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" }, "vars": { "anyOf": [ { "additionalProperties": { "additionalProperties": false, "properties": { "frozen": { "type": "boolean" }, "type": { "type": "string" }, "value": {} }, "required": [ "value" ], "type": "object" }, "description": "Package variable (see integration documentation for more information)", "type": "object" }, { "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "items": { "type": "number" }, "type": "array" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "isSecretRef": { "type": "boolean" } }, "required": [ "id", "isSecretRef" ], "type": "object" } ], "nullable": true }, "description": "Input/stream level variable (see integration documentation for more information)", "type": "object", "x-oas-optional": true } ] }, "version": { "type": "string" } }, "required": [ "name", "enabled", "inputs", "id", "revision", "updated_at", "updated_by", "created_at", "created_by" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "403": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Update a package policy", "tags": [ "Fleet package policies" ] } }, "/api/fleet/proxies": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-settings-read].", "operationId": "get-fleet-proxies", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "certificate": { "nullable": true, "type": "string" }, "certificate_authorities": { "nullable": true, "type": "string" }, "certificate_key": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "is_preconfigured": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_headers": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" } ] }, "nullable": true, "type": "object" }, "url": { "type": "string" } }, "required": [ "id", "url", "name" ], "type": "object" }, "type": "array" }, "page": { "type": "number" }, "perPage": { "type": "number" }, "total": { "type": "number" } }, "required": [ "items", "total", "page", "perPage" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get proxies", "tags": [ "Fleet proxies" ] }, "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-settings-all].", "operationId": "post-fleet-proxies", "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": { "schema": { "additionalProperties": false, "properties": { "certificate": { "nullable": true, "type": "string" }, "certificate_authorities": { "nullable": true, "type": "string" }, "certificate_key": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "is_preconfigured": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_headers": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" } ] }, "nullable": true, "type": "object" }, "url": { "type": "string" } }, "required": [ "url", "name" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "certificate": { "nullable": true, "type": "string" }, "certificate_authorities": { "nullable": true, "type": "string" }, "certificate_key": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "is_preconfigured": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_headers": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" } ] }, "nullable": true, "type": "object" }, "url": { "type": "string" } }, "required": [ "id", "url", "name" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create a proxy", "tags": [ "Fleet proxies" ] } }, "/api/fleet/proxies/{itemId}": { "delete": { "description": "Delete a proxy by ID

[Required authorization] Route required privileges: ALL of [fleet-settings-all].", "operationId": "delete-fleet-proxies-itemid", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "itemId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Delete a proxy", "tags": [ "Fleet proxies" ] }, "get": { "description": "Get a proxy by ID.

[Required authorization] Route required privileges: ALL of [fleet-settings-read].", "operationId": "get-fleet-proxies-itemid", "parameters": [ { "in": "path", "name": "itemId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "certificate": { "nullable": true, "type": "string" }, "certificate_authorities": { "nullable": true, "type": "string" }, "certificate_key": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "is_preconfigured": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_headers": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" } ] }, "nullable": true, "type": "object" }, "url": { "type": "string" } }, "required": [ "id", "url", "name" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get a proxy", "tags": [ "Fleet proxies" ] }, "put": { "description": "Update a proxy by ID.

[Required authorization] Route required privileges: ALL of [fleet-settings-all].", "operationId": "put-fleet-proxies-itemid", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "itemId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "certificate": { "nullable": true, "type": "string" }, "certificate_authorities": { "nullable": true, "type": "string" }, "certificate_key": { "nullable": true, "type": "string" }, "name": { "type": "string" }, "proxy_headers": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" } ] }, "nullable": true, "type": "object" }, "url": { "type": "string" } }, "required": [ "proxy_headers", "certificate_authorities", "certificate", "certificate_key" ], "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "certificate": { "nullable": true, "type": "string" }, "certificate_authorities": { "nullable": true, "type": "string" }, "certificate_key": { "nullable": true, "type": "string" }, "id": { "type": "string" }, "is_preconfigured": { "default": false, "type": "boolean" }, "name": { "type": "string" }, "proxy_headers": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" } ] }, "nullable": true, "type": "object" }, "url": { "type": "string" } }, "required": [ "id", "url", "name" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Update a proxy", "tags": [ "Fleet proxies" ] } }, "/api/fleet/service_tokens": { "post": { "description": "[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "post-fleet-service-tokens", "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": { "schema": { "additionalProperties": false, "nullable": true, "properties": { "remote": { "default": false, "type": "boolean" } }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Create a service token", "tags": [ "Fleet service tokens" ] } }, "/api/fleet/settings": { "get": { "description": "[Required authorization] Route required privileges: ALL of [fleet-settings-read].", "operationId": "get-fleet-settings", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "delete_unenrolled_agents": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "is_preconfigured": { "type": "boolean" } }, "required": [ "enabled", "is_preconfigured" ], "type": "object" }, "has_seen_add_data_notice": { "type": "boolean" }, "id": { "type": "string" }, "output_secret_storage_requirements_met": { "type": "boolean" }, "preconfigured_fields": { "items": { "enum": [ "fleet_server_hosts" ], "type": "string" }, "type": "array" }, "prerelease_integrations_enabled": { "type": "boolean" }, "secret_storage_requirements_met": { "type": "boolean" }, "use_space_awareness_migration_started_at": { "nullable": true, "type": "string" }, "use_space_awareness_migration_status": { "enum": [ "pending", "success", "error" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "summary": "Get settings", "tags": [ "Fleet internals" ] }, "put": { "description": "[Required authorization] Route required privileges: ALL of [fleet-settings-all].", "operationId": "put-fleet-settings", "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": { "schema": { "additionalProperties": false, "properties": { "additional_yaml_config": { "type": "string" }, "delete_unenrolled_agents": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "is_preconfigured": { "type": "boolean" } }, "required": [ "enabled", "is_preconfigured" ], "type": "object" }, "has_seen_add_data_notice": { "type": "boolean" }, "kibana_ca_sha256": { "type": "string" }, "kibana_urls": { "items": { "format": "uri", "type": "string" }, "type": "array" }, "prerelease_integrations_enabled": { "type": "boolean" } }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "delete_unenrolled_agents": { "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "is_preconfigured": { "type": "boolean" } }, "required": [ "enabled", "is_preconfigured" ], "type": "object" }, "has_seen_add_data_notice": { "type": "boolean" }, "id": { "type": "string" }, "output_secret_storage_requirements_met": { "type": "boolean" }, "preconfigured_fields": { "items": { "enum": [ "fleet_server_hosts" ], "type": "string" }, "type": "array" }, "prerelease_integrations_enabled": { "type": "boolean" }, "secret_storage_requirements_met": { "type": "boolean" }, "use_space_awareness_migration_started_at": { "nullable": true, "type": "string" }, "use_space_awareness_migration_status": { "enum": [ "pending", "success", "error" ], "type": "string" }, "version": { "type": "string" } }, "required": [ "id" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "404": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "summary": "Update settings", "tags": [ "Fleet internals" ] } }, "/api/fleet/setup": { "post": { "description": "[Required authorization] Route required privileges: ANY of [fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup].", "operationId": "post-fleet-setup", "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": { "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.", "properties": { "isInitialized": { "type": "boolean" }, "nonFatalErrors": { "items": { "additionalProperties": false, "properties": { "message": { "type": "string" }, "name": { "type": "string" } }, "required": [ "name", "message" ], "type": "object" }, "type": "array" } }, "required": [ "isInitialized", "nonFatalErrors" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } }, "500": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Internal Server Error", "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "summary": "Initiate Fleet setup", "tags": [ "Fleet internals" ] } }, "/api/fleet/uninstall_tokens": { "get": { "description": "List the metadata for the latest uninstall tokens per agent policy.

[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "get-fleet-uninstall-tokens", "parameters": [ { "description": "Partial match filtering for policy IDs", "in": "query", "name": "policyId", "required": false, "schema": { "maxLength": 50, "type": "string" } }, { "in": "query", "name": "search", "required": false, "schema": { "maxLength": 50, "type": "string" } }, { "description": "The number of items to return", "in": "query", "name": "perPage", "required": false, "schema": { "minimum": 5, "type": "number" } }, { "in": "query", "name": "page", "required": false, "schema": { "minimum": 1, "type": "number" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "items": { "items": { "additionalProperties": false, "properties": { "created_at": { "type": "string" }, "id": { "type": "string" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "policy_id": { "type": "string" }, "policy_name": { "nullable": true, "type": "string" } }, "required": [ "id", "policy_id", "created_at" ], "type": "object" }, "type": "array" }, "page": { "type": "number" }, "perPage": { "type": "number" }, "total": { "type": "number" } }, "required": [ "items", "total", "page", "perPage" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get metadata for latest uninstall tokens", "tags": [ "Fleet uninstall tokens" ] } }, "/api/fleet/uninstall_tokens/{uninstallTokenId}": { "get": { "description": "Get one decrypted uninstall token by its ID.

[Required authorization] Route required privileges: ALL of [fleet-agents-all].", "operationId": "get-fleet-uninstall-tokens-uninstalltokenid", "parameters": [ { "in": "path", "name": "uninstallTokenId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "item": { "additionalProperties": false, "properties": { "created_at": { "type": "string" }, "id": { "type": "string" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "policy_id": { "type": "string" }, "policy_name": { "nullable": true, "type": "string" }, "token": { "type": "string" } }, "required": [ "id", "policy_id", "created_at", "token" ], "type": "object" } }, "required": [ "item" ], "type": "object" } } } }, "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Generic Error", "properties": { "attributes": {}, "error": { "type": "string" }, "message": { "type": "string" }, "statusCode": { "type": "number" } }, "required": [ "message", "attributes" ], "type": "object" } } } } }, "summary": "Get a decrypted uninstall token", "tags": [ "Fleet uninstall tokens" ] } }, "/api/security/role": { "get": { "operationId": "get-security-role", "parameters": [ { "description": "If `true` and the response contains any privileges that are associated with deprecated features, they are omitted in favor of details about the appropriate replacement feature privileges.", "in": "query", "name": "replaceDeprecatedPrivileges", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Indicates a successful call." } }, "summary": "Get all roles", "tags": [ "roles" ] } }, "/api/security/role/_query": { "post": { "operationId": "post-security-role-query", "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": { "schema": { "additionalProperties": false, "properties": { "filters": { "additionalProperties": false, "properties": { "showReservedRoles": { "type": "boolean" } }, "type": "object" }, "from": { "type": "number" }, "query": { "type": "string" }, "size": { "type": "number" }, "sort": { "additionalProperties": false, "properties": { "direction": { "enum": [ "asc", "desc" ], "type": "string" }, "field": { "type": "string" } }, "required": [ "field", "direction" ], "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Indicates a successful call." } }, "summary": "Query roles", "tags": [] } }, "/api/security/role/{name}": { "delete": { "operationId": "delete-security-role-name", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "in": "path", "name": "name", "required": true, "schema": { "minLength": 1, "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." } }, "summary": "Delete a role", "tags": [ "roles" ] }, "get": { "operationId": "get-security-role-name", "parameters": [ { "description": "The role name.", "in": "path", "name": "name", "required": true, "schema": { "minLength": 1, "type": "string" } }, { "description": "If `true` and the response contains any privileges that are associated with deprecated features, they are omitted in favor of details about the appropriate replacement feature privileges.", "in": "query", "name": "replaceDeprecatedPrivileges", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Indicates a successful call." } }, "summary": "Get a role", "tags": [ "roles" ] }, "put": { "description": "Create a new Kibana role or update the attributes of an existing role. Kibana roles are stored in the Elasticsearch native realm.", "operationId": "put-security-role-name", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The role name.", "in": "path", "name": "name", "required": true, "schema": { "maxLength": 1024, "minLength": 1, "type": "string" } }, { "description": "When true, a role is not overwritten if it already exists.", "in": "query", "name": "createOnly", "required": false, "schema": { "default": false, "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "description": { "description": "A description for the role.", "maxLength": 2048, "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "cluster": { "items": { "description": "Cluster privileges that define the cluster level actions that users can perform.", "type": "string" }, "type": "array" }, "indices": { "items": { "additionalProperties": false, "properties": { "allow_restricted_indices": { "description": "Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field covers the restricted indices too.", "type": "boolean" }, "field_security": { "additionalProperties": { "items": { "description": "The document fields that the role members have read access to.", "type": "string" }, "type": "array" }, "type": "object" }, "names": { "items": { "description": "The data streams, indices, and aliases to which the permissions in this entry apply. It supports wildcards (*).", "type": "string" }, "minItems": 1, "type": "array" }, "privileges": { "items": { "description": "The index level privileges that the role members have for the data streams and indices.", "type": "string" }, "minItems": 1, "type": "array" }, "query": { "description": "A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members.", "type": "string" } }, "required": [ "names", "privileges" ], "type": "object" }, "type": "array" }, "remote_cluster": { "items": { "additionalProperties": false, "properties": { "clusters": { "items": { "description": "A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.", "type": "string" }, "minItems": 1, "type": "array" }, "privileges": { "items": { "description": "The cluster level privileges for the remote cluster. The allowed values are a subset of the cluster privileges.", "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "privileges", "clusters" ], "type": "object" }, "type": "array" }, "remote_indices": { "items": { "additionalProperties": false, "properties": { "allow_restricted_indices": { "description": "Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field will cover the restricted indices too.", "type": "boolean" }, "clusters": { "items": { "description": "A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.", "type": "string" }, "minItems": 1, "type": "array" }, "field_security": { "additionalProperties": { "items": { "description": "The document fields that the role members have read access to.", "type": "string" }, "type": "array" }, "type": "object" }, "names": { "items": { "description": "A list of remote aliases, data streams, or indices to which the permissions apply. It supports wildcards (*).", "type": "string" }, "minItems": 1, "type": "array" }, "privileges": { "items": { "description": "The index level privileges that role members have for the specified indices.", "type": "string" }, "minItems": 1, "type": "array" }, "query": { "description": "A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members. ", "type": "string" } }, "required": [ "clusters", "names", "privileges" ], "type": "object" }, "type": "array" }, "run_as": { "items": { "description": "A user name that the role member can impersonate.", "type": "string" }, "type": "array" } }, "type": "object" }, "kibana": { "items": { "additionalProperties": false, "properties": { "base": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "items": { "description": "A base privilege that grants applies to all spaces.", "type": "string" }, "type": "array" }, { "items": { "description": "A base privilege that applies to specific spaces.", "type": "string" }, "type": "array" } ] }, "feature": { "additionalProperties": { "items": { "description": "The privileges that the role member has for the feature.", "type": "string" }, "type": "array" }, "type": "object" }, "spaces": { "anyOf": [ { "items": { "enum": [ "*" ], "type": "string" }, "maxItems": 1, "minItems": 1, "type": "array" }, { "items": { "description": "A space that the privilege applies to.", "type": "string" }, "type": "array" } ], "default": [ "*" ] } }, "required": [ "base" ], "type": "object" }, "type": "array" }, "metadata": { "additionalProperties": {}, "type": "object" } }, "required": [ "elasticsearch" ], "type": "object" } } } }, "responses": { "204": { "description": "Indicates a successful call." } }, "summary": "Create or update a role", "tags": [ "roles" ] } }, "/api/security/roles": { "post": { "operationId": "post-security-roles", "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": { "schema": { "additionalProperties": false, "properties": { "roles": { "additionalProperties": { "additionalProperties": false, "properties": { "description": { "description": "A description for the role.", "maxLength": 2048, "type": "string" }, "elasticsearch": { "additionalProperties": false, "properties": { "cluster": { "items": { "description": "Cluster privileges that define the cluster level actions that users can perform.", "type": "string" }, "type": "array" }, "indices": { "items": { "additionalProperties": false, "properties": { "allow_restricted_indices": { "description": "Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field covers the restricted indices too.", "type": "boolean" }, "field_security": { "additionalProperties": { "items": { "description": "The document fields that the role members have read access to.", "type": "string" }, "type": "array" }, "type": "object" }, "names": { "items": { "description": "The data streams, indices, and aliases to which the permissions in this entry apply. It supports wildcards (*).", "type": "string" }, "minItems": 1, "type": "array" }, "privileges": { "items": { "description": "The index level privileges that the role members have for the data streams and indices.", "type": "string" }, "minItems": 1, "type": "array" }, "query": { "description": "A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members.", "type": "string" } }, "required": [ "names", "privileges" ], "type": "object" }, "type": "array" }, "remote_cluster": { "items": { "additionalProperties": false, "properties": { "clusters": { "items": { "description": "A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.", "type": "string" }, "minItems": 1, "type": "array" }, "privileges": { "items": { "description": "The cluster level privileges for the remote cluster. The allowed values are a subset of the cluster privileges.", "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "privileges", "clusters" ], "type": "object" }, "type": "array" }, "remote_indices": { "items": { "additionalProperties": false, "properties": { "allow_restricted_indices": { "description": "Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field will cover the restricted indices too.", "type": "boolean" }, "clusters": { "items": { "description": "A list of remote cluster aliases. It supports literal strings as well as wildcards and regular expressions.", "type": "string" }, "minItems": 1, "type": "array" }, "field_security": { "additionalProperties": { "items": { "description": "The document fields that the role members have read access to.", "type": "string" }, "type": "array" }, "type": "object" }, "names": { "items": { "description": "A list of remote aliases, data streams, or indices to which the permissions apply. It supports wildcards (*).", "type": "string" }, "minItems": 1, "type": "array" }, "privileges": { "items": { "description": "The index level privileges that role members have for the specified indices.", "type": "string" }, "minItems": 1, "type": "array" }, "query": { "description": "A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members. ", "type": "string" } }, "required": [ "clusters", "names", "privileges" ], "type": "object" }, "type": "array" }, "run_as": { "items": { "description": "A user name that the role member can impersonate.", "type": "string" }, "type": "array" } }, "type": "object" }, "kibana": { "items": { "additionalProperties": false, "properties": { "base": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "items": { "description": "A base privilege that grants applies to all spaces.", "type": "string" }, "type": "array" }, { "items": { "description": "A base privilege that applies to specific spaces.", "type": "string" }, "type": "array" } ] }, "feature": { "additionalProperties": { "items": { "description": "The privileges that the role member has for the feature.", "type": "string" }, "type": "array" }, "type": "object" }, "spaces": { "anyOf": [ { "items": { "enum": [ "*" ], "type": "string" }, "maxItems": 1, "minItems": 1, "type": "array" }, { "items": { "description": "A space that the privilege applies to.", "type": "string" }, "type": "array" } ], "default": [ "*" ] } }, "required": [ "base" ], "type": "object" }, "type": "array" }, "metadata": { "additionalProperties": {}, "type": "object" } }, "required": [ "elasticsearch" ], "type": "object" }, "type": "object" } }, "required": [ "roles" ], "type": "object" } } } }, "responses": { "200": { "description": "Indicates a successful call." } }, "summary": "Create or update roles", "tags": [ "roles" ] } }, "/api/spaces/_copy_saved_objects": { "post": { "description": "It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved Discover sessions, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.

[Required authorization] Route required privileges: ALL of [copySavedObjectsToSpaces].", "operationId": "post-spaces-copy-saved-objects", "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": { "schema": { "additionalProperties": false, "properties": { "compatibilityMode": { "default": false, "description": "Apply various adjustments to the saved objects that are being copied to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with copied saved objects. This option cannot be used with the `createNewCopies` option.", "type": "boolean" }, "createNewCopies": { "default": true, "description": "Create new copies of saved objects, regenerate each object identifier, and reset the origin. When used, potential conflict errors are avoided. This option cannot be used with the `overwrite` and `compatibilityMode` options.", "type": "boolean" }, "includeReferences": { "default": false, "description": "When set to true, all saved objects related to the specified saved objects will also be copied into the target spaces.", "type": "boolean" }, "objects": { "items": { "additionalProperties": false, "properties": { "id": { "description": "The identifier of the saved object to copy.", "type": "string" }, "type": { "description": "The type of the saved object to copy.", "type": "string" } }, "required": [ "type", "id" ], "type": "object" }, "type": "array" }, "overwrite": { "default": false, "description": "When set to true, all conflicts are automatically overridden. When a saved object with a matching type and identifier exists in the target space, that version is replaced with the version from the source space. This option cannot be used with the `createNewCopies` option.", "type": "boolean" }, "spaces": { "items": { "description": "The identifiers of the spaces where you want to copy the specified objects.", "type": "string" }, "type": "array" } }, "required": [ "spaces", "objects" ], "type": "object" } } } }, "responses": {}, "summary": "Copy saved objects between spaces", "tags": [ "spaces" ] } }, "/api/spaces/_disable_legacy_url_aliases": { "post": { "operationId": "post-spaces-disable-legacy-url-aliases", "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": { "schema": { "additionalProperties": false, "properties": { "aliases": { "items": { "additionalProperties": false, "properties": { "sourceId": { "description": "The alias source object identifier. This is the legacy object identifier.", "type": "string" }, "targetSpace": { "description": "The space where the alias target object exists.", "type": "string" }, "targetType": { "description": "The type of alias target object. ", "type": "string" } }, "required": [ "targetSpace", "targetType", "sourceId" ], "type": "object" }, "type": "array" } }, "required": [ "aliases" ], "type": "object" } } } }, "responses": {}, "summary": "Disable legacy URL aliases", "tags": [ "spaces" ] } }, "/api/spaces/_get_shareable_references": { "post": { "description": "Collect references and space contexts for saved objects.", "operationId": "post-spaces-get-shareable-references", "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": { "schema": { "additionalProperties": false, "properties": { "objects": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string" } }, "required": [ "type", "id" ], "type": "object" }, "type": "array" } }, "required": [ "objects" ], "type": "object" } } } }, "responses": {}, "summary": "Get shareable references", "tags": [ "spaces" ] } }, "/api/spaces/_resolve_copy_saved_objects_errors": { "post": { "description": "Overwrite saved objects that are returned as errors from the copy saved objects to space API.

[Required authorization] Route required privileges: ALL of [copySavedObjectsToSpaces].", "operationId": "post-spaces-resolve-copy-saved-objects-errors", "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": { "schema": { "additionalProperties": false, "properties": { "compatibilityMode": { "default": false, "type": "boolean" }, "createNewCopies": { "default": true, "type": "boolean" }, "includeReferences": { "default": false, "type": "boolean" }, "objects": { "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string" } }, "required": [ "type", "id" ], "type": "object" }, "type": "array" }, "retries": { "additionalProperties": { "items": { "additionalProperties": false, "properties": { "createNewCopy": { "description": "Creates new copies of the saved objects, regenerates each object ID, and resets the origin.", "type": "boolean" }, "destinationId": { "description": "Specifies the destination identifier that the copied object should have, if different from the current identifier.", "type": "string" }, "id": { "description": "The saved object identifier.", "type": "string" }, "ignoreMissingReferences": { "description": "When set to true, any missing references errors are ignored.", "type": "boolean" }, "overwrite": { "default": false, "description": "When set to true, the saved object from the source space overwrites the conflicting object in the destination space.", "type": "boolean" }, "type": { "description": "The saved object type.", "type": "string" } }, "required": [ "type", "id" ], "type": "object" }, "type": "array" }, "type": "object" } }, "required": [ "retries", "objects" ], "type": "object" } } } }, "responses": {}, "summary": "Resolve conflicts copying saved objects", "tags": [] } }, "/api/spaces/_update_objects_spaces": { "post": { "description": "Update one or more saved objects to add or remove them from some spaces.", "operationId": "post-spaces-update-objects-spaces", "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": { "schema": { "additionalProperties": false, "properties": { "objects": { "items": { "additionalProperties": false, "properties": { "id": { "description": "The identifier of the saved object to update.", "type": "string" }, "type": { "description": "The type of the saved object to update.", "type": "string" } }, "required": [ "type", "id" ], "type": "object" }, "type": "array" }, "spacesToAdd": { "items": { "description": "The identifiers of the spaces the saved objects should be added to or removed from.", "type": "string" }, "type": "array" }, "spacesToRemove": { "items": { "description": "The identifiers of the spaces the saved objects should be added to or removed from.", "type": "string" }, "type": "array" } }, "required": [ "objects", "spacesToAdd", "spacesToRemove" ], "type": "object" } } } }, "responses": {}, "summary": "Update saved objects in spaces", "tags": [ "spaces" ] } }, "/api/spaces/space": { "get": { "operationId": "get-spaces-space", "parameters": [ { "description": "Specifies which authorization checks are applied to the API call. The default value is `any`.", "in": "query", "name": "purpose", "required": false, "schema": { "enum": [ "any", "copySavedObjectsIntoSpace", "shareSavedObjectsIntoSpace" ], "type": "string" } }, { "description": "When enabled, the API returns any spaces that the user is authorized to access in any capacity and each space will contain the purposes for which the user is authorized. This can be useful to determine which spaces a user can read but not take a specific action in. If the security plugin is not enabled, this parameter has no effect, since no authorization checks take place. This parameter cannot be used in with the `purpose` parameter.", "in": "query", "name": "include_authorized_purposes", "required": true, "schema": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ], "nullable": true, "oneOf": [ { "enum": [ false ], "type": "boolean", "x-oas-optional": true }, { "type": "boolean", "x-oas-optional": true } ] } } ], "responses": { "200": { "description": "Indicates a successful call." } }, "summary": "Get all spaces", "tags": [ "spaces" ] }, "post": { "operationId": "post-spaces-space", "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": { "schema": { "additionalProperties": false, "properties": { "_reserved": { "type": "boolean" }, "color": { "description": "The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.", "type": "string" }, "description": { "description": "A description for the space.", "type": "string" }, "disabledFeatures": { "default": [], "items": { "description": "The list of features that are turned off in the space.", "type": "string" }, "type": "array" }, "id": { "description": "The space ID that is part of the Kibana URL when inside the space. Space IDs are limited to lowercase alphanumeric, underscore, and hyphen characters (a-z, 0-9, _, and -). You are cannot change the ID with the update operation.", "type": "string" }, "imageUrl": { "description": "The data-URL encoded image to display in the space avatar. If specified, initials will not be displayed and the color will be visible as the background color for transparent images. For best results, your image should be 64x64. Images will not be optimized by this API call, so care should be taken when using custom images.", "type": "string" }, "initials": { "description": "One or two characters that are shown in the space avatar. By default, the initials are automatically generated from the space name.", "maxLength": 2, "type": "string" }, "name": { "description": "The display name for the space. ", "minLength": 1, "type": "string" }, "solution": { "enum": [ "security", "oblt", "es", "classic" ], "type": "string" } }, "required": [ "id", "name" ], "type": "object" } } } }, "responses": { "200": { "description": "Indicates a successful call." } }, "summary": "Create a space", "tags": [ "spaces" ] } }, "/api/spaces/space/{id}": { "delete": { "description": "When you delete a space, all saved objects that belong to the space are automatically deleted, which is permanent and cannot be undone.", "operationId": "delete-spaces-space-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The space identifier.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Indicates a successful call." }, "404": { "description": "Indicates that the request failed." } }, "summary": "Delete a space", "tags": [ "spaces" ] }, "get": { "operationId": "get-spaces-space-id", "parameters": [ { "description": "The space identifier.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Indicates a successful call." } }, "summary": "Get a space", "tags": [ "spaces" ] }, "put": { "operationId": "put-spaces-space-id", "parameters": [ { "description": "A required header to protect against CSRF attacks", "in": "header", "name": "kbn-xsrf", "required": true, "schema": { "example": "true", "type": "string" } }, { "description": "The space identifier. You are unable to change the ID with the update operation.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "_reserved": { "type": "boolean" }, "color": { "description": "The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.", "type": "string" }, "description": { "description": "A description for the space.", "type": "string" }, "disabledFeatures": { "default": [], "items": { "description": "The list of features that are turned off in the space.", "type": "string" }, "type": "array" }, "id": { "description": "The space ID that is part of the Kibana URL when inside the space. Space IDs are limited to lowercase alphanumeric, underscore, and hyphen characters (a-z, 0-9, _, and -). You are cannot change the ID with the update operation.", "type": "string" }, "imageUrl": { "description": "The data-URL encoded image to display in the space avatar. If specified, initials will not be displayed and the color will be visible as the background color for transparent images. For best results, your image should be 64x64. Images will not be optimized by this API call, so care should be taken when using custom images.", "type": "string" }, "initials": { "description": "One or two characters that are shown in the space avatar. By default, the initials are automatically generated from the space name.", "maxLength": 2, "type": "string" }, "name": { "description": "The display name for the space. ", "minLength": 1, "type": "string" }, "solution": { "enum": [ "security", "oblt", "es", "classic" ], "type": "string" } }, "required": [ "id", "name" ], "type": "object" } } } }, "responses": { "200": { "description": "Indicates a successful call." } }, "summary": "Update a space", "tags": [ "spaces" ] } }, "/api/status": { "get": { "operationId": "get-status", "parameters": [ { "description": "Set to \"true\" to get the response in v7 format.", "in": "query", "name": "v7format", "required": false, "schema": { "type": "boolean" } }, { "description": "Set to \"true\" to get the response in v8 format.", "in": "query", "name": "v8format", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/core_status_response" }, { "$ref": "#/components/schemas/core_status_redactedResponse" } ], "description": "Kibana's operational status. A minimal response is sent for unauthorized users." } } }, "description": "Overall status is OK and Kibana should be functioning normally." }, "503": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/core_status_response" }, { "$ref": "#/components/schemas/core_status_redactedResponse" } ], "description": "Kibana's operational status. A minimal response is sent for unauthorized users." } } }, "description": "Kibana or some of it's essential services are unavailable. Kibana may be degraded or unavailable." } }, "summary": "Get Kibana's current status", "tags": [ "system" ] } } }, "security": [ { "basicAuth": [] } ], "servers": [ { "url": "http://localhost:5622" } ], "tags": [ { "name": "alerting" }, { "name": "connectors" }, { "name": "Dashboards" }, { "name": "Data streams" }, { "name": "Elastic Agent actions" }, { "name": "Elastic Agent binary download sources" }, { "name": "Elastic Agent policies" }, { "name": "Elastic Agent status" }, { "name": "Elastic Agents" }, { "name": "Elastic Package Manager (EPM)" }, { "name": "Fleet enrollment API keys" }, { "name": "Fleet internals" }, { "name": "Fleet outputs" }, { "name": "Fleet package policies" }, { "name": "Fleet proxies" }, { "name": "Fleet Server hosts" }, { "name": "Fleet service tokens" }, { "name": "Fleet uninstall tokens" }, { "name": "Message Signing Service" }, { "name": "roles" }, { "name": "spaces" }, { "name": "system" } ] }