mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
[Fleet] Remove deprecated APIs for agents endpoints (#198313)
This commit is contained in:
parent
34aab05595
commit
115dbec0ff
27 changed files with 26 additions and 1995 deletions
|
@ -5626,63 +5626,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/fleet/agent-status": {
|
|
||||||
"get": {
|
|
||||||
"operationId": "get-fleet-agent-status-2",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "The version of the API to use",
|
|
||||||
"in": "header",
|
|
||||||
"name": "elastic-api-version",
|
|
||||||
"schema": {
|
|
||||||
"default": "2023-10-31",
|
|
||||||
"enum": [
|
|
||||||
"2023-10-31"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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": {
|
|
||||||
"deprecated": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {},
|
|
||||||
"summary": "",
|
|
||||||
"tags": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/fleet/agent_download_sources": {
|
"/api/fleet/agent_download_sources": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "List agent binary download sources",
|
"description": "List agent binary download sources",
|
||||||
|
@ -12547,7 +12490,6 @@
|
||||||
"name": "kuery",
|
"name": "kuery",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"deprecated": true,
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12586,10 +12528,6 @@
|
||||||
"other": {
|
"other": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"total": {
|
|
||||||
"deprecated": true,
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"unenrolled": {
|
"unenrolled": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
|
@ -12599,7 +12537,6 @@
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"events",
|
"events",
|
||||||
"total",
|
|
||||||
"online",
|
"online",
|
||||||
"error",
|
"error",
|
||||||
"offline",
|
"offline",
|
||||||
|
@ -13263,394 +13200,6 @@
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
"list": {
|
|
||||||
"deprecated": true,
|
|
||||||
"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"
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
],
|
|
||||||
"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,
|
|
||||||
"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": {
|
"page": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
|
@ -16695,62 +16244,6 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Elastic Agent actions"
|
"Elastic Agent actions"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"put": {
|
|
||||||
"operationId": "put-fleet-agents-agentid-reassign",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "The version of the API to use",
|
|
||||||
"in": "header",
|
|
||||||
"name": "elastic-api-version",
|
|
||||||
"schema": {
|
|
||||||
"default": "2023-10-31",
|
|
||||||
"enum": [
|
|
||||||
"2023-10-31"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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; Elastic-Api-Version=2023-10-31": {
|
|
||||||
"schema": {
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
|
||||||
"policy_id": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"policy_id"
|
|
||||||
],
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"responses": {},
|
|
||||||
"summary": "",
|
|
||||||
"tags": []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/fleet/agents/{agentId}/request_diagnostics": {
|
"/api/fleet/agents/{agentId}/request_diagnostics": {
|
||||||
|
@ -39679,39 +39172,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/fleet/service-tokens": {
|
|
||||||
"post": {
|
|
||||||
"description": "Create a service token",
|
|
||||||
"operationId": "post-fleet-service-tokens-2",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "The version of the API to use",
|
|
||||||
"in": "header",
|
|
||||||
"name": "elastic-api-version",
|
|
||||||
"schema": {
|
|
||||||
"default": "2023-10-31",
|
|
||||||
"enum": [
|
|
||||||
"2023-10-31"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "A required header to protect against CSRF attacks",
|
|
||||||
"in": "header",
|
|
||||||
"name": "kbn-xsrf",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"example": "true",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {},
|
|
||||||
"summary": "",
|
|
||||||
"tags": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/fleet/service_tokens": {
|
"/api/fleet/service_tokens": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Create a service token",
|
"description": "Create a service token",
|
||||||
|
|
|
@ -5626,63 +5626,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/fleet/agent-status": {
|
|
||||||
"get": {
|
|
||||||
"operationId": "get-fleet-agent-status-2",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "The version of the API to use",
|
|
||||||
"in": "header",
|
|
||||||
"name": "elastic-api-version",
|
|
||||||
"schema": {
|
|
||||||
"default": "2023-10-31",
|
|
||||||
"enum": [
|
|
||||||
"2023-10-31"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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": {
|
|
||||||
"deprecated": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {},
|
|
||||||
"summary": "",
|
|
||||||
"tags": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/fleet/agent_download_sources": {
|
"/api/fleet/agent_download_sources": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "List agent binary download sources",
|
"description": "List agent binary download sources",
|
||||||
|
@ -12547,7 +12490,6 @@
|
||||||
"name": "kuery",
|
"name": "kuery",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"deprecated": true,
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12586,10 +12528,6 @@
|
||||||
"other": {
|
"other": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"total": {
|
|
||||||
"deprecated": true,
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"unenrolled": {
|
"unenrolled": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
|
@ -12599,7 +12537,6 @@
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"events",
|
"events",
|
||||||
"total",
|
|
||||||
"online",
|
"online",
|
||||||
"error",
|
"error",
|
||||||
"offline",
|
"offline",
|
||||||
|
@ -13263,394 +13200,6 @@
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
"list": {
|
|
||||||
"deprecated": true,
|
|
||||||
"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"
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
],
|
|
||||||
"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,
|
|
||||||
"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": {
|
"page": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
|
@ -16695,62 +16244,6 @@
|
||||||
"tags": [
|
"tags": [
|
||||||
"Elastic Agent actions"
|
"Elastic Agent actions"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"put": {
|
|
||||||
"operationId": "put-fleet-agents-agentid-reassign",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "The version of the API to use",
|
|
||||||
"in": "header",
|
|
||||||
"name": "elastic-api-version",
|
|
||||||
"schema": {
|
|
||||||
"default": "2023-10-31",
|
|
||||||
"enum": [
|
|
||||||
"2023-10-31"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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; Elastic-Api-Version=2023-10-31": {
|
|
||||||
"schema": {
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
|
||||||
"policy_id": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"policy_id"
|
|
||||||
],
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"responses": {},
|
|
||||||
"summary": "",
|
|
||||||
"tags": []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/fleet/agents/{agentId}/request_diagnostics": {
|
"/api/fleet/agents/{agentId}/request_diagnostics": {
|
||||||
|
@ -39679,39 +39172,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/fleet/service-tokens": {
|
|
||||||
"post": {
|
|
||||||
"description": "Create a service token",
|
|
||||||
"operationId": "post-fleet-service-tokens-2",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "The version of the API to use",
|
|
||||||
"in": "header",
|
|
||||||
"name": "elastic-api-version",
|
|
||||||
"schema": {
|
|
||||||
"default": "2023-10-31",
|
|
||||||
"enum": [
|
|
||||||
"2023-10-31"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "A required header to protect against CSRF attacks",
|
|
||||||
"in": "header",
|
|
||||||
"name": "kbn-xsrf",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"example": "true",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {},
|
|
||||||
"summary": "",
|
|
||||||
"tags": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/fleet/service_tokens": {
|
"/api/fleet/service_tokens": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Create a service token",
|
"description": "Create a service token",
|
||||||
|
|
|
@ -14811,7 +14811,6 @@ paths:
|
||||||
name: kuery
|
name: kuery
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
deprecated: true
|
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
|
@ -14841,16 +14840,12 @@ paths:
|
||||||
type: number
|
type: number
|
||||||
other:
|
other:
|
||||||
type: number
|
type: number
|
||||||
total:
|
|
||||||
deprecated: true
|
|
||||||
type: number
|
|
||||||
unenrolled:
|
unenrolled:
|
||||||
type: number
|
type: number
|
||||||
updating:
|
updating:
|
||||||
type: number
|
type: number
|
||||||
required:
|
required:
|
||||||
- events
|
- events
|
||||||
- total
|
|
||||||
- online
|
- online
|
||||||
- error
|
- error
|
||||||
- offline
|
- offline
|
||||||
|
@ -14954,41 +14949,6 @@ paths:
|
||||||
summary: ''
|
summary: ''
|
||||||
tags:
|
tags:
|
||||||
- Elastic Agents
|
- Elastic Agents
|
||||||
/api/fleet/agent-status:
|
|
||||||
get:
|
|
||||||
operationId: get-fleet-agent-status-2
|
|
||||||
parameters:
|
|
||||||
- description: The version of the API to use
|
|
||||||
in: header
|
|
||||||
name: elastic-api-version
|
|
||||||
schema:
|
|
||||||
default: '2023-10-31'
|
|
||||||
enum:
|
|
||||||
- '2023-10-31'
|
|
||||||
type: string
|
|
||||||
- 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:
|
|
||||||
deprecated: true
|
|
||||||
type: string
|
|
||||||
responses: {}
|
|
||||||
summary: ''
|
|
||||||
tags: []
|
|
||||||
/api/fleet/agents:
|
/api/fleet/agents:
|
||||||
get:
|
get:
|
||||||
description: List agents
|
description: List agents
|
||||||
|
@ -15342,285 +15302,6 @@ paths:
|
||||||
- enrolled_at
|
- enrolled_at
|
||||||
- local_metadata
|
- local_metadata
|
||||||
type: array
|
type: array
|
||||||
list:
|
|
||||||
deprecated: true
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
access_api_key:
|
|
||||||
type: string
|
|
||||||
access_api_key_id:
|
|
||||||
type: string
|
|
||||||
active:
|
|
||||||
type: boolean
|
|
||||||
agent:
|
|
||||||
additionalProperties: true
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
version:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- version
|
|
||||||
components:
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
message:
|
|
||||||
type: string
|
|
||||||
status:
|
|
||||||
enum:
|
|
||||||
- STARTING
|
|
||||||
- CONFIGURING
|
|
||||||
- HEALTHY
|
|
||||||
- DEGRADED
|
|
||||||
- FAILED
|
|
||||||
- STOPPING
|
|
||||||
- STOPPED
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
units:
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
message:
|
|
||||||
type: string
|
|
||||||
payload:
|
|
||||||
additionalProperties: {}
|
|
||||||
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: array
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- type
|
|
||||||
- status
|
|
||||||
- message
|
|
||||||
type: array
|
|
||||||
default_api_key:
|
|
||||||
type: string
|
|
||||||
default_api_key_history:
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
deprecated: true
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
retired_at:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- retired_at
|
|
||||||
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
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
cpu_avg:
|
|
||||||
type: number
|
|
||||||
memory_size_byte_avg:
|
|
||||||
type: number
|
|
||||||
namespaces:
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
type: array
|
|
||||||
outputs:
|
|
||||||
additionalProperties:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
api_key_id:
|
|
||||||
type: string
|
|
||||||
to_retire_api_key_ids:
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
retired_at:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- retired_at
|
|
||||||
type: array
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- api_key_id
|
|
||||||
- type
|
|
||||||
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
|
|
||||||
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
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
action_id:
|
|
||||||
type: string
|
|
||||||
metadata:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
download_percent:
|
|
||||||
type: number
|
|
||||||
download_rate:
|
|
||||||
type: number
|
|
||||||
error_msg:
|
|
||||||
type: string
|
|
||||||
failed_state:
|
|
||||||
enum:
|
|
||||||
- UPG_REQUESTED
|
|
||||||
- UPG_SCHEDULED
|
|
||||||
- UPG_DOWNLOADING
|
|
||||||
- UPG_EXTRACTING
|
|
||||||
- UPG_REPLACING
|
|
||||||
- UPG_RESTARTING
|
|
||||||
- UPG_FAILED
|
|
||||||
- UPG_WATCHING
|
|
||||||
- UPG_ROLLBACK
|
|
||||||
type: string
|
|
||||||
retry_error_msg:
|
|
||||||
type: string
|
|
||||||
retry_until:
|
|
||||||
type: string
|
|
||||||
scheduled_at:
|
|
||||||
type: string
|
|
||||||
state:
|
|
||||||
enum:
|
|
||||||
- UPG_REQUESTED
|
|
||||||
- UPG_SCHEDULED
|
|
||||||
- UPG_DOWNLOADING
|
|
||||||
- UPG_EXTRACTING
|
|
||||||
- UPG_REPLACING
|
|
||||||
- UPG_RESTARTING
|
|
||||||
- UPG_FAILED
|
|
||||||
- UPG_WATCHING
|
|
||||||
- UPG_ROLLBACK
|
|
||||||
type: string
|
|
||||||
target_version:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- target_version
|
|
||||||
- action_id
|
|
||||||
- state
|
|
||||||
upgrade_started_at:
|
|
||||||
nullable: true
|
|
||||||
type: string
|
|
||||||
upgraded_at:
|
|
||||||
nullable: true
|
|
||||||
type: string
|
|
||||||
user_provided_metadata:
|
|
||||||
additionalProperties: {}
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- packages
|
|
||||||
- type
|
|
||||||
- active
|
|
||||||
- enrolled_at
|
|
||||||
- local_metadata
|
|
||||||
type: array
|
|
||||||
page:
|
page:
|
||||||
type: number
|
type: number
|
||||||
perPage:
|
perPage:
|
||||||
|
@ -16657,43 +16338,6 @@ paths:
|
||||||
summary: ''
|
summary: ''
|
||||||
tags:
|
tags:
|
||||||
- Elastic Agent actions
|
- Elastic Agent actions
|
||||||
put:
|
|
||||||
operationId: put-fleet-agents-agentid-reassign
|
|
||||||
parameters:
|
|
||||||
- description: The version of the API to use
|
|
||||||
in: header
|
|
||||||
name: elastic-api-version
|
|
||||||
schema:
|
|
||||||
default: '2023-10-31'
|
|
||||||
enum:
|
|
||||||
- '2023-10-31'
|
|
||||||
type: string
|
|
||||||
- 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; Elastic-Api-Version=2023-10-31:
|
|
||||||
schema:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
policy_id:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- policy_id
|
|
||||||
responses: {}
|
|
||||||
summary: ''
|
|
||||||
tags: []
|
|
||||||
/api/fleet/agents/{agentId}/request_diagnostics:
|
/api/fleet/agents/{agentId}/request_diagnostics:
|
||||||
post:
|
post:
|
||||||
description: Request agent diagnostics
|
description: Request agent diagnostics
|
||||||
|
@ -33408,29 +33052,6 @@ paths:
|
||||||
summary: ''
|
summary: ''
|
||||||
tags:
|
tags:
|
||||||
- Fleet service tokens
|
- Fleet service tokens
|
||||||
/api/fleet/service-tokens:
|
|
||||||
post:
|
|
||||||
description: Create a service token
|
|
||||||
operationId: post-fleet-service-tokens-2
|
|
||||||
parameters:
|
|
||||||
- description: The version of the API to use
|
|
||||||
in: header
|
|
||||||
name: elastic-api-version
|
|
||||||
schema:
|
|
||||||
default: '2023-10-31'
|
|
||||||
enum:
|
|
||||||
- '2023-10-31'
|
|
||||||
type: string
|
|
||||||
- description: A required header to protect against CSRF attacks
|
|
||||||
in: header
|
|
||||||
name: kbn-xsrf
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
example: 'true'
|
|
||||||
type: string
|
|
||||||
responses: {}
|
|
||||||
summary: ''
|
|
||||||
tags: []
|
|
||||||
/api/fleet/settings:
|
/api/fleet/settings:
|
||||||
get:
|
get:
|
||||||
description: Get settings
|
description: Get settings
|
||||||
|
|
|
@ -18244,7 +18244,6 @@ paths:
|
||||||
name: kuery
|
name: kuery
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
deprecated: true
|
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
|
@ -18274,16 +18273,12 @@ paths:
|
||||||
type: number
|
type: number
|
||||||
other:
|
other:
|
||||||
type: number
|
type: number
|
||||||
total:
|
|
||||||
deprecated: true
|
|
||||||
type: number
|
|
||||||
unenrolled:
|
unenrolled:
|
||||||
type: number
|
type: number
|
||||||
updating:
|
updating:
|
||||||
type: number
|
type: number
|
||||||
required:
|
required:
|
||||||
- events
|
- events
|
||||||
- total
|
|
||||||
- online
|
- online
|
||||||
- error
|
- error
|
||||||
- offline
|
- offline
|
||||||
|
@ -18387,41 +18382,6 @@ paths:
|
||||||
summary: ''
|
summary: ''
|
||||||
tags:
|
tags:
|
||||||
- Elastic Agents
|
- Elastic Agents
|
||||||
/api/fleet/agent-status:
|
|
||||||
get:
|
|
||||||
operationId: get-fleet-agent-status-2
|
|
||||||
parameters:
|
|
||||||
- description: The version of the API to use
|
|
||||||
in: header
|
|
||||||
name: elastic-api-version
|
|
||||||
schema:
|
|
||||||
default: '2023-10-31'
|
|
||||||
enum:
|
|
||||||
- '2023-10-31'
|
|
||||||
type: string
|
|
||||||
- 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:
|
|
||||||
deprecated: true
|
|
||||||
type: string
|
|
||||||
responses: {}
|
|
||||||
summary: ''
|
|
||||||
tags: []
|
|
||||||
/api/fleet/agents:
|
/api/fleet/agents:
|
||||||
get:
|
get:
|
||||||
description: List agents
|
description: List agents
|
||||||
|
@ -18775,285 +18735,6 @@ paths:
|
||||||
- enrolled_at
|
- enrolled_at
|
||||||
- local_metadata
|
- local_metadata
|
||||||
type: array
|
type: array
|
||||||
list:
|
|
||||||
deprecated: true
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
access_api_key:
|
|
||||||
type: string
|
|
||||||
access_api_key_id:
|
|
||||||
type: string
|
|
||||||
active:
|
|
||||||
type: boolean
|
|
||||||
agent:
|
|
||||||
additionalProperties: true
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
version:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- version
|
|
||||||
components:
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
message:
|
|
||||||
type: string
|
|
||||||
status:
|
|
||||||
enum:
|
|
||||||
- STARTING
|
|
||||||
- CONFIGURING
|
|
||||||
- HEALTHY
|
|
||||||
- DEGRADED
|
|
||||||
- FAILED
|
|
||||||
- STOPPING
|
|
||||||
- STOPPED
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
units:
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
message:
|
|
||||||
type: string
|
|
||||||
payload:
|
|
||||||
additionalProperties: {}
|
|
||||||
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: array
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- type
|
|
||||||
- status
|
|
||||||
- message
|
|
||||||
type: array
|
|
||||||
default_api_key:
|
|
||||||
type: string
|
|
||||||
default_api_key_history:
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
deprecated: true
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
retired_at:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- retired_at
|
|
||||||
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
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
cpu_avg:
|
|
||||||
type: number
|
|
||||||
memory_size_byte_avg:
|
|
||||||
type: number
|
|
||||||
namespaces:
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
type: array
|
|
||||||
outputs:
|
|
||||||
additionalProperties:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
api_key_id:
|
|
||||||
type: string
|
|
||||||
to_retire_api_key_ids:
|
|
||||||
items:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
retired_at:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- retired_at
|
|
||||||
type: array
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- api_key_id
|
|
||||||
- type
|
|
||||||
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
|
|
||||||
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
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
action_id:
|
|
||||||
type: string
|
|
||||||
metadata:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
download_percent:
|
|
||||||
type: number
|
|
||||||
download_rate:
|
|
||||||
type: number
|
|
||||||
error_msg:
|
|
||||||
type: string
|
|
||||||
failed_state:
|
|
||||||
enum:
|
|
||||||
- UPG_REQUESTED
|
|
||||||
- UPG_SCHEDULED
|
|
||||||
- UPG_DOWNLOADING
|
|
||||||
- UPG_EXTRACTING
|
|
||||||
- UPG_REPLACING
|
|
||||||
- UPG_RESTARTING
|
|
||||||
- UPG_FAILED
|
|
||||||
- UPG_WATCHING
|
|
||||||
- UPG_ROLLBACK
|
|
||||||
type: string
|
|
||||||
retry_error_msg:
|
|
||||||
type: string
|
|
||||||
retry_until:
|
|
||||||
type: string
|
|
||||||
scheduled_at:
|
|
||||||
type: string
|
|
||||||
state:
|
|
||||||
enum:
|
|
||||||
- UPG_REQUESTED
|
|
||||||
- UPG_SCHEDULED
|
|
||||||
- UPG_DOWNLOADING
|
|
||||||
- UPG_EXTRACTING
|
|
||||||
- UPG_REPLACING
|
|
||||||
- UPG_RESTARTING
|
|
||||||
- UPG_FAILED
|
|
||||||
- UPG_WATCHING
|
|
||||||
- UPG_ROLLBACK
|
|
||||||
type: string
|
|
||||||
target_version:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- target_version
|
|
||||||
- action_id
|
|
||||||
- state
|
|
||||||
upgrade_started_at:
|
|
||||||
nullable: true
|
|
||||||
type: string
|
|
||||||
upgraded_at:
|
|
||||||
nullable: true
|
|
||||||
type: string
|
|
||||||
user_provided_metadata:
|
|
||||||
additionalProperties: {}
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- packages
|
|
||||||
- type
|
|
||||||
- active
|
|
||||||
- enrolled_at
|
|
||||||
- local_metadata
|
|
||||||
type: array
|
|
||||||
page:
|
page:
|
||||||
type: number
|
type: number
|
||||||
perPage:
|
perPage:
|
||||||
|
@ -20090,43 +19771,6 @@ paths:
|
||||||
summary: ''
|
summary: ''
|
||||||
tags:
|
tags:
|
||||||
- Elastic Agent actions
|
- Elastic Agent actions
|
||||||
put:
|
|
||||||
operationId: put-fleet-agents-agentid-reassign
|
|
||||||
parameters:
|
|
||||||
- description: The version of the API to use
|
|
||||||
in: header
|
|
||||||
name: elastic-api-version
|
|
||||||
schema:
|
|
||||||
default: '2023-10-31'
|
|
||||||
enum:
|
|
||||||
- '2023-10-31'
|
|
||||||
type: string
|
|
||||||
- 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; Elastic-Api-Version=2023-10-31:
|
|
||||||
schema:
|
|
||||||
additionalProperties: false
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
policy_id:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- policy_id
|
|
||||||
responses: {}
|
|
||||||
summary: ''
|
|
||||||
tags: []
|
|
||||||
/api/fleet/agents/{agentId}/request_diagnostics:
|
/api/fleet/agents/{agentId}/request_diagnostics:
|
||||||
post:
|
post:
|
||||||
description: Request agent diagnostics
|
description: Request agent diagnostics
|
||||||
|
@ -36841,29 +36485,6 @@ paths:
|
||||||
summary: ''
|
summary: ''
|
||||||
tags:
|
tags:
|
||||||
- Fleet service tokens
|
- Fleet service tokens
|
||||||
/api/fleet/service-tokens:
|
|
||||||
post:
|
|
||||||
description: Create a service token
|
|
||||||
operationId: post-fleet-service-tokens-2
|
|
||||||
parameters:
|
|
||||||
- description: The version of the API to use
|
|
||||||
in: header
|
|
||||||
name: elastic-api-version
|
|
||||||
schema:
|
|
||||||
default: '2023-10-31'
|
|
||||||
enum:
|
|
||||||
- '2023-10-31'
|
|
||||||
type: string
|
|
||||||
- description: A required header to protect against CSRF attacks
|
|
||||||
in: header
|
|
||||||
name: kbn-xsrf
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
example: 'true'
|
|
||||||
type: string
|
|
||||||
responses: {}
|
|
||||||
summary: ''
|
|
||||||
tags: []
|
|
||||||
/api/fleet/settings:
|
/api/fleet/settings:
|
||||||
get:
|
get:
|
||||||
description: Get settings
|
description: Get settings
|
||||||
|
|
|
@ -42,7 +42,7 @@ const createPolicies = (
|
||||||
const agentPolicyStatus = {
|
const agentPolicyStatus = {
|
||||||
id: agentPolicy.id,
|
id: agentPolicy.id,
|
||||||
name: agentPolicy.name,
|
name: agentPolicy.name,
|
||||||
agents: agentStatusByAgentPolicyId[agentPolicy.id]?.total,
|
agents: agentStatusByAgentPolicyId[agentPolicy.id]?.active,
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
package_policy: cloudDefendPackage,
|
package_policy: cloudDefendPackage,
|
||||||
|
|
|
@ -48,7 +48,7 @@ export const getBenchmarksData = (
|
||||||
const agentPolicyStatus = {
|
const agentPolicyStatus = {
|
||||||
id: agentPolicy.id,
|
id: agentPolicy.id,
|
||||||
name: agentPolicy.name,
|
name: agentPolicy.name,
|
||||||
agents: agentStatusByAgentPolicyId[agentPolicy.id]?.total,
|
agents: agentStatusByAgentPolicyId[agentPolicy.id]?.active,
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
package_policy: cspPackage,
|
package_policy: cspPackage,
|
||||||
|
|
|
@ -135,8 +135,6 @@ export const APP_API_ROUTES = {
|
||||||
CHECK_PERMISSIONS_PATTERN: `${API_ROOT}/check-permissions`,
|
CHECK_PERMISSIONS_PATTERN: `${API_ROOT}/check-permissions`,
|
||||||
GENERATE_SERVICE_TOKEN_PATTERN: `${API_ROOT}/service_tokens`,
|
GENERATE_SERVICE_TOKEN_PATTERN: `${API_ROOT}/service_tokens`,
|
||||||
AGENT_POLICIES_SPACES: `${INTERNAL_ROOT}/agent_policies_spaces`,
|
AGENT_POLICIES_SPACES: `${INTERNAL_ROOT}/agent_policies_spaces`,
|
||||||
// deprecated since 8.0
|
|
||||||
GENERATE_SERVICE_TOKEN_PATTERN_DEPRECATED: `${API_ROOT}/service-tokens`,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Agent API routes
|
// Agent API routes
|
||||||
|
@ -159,8 +157,6 @@ export const AGENT_API_ROUTES = {
|
||||||
AVAILABLE_VERSIONS_PATTERN: `${API_ROOT}/agents/available_versions`,
|
AVAILABLE_VERSIONS_PATTERN: `${API_ROOT}/agents/available_versions`,
|
||||||
STATUS_PATTERN: `${API_ROOT}/agent_status`,
|
STATUS_PATTERN: `${API_ROOT}/agent_status`,
|
||||||
DATA_PATTERN: `${API_ROOT}/agent_status/data`,
|
DATA_PATTERN: `${API_ROOT}/agent_status/data`,
|
||||||
// deprecated since 8.0
|
|
||||||
STATUS_PATTERN_DEPRECATED: `${API_ROOT}/agent-status`,
|
|
||||||
UPGRADE_PATTERN: `${API_ROOT}/agents/{agentId}/upgrade`,
|
UPGRADE_PATTERN: `${API_ROOT}/agents/{agentId}/upgrade`,
|
||||||
BULK_UPGRADE_PATTERN: `${API_ROOT}/agents/bulk_upgrade`,
|
BULK_UPGRADE_PATTERN: `${API_ROOT}/agents/bulk_upgrade`,
|
||||||
ACTION_STATUS_PATTERN: `${API_ROOT}/agents/action_status`,
|
ACTION_STATUS_PATTERN: `${API_ROOT}/agents/action_status`,
|
||||||
|
|
|
@ -21,15 +21,13 @@ import type { ListResult, ListWithKuery } from './common';
|
||||||
|
|
||||||
export interface GetAgentsRequest {
|
export interface GetAgentsRequest {
|
||||||
query: ListWithKuery & {
|
query: ListWithKuery & {
|
||||||
showInactive: boolean;
|
showInactive?: boolean;
|
||||||
showUpgradeable?: boolean;
|
showUpgradeable?: boolean;
|
||||||
withMetrics?: boolean;
|
withMetrics?: boolean;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetAgentsResponse extends ListResult<Agent> {
|
export interface GetAgentsResponse extends ListResult<Agent> {
|
||||||
// deprecated in 8.x
|
|
||||||
list?: Agent[];
|
|
||||||
statusSummary?: Record<AgentStatus, number>;
|
statusSummary?: Record<AgentStatus, number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,16 +126,6 @@ export type PostBulkAgentUpgradeResponse = BulkAgentAction;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||||
export interface PostAgentUpgradeResponse {}
|
export interface PostAgentUpgradeResponse {}
|
||||||
|
|
||||||
// deprecated
|
|
||||||
export interface PutAgentReassignRequest {
|
|
||||||
params: {
|
|
||||||
agentId: string;
|
|
||||||
};
|
|
||||||
body: { policy_id: string };
|
|
||||||
}
|
|
||||||
// deprecated
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
||||||
export interface PutAgentReassignResponse {}
|
|
||||||
export interface PostAgentReassignRequest {
|
export interface PostAgentReassignRequest {
|
||||||
params: {
|
params: {
|
||||||
agentId: string;
|
agentId: string;
|
||||||
|
@ -217,8 +205,6 @@ export interface GetAgentStatusRequest {
|
||||||
export interface GetAgentStatusResponse {
|
export interface GetAgentStatusResponse {
|
||||||
results: {
|
results: {
|
||||||
events: number;
|
events: number;
|
||||||
// deprecated
|
|
||||||
total: number;
|
|
||||||
online: number;
|
online: number;
|
||||||
error: number;
|
error: number;
|
||||||
offline: number;
|
offline: number;
|
||||||
|
|
|
@ -238,8 +238,8 @@ export const CreatePackagePolicySinglePage: CreatePackagePolicyParams = ({
|
||||||
let count = 0;
|
let count = 0;
|
||||||
for (const policyId of agentPolicyIds) {
|
for (const policyId of agentPolicyIds) {
|
||||||
const { data } = await sendGetAgentStatus({ policyId });
|
const { data } = await sendGetAgentStatus({ policyId });
|
||||||
if (data?.results.total) {
|
if (data?.results.active) {
|
||||||
count += data.results.total;
|
count += data.results.active;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setAgentCount(count);
|
setAgentCount(count);
|
||||||
|
|
|
@ -150,8 +150,8 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>(
|
||||||
if (isFleetEnabled) {
|
if (isFleetEnabled) {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
const { data } = await sendGetAgentStatus({ policyId: agentPolicy.id });
|
const { data } = await sendGetAgentStatus({ policyId: agentPolicy.id });
|
||||||
if (data?.results.total) {
|
if (data?.results.active) {
|
||||||
setAgentCount(data.results.total);
|
setAgentCount(data.results.active);
|
||||||
} else {
|
} else {
|
||||||
await submitUpdateAgentPolicy();
|
await submitUpdateAgentPolicy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,8 +166,8 @@ export const EditPackagePolicyForm = memo<{
|
||||||
let count = 0;
|
let count = 0;
|
||||||
for (const id of packagePolicy.policy_ids) {
|
for (const id of packagePolicy.policy_ids) {
|
||||||
const { data } = await sendGetAgentStatus({ policyId: id });
|
const { data } = await sendGetAgentStatus({ policyId: id });
|
||||||
if (data?.results.total) {
|
if (data?.results.active) {
|
||||||
count += data.results.total;
|
count += data.results.active;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setAgentCount(count);
|
setAgentCount(count);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { uniq } from 'lodash';
|
import { omit, uniq } from 'lodash';
|
||||||
import { type RequestHandler, SavedObjectsErrorHelpers } from '@kbn/core/server';
|
import { type RequestHandler, SavedObjectsErrorHelpers } from '@kbn/core/server';
|
||||||
import type { TypeOf } from '@kbn/config-schema';
|
import type { TypeOf } from '@kbn/config-schema';
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ import type {
|
||||||
GetAgentsResponse,
|
GetAgentsResponse,
|
||||||
GetOneAgentResponse,
|
GetOneAgentResponse,
|
||||||
GetAgentStatusResponse,
|
GetAgentStatusResponse,
|
||||||
PutAgentReassignResponse,
|
|
||||||
GetAgentTagsResponse,
|
GetAgentTagsResponse,
|
||||||
GetAvailableVersionsResponse,
|
GetAvailableVersionsResponse,
|
||||||
GetActionStatusResponse,
|
GetActionStatusResponse,
|
||||||
|
@ -30,7 +29,6 @@ import type {
|
||||||
DeleteAgentRequestSchema,
|
DeleteAgentRequestSchema,
|
||||||
GetAgentStatusRequestSchema,
|
GetAgentStatusRequestSchema,
|
||||||
GetAgentDataRequestSchema,
|
GetAgentDataRequestSchema,
|
||||||
PutAgentReassignRequestSchemaDeprecated,
|
|
||||||
PostAgentReassignRequestSchema,
|
PostAgentReassignRequestSchema,
|
||||||
PostBulkAgentReassignRequestSchema,
|
PostBulkAgentReassignRequestSchema,
|
||||||
PostBulkUpdateAgentTagsRequestSchema,
|
PostBulkUpdateAgentTagsRequestSchema,
|
||||||
|
@ -207,7 +205,6 @@ export const getAgentsHandler: FleetRequestHandler<
|
||||||
}
|
}
|
||||||
|
|
||||||
const body: GetAgentsResponse = {
|
const body: GetAgentsResponse = {
|
||||||
list: agents, // deprecated
|
|
||||||
items: agents,
|
items: agents,
|
||||||
total,
|
total,
|
||||||
page,
|
page,
|
||||||
|
@ -243,29 +240,6 @@ export const getAgentTagsHandler: RequestHandler<
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const putAgentsReassignHandlerDeprecated: RequestHandler<
|
|
||||||
TypeOf<typeof PutAgentReassignRequestSchemaDeprecated.params>,
|
|
||||||
undefined,
|
|
||||||
TypeOf<typeof PutAgentReassignRequestSchemaDeprecated.body>
|
|
||||||
> = async (context, request, response) => {
|
|
||||||
const coreContext = await context.core;
|
|
||||||
const soClient = coreContext.savedObjects.client;
|
|
||||||
const esClient = coreContext.elasticsearch.client.asInternalUser;
|
|
||||||
try {
|
|
||||||
await AgentService.reassignAgent(
|
|
||||||
soClient,
|
|
||||||
esClient,
|
|
||||||
request.params.agentId,
|
|
||||||
request.body.policy_id
|
|
||||||
);
|
|
||||||
|
|
||||||
const body: PutAgentReassignResponse = {};
|
|
||||||
return response.ok({ body });
|
|
||||||
} catch (error) {
|
|
||||||
return defaultFleetErrorHandler({ error, response });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const postAgentReassignHandler: RequestHandler<
|
export const postAgentReassignHandler: RequestHandler<
|
||||||
TypeOf<typeof PostAgentReassignRequestSchema.params>,
|
TypeOf<typeof PostAgentReassignRequestSchema.params>,
|
||||||
undefined,
|
undefined,
|
||||||
|
@ -341,7 +315,7 @@ export const getAgentStatusForAgentPolicyHandler: FleetRequestHandler<
|
||||||
parsePolicyIds(request.query.policyIds)
|
parsePolicyIds(request.query.policyIds)
|
||||||
);
|
);
|
||||||
|
|
||||||
const body: GetAgentStatusResponse = { results };
|
const body: GetAgentStatusResponse = { results: omit(results, 'total') };
|
||||||
|
|
||||||
return response.ok({ body });
|
return response.ok({ body });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -222,7 +222,6 @@ describe('schema validation', () => {
|
||||||
it('list agents should return valid response', async () => {
|
it('list agents should return valid response', async () => {
|
||||||
const expectedResponse: GetAgentsResponse = {
|
const expectedResponse: GetAgentsResponse = {
|
||||||
items: [agent],
|
items: [agent],
|
||||||
list: [agent],
|
|
||||||
total: 1,
|
total: 1,
|
||||||
page: 1,
|
page: 1,
|
||||||
perPage: 1,
|
perPage: 1,
|
||||||
|
@ -366,7 +365,6 @@ describe('schema validation', () => {
|
||||||
const expectedResponse: GetAgentStatusResponse = {
|
const expectedResponse: GetAgentStatusResponse = {
|
||||||
results: {
|
results: {
|
||||||
events: 1,
|
events: 1,
|
||||||
total: 1,
|
|
||||||
online: 1,
|
online: 1,
|
||||||
error: 1,
|
error: 1,
|
||||||
offline: 1,
|
offline: 1,
|
||||||
|
|
|
@ -23,7 +23,6 @@ import {
|
||||||
GetAgentStatusRequestSchema,
|
GetAgentStatusRequestSchema,
|
||||||
GetAgentDataRequestSchema,
|
GetAgentDataRequestSchema,
|
||||||
PostNewAgentActionRequestSchema,
|
PostNewAgentActionRequestSchema,
|
||||||
PutAgentReassignRequestSchemaDeprecated,
|
|
||||||
PostAgentReassignRequestSchema,
|
PostAgentReassignRequestSchema,
|
||||||
PostBulkAgentReassignRequestSchema,
|
PostBulkAgentReassignRequestSchema,
|
||||||
PostAgentUpgradeRequestSchema,
|
PostAgentUpgradeRequestSchema,
|
||||||
|
@ -68,7 +67,6 @@ import {
|
||||||
updateAgentHandler,
|
updateAgentHandler,
|
||||||
deleteAgentHandler,
|
deleteAgentHandler,
|
||||||
getAgentStatusForAgentPolicyHandler,
|
getAgentStatusForAgentPolicyHandler,
|
||||||
putAgentsReassignHandlerDeprecated,
|
|
||||||
postBulkAgentReassignHandler,
|
postBulkAgentReassignHandler,
|
||||||
getAgentDataHandler,
|
getAgentDataHandler,
|
||||||
bulkUpdateAgentTagsHandler,
|
bulkUpdateAgentTagsHandler,
|
||||||
|
@ -391,23 +389,6 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
|
||||||
postAgentUnenrollHandler
|
postAgentUnenrollHandler
|
||||||
);
|
);
|
||||||
|
|
||||||
router.versioned
|
|
||||||
.put({
|
|
||||||
path: AGENT_API_ROUTES.REASSIGN_PATTERN,
|
|
||||||
fleetAuthz: {
|
|
||||||
fleet: { allAgents: true },
|
|
||||||
},
|
|
||||||
// @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo}
|
|
||||||
deprecated: true,
|
|
||||||
})
|
|
||||||
.addVersion(
|
|
||||||
{
|
|
||||||
version: API_VERSIONS.public.v1,
|
|
||||||
validate: { request: PutAgentReassignRequestSchemaDeprecated },
|
|
||||||
},
|
|
||||||
putAgentsReassignHandlerDeprecated
|
|
||||||
);
|
|
||||||
|
|
||||||
router.versioned
|
router.versioned
|
||||||
.post({
|
.post({
|
||||||
path: AGENT_API_ROUTES.REASSIGN_PATTERN,
|
path: AGENT_API_ROUTES.REASSIGN_PATTERN,
|
||||||
|
@ -613,22 +594,6 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
|
||||||
},
|
},
|
||||||
getAgentStatusForAgentPolicyHandler
|
getAgentStatusForAgentPolicyHandler
|
||||||
);
|
);
|
||||||
router.versioned
|
|
||||||
.get({
|
|
||||||
path: AGENT_API_ROUTES.STATUS_PATTERN_DEPRECATED,
|
|
||||||
fleetAuthz: {
|
|
||||||
fleet: { readAgents: true },
|
|
||||||
},
|
|
||||||
// @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo}
|
|
||||||
deprecated: true,
|
|
||||||
})
|
|
||||||
.addVersion(
|
|
||||||
{
|
|
||||||
version: API_VERSIONS.public.v1,
|
|
||||||
validate: { request: GetAgentStatusRequestSchema },
|
|
||||||
},
|
|
||||||
getAgentStatusForAgentPolicyHandler
|
|
||||||
);
|
|
||||||
// Agent data
|
// Agent data
|
||||||
router.versioned
|
router.versioned
|
||||||
.get({
|
.get({
|
||||||
|
|
|
@ -285,22 +285,4 @@ export const registerRoutes = (router: FleetAuthzRouter, config: FleetConfigType
|
||||||
},
|
},
|
||||||
generateServiceTokenHandler
|
generateServiceTokenHandler
|
||||||
);
|
);
|
||||||
|
|
||||||
router.versioned
|
|
||||||
.post({
|
|
||||||
path: APP_API_ROUTES.GENERATE_SERVICE_TOKEN_PATTERN_DEPRECATED,
|
|
||||||
fleetAuthz: {
|
|
||||||
fleet: { allAgents: true },
|
|
||||||
},
|
|
||||||
description: `Create a service token`,
|
|
||||||
// @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo}
|
|
||||||
deprecated: true,
|
|
||||||
})
|
|
||||||
.addVersion(
|
|
||||||
{
|
|
||||||
version: API_VERSIONS.public.v1,
|
|
||||||
validate: {},
|
|
||||||
},
|
|
||||||
generateServiceTokenHandler
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -217,11 +217,6 @@ export const AgentResponseSchema = schema.object({
|
||||||
});
|
});
|
||||||
|
|
||||||
export const GetAgentsResponseSchema = ListResponseSchema(AgentResponseSchema).extends({
|
export const GetAgentsResponseSchema = ListResponseSchema(AgentResponseSchema).extends({
|
||||||
list: schema.maybe(
|
|
||||||
schema.arrayOf(AgentResponseSchema, {
|
|
||||||
meta: { deprecated: true },
|
|
||||||
})
|
|
||||||
),
|
|
||||||
statusSummary: schema.maybe(schema.recordOf(AgentStatusSchema, schema.number())),
|
statusSummary: schema.maybe(schema.recordOf(AgentStatusSchema, schema.number())),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -377,15 +372,6 @@ export const PostBulkAgentUpgradeRequestSchema = {
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PutAgentReassignRequestSchemaDeprecated = {
|
|
||||||
params: schema.object({
|
|
||||||
agentId: schema.string(),
|
|
||||||
}),
|
|
||||||
body: schema.object({
|
|
||||||
policy_id: schema.string(),
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
|
|
||||||
export const PostAgentReassignRequestSchema = {
|
export const PostAgentReassignRequestSchema = {
|
||||||
params: schema.object({
|
params: schema.object({
|
||||||
agentId: schema.string(),
|
agentId: schema.string(),
|
||||||
|
@ -518,9 +504,6 @@ export const GetAgentStatusRequestSchema = {
|
||||||
return validationObj?.error;
|
return validationObj?.error;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
meta: {
|
|
||||||
deprecated: true,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
@ -529,11 +512,6 @@ export const GetAgentStatusRequestSchema = {
|
||||||
export const GetAgentStatusResponseSchema = schema.object({
|
export const GetAgentStatusResponseSchema = schema.object({
|
||||||
results: schema.object({
|
results: schema.object({
|
||||||
events: schema.number(),
|
events: schema.number(),
|
||||||
total: schema.number({
|
|
||||||
meta: {
|
|
||||||
deprecated: true,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
online: schema.number(),
|
online: schema.number(),
|
||||||
error: schema.number(),
|
error: schema.number(),
|
||||||
offline: schema.number(),
|
offline: schema.number(),
|
||||||
|
|
|
@ -59,7 +59,7 @@ export const getAgentPoliciesRoute = (router: IRouter, osqueryContext: OsqueryAp
|
||||||
(agentPolicy: GetAgentPoliciesResponseItem) =>
|
(agentPolicy: GetAgentPoliciesResponseItem) =>
|
||||||
agentService?.asInternalUser
|
agentService?.asInternalUser
|
||||||
.getAgentStatusForAgentPolicy(agentPolicy.id)
|
.getAgentStatusForAgentPolicy(agentPolicy.id)
|
||||||
.then(({ total: agentTotal }) => (agentPolicy.agents = agentTotal)),
|
.then(({ active: agentTotal }) => (agentPolicy.agents = agentTotal)),
|
||||||
{ concurrency: 10 }
|
{ concurrency: 10 }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import {
|
||||||
} from '@kbn/fleet-plugin/common';
|
} from '@kbn/fleet-plugin/common';
|
||||||
import type {
|
import type {
|
||||||
GetOneAgentResponse,
|
GetOneAgentResponse,
|
||||||
PutAgentReassignResponse,
|
PostAgentReassignResponse,
|
||||||
UpdateAgentPolicyResponse,
|
UpdateAgentPolicyResponse,
|
||||||
} from '@kbn/fleet-plugin/common/types';
|
} from '@kbn/fleet-plugin/common/types';
|
||||||
import { uninstallTokensRouteService } from '@kbn/fleet-plugin/common/services/routes';
|
import { uninstallTokensRouteService } from '@kbn/fleet-plugin/common/services/routes';
|
||||||
|
@ -56,10 +56,10 @@ export const getAgentByHostName = (hostname: string): Cypress.Chainable<Agent> =
|
||||||
export const reassignAgentPolicy = (
|
export const reassignAgentPolicy = (
|
||||||
agentId: string,
|
agentId: string,
|
||||||
agentPolicyId: string
|
agentPolicyId: string
|
||||||
): Cypress.Chainable<Cypress.Response<PutAgentReassignResponse>> =>
|
): Cypress.Chainable<Cypress.Response<PostAgentReassignResponse>> =>
|
||||||
request<PutAgentReassignResponse>({
|
request<PostAgentReassignResponse>({
|
||||||
url: agentRouteService.getReassignPath(agentId),
|
url: agentRouteService.getReassignPath(agentId),
|
||||||
method: 'PUT',
|
method: 'POST',
|
||||||
body: {
|
body: {
|
||||||
policy_id: agentPolicyId,
|
policy_id: agentPolicyId,
|
||||||
},
|
},
|
||||||
|
|
|
@ -124,7 +124,7 @@ describe('Policy Details', () => {
|
||||||
if (path === `${AGENT_API_ROUTES.STATUS_PATTERN}`) {
|
if (path === `${AGENT_API_ROUTES.STATUS_PATTERN}`) {
|
||||||
asyncActions = asyncActions.then(async () => sleep());
|
asyncActions = asyncActions.then(async () => sleep());
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
results: { events: 0, total: 5, online: 3, error: 1, offline: 1 },
|
results: { events: 0, active: 5, online: 3, error: 1, offline: 1 },
|
||||||
success: true,
|
success: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ export const PolicyDetails = React.memo(() => {
|
||||||
|
|
||||||
const headerRightContent = (
|
const headerRightContent = (
|
||||||
<AgentsSummary
|
<AgentsSummary
|
||||||
total={policyAgentStatusSummary?.total ?? 0}
|
total={policyAgentStatusSummary?.active ?? 0}
|
||||||
online={policyAgentStatusSummary?.online ?? 0}
|
online={policyAgentStatusSummary?.online ?? 0}
|
||||||
offline={policyAgentStatusSummary?.offline ?? 0}
|
offline={policyAgentStatusSummary?.offline ?? 0}
|
||||||
error={policyAgentStatusSummary?.error ?? 0}
|
error={policyAgentStatusSummary?.error ?? 0}
|
||||||
|
|
|
@ -47,20 +47,20 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
it('should return the list of agents when requesting as admin', async () => {
|
it('should return the list of agents when requesting as admin', async () => {
|
||||||
const { body: apiResponse } = await supertest.get(`/api/fleet/agents`).expect(200);
|
const { body: apiResponse } = await supertest.get(`/api/fleet/agents`).expect(200);
|
||||||
|
|
||||||
expect(apiResponse).to.have.keys('page', 'total', 'items', 'list');
|
expect(apiResponse).to.have.keys('page', 'total', 'items');
|
||||||
expect(apiResponse.total).to.eql(4);
|
expect(apiResponse.total).to.eql(4);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return 200 if the passed kuery is valid', async () => {
|
it('should return 200 if the passed kuery is valid', async () => {
|
||||||
await supertest
|
await supertest
|
||||||
.get(`/api/fleet/agent_status?kuery=fleet-agents.local_metadata.host.hostname:test`)
|
.get(`/api/fleet/agents?kuery=fleet-agents.local_metadata.host.hostname:test`)
|
||||||
.set('kbn-xsrf', 'xxxx')
|
.set('kbn-xsrf', 'xxxx')
|
||||||
.expect(200);
|
.expect(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return 200 also if the passed kuery does not have prefix fleet-agents', async () => {
|
it('should return 200 also if the passed kuery does not have prefix fleet-agents', async () => {
|
||||||
await supertest
|
await supertest
|
||||||
.get(`/api/fleet/agent_status?kuery=local_metadata.host.hostname:test`)
|
.get(`/api/fleet/agents?kuery=local_metadata.host.hostname:test`)
|
||||||
.set('kbn-xsrf', 'xxxx')
|
.set('kbn-xsrf', 'xxxx')
|
||||||
.expect(200);
|
.expect(200);
|
||||||
});
|
});
|
||||||
|
@ -181,7 +181,7 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
.get(`/api/fleet/agents?withMetrics=true`)
|
.get(`/api/fleet/agents?withMetrics=true`)
|
||||||
.expect(200);
|
.expect(200);
|
||||||
|
|
||||||
expect(apiResponse).to.have.keys('page', 'total', 'items', 'list');
|
expect(apiResponse).to.have.keys('page', 'total', 'items');
|
||||||
expect(apiResponse.total).to.eql(4);
|
expect(apiResponse.total).to.eql(4);
|
||||||
|
|
||||||
const agent1: Agent = apiResponse.items.find((agent: any) => agent.id === 'agent1');
|
const agent1: Agent = apiResponse.items.find((agent: any) => agent.id === 'agent1');
|
||||||
|
|
|
@ -262,7 +262,7 @@ export default function (providerContext: FtrProviderContext) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: '/api/fleet/agent-status',
|
path: '/api/fleet/agent_status',
|
||||||
scenarios: READ_SCENARIOS,
|
scenarios: READ_SCENARIOS,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -217,7 +217,6 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
results: {
|
results: {
|
||||||
events: 0,
|
events: 0,
|
||||||
other: 0,
|
other: 0,
|
||||||
total: 8,
|
|
||||||
online: 2,
|
online: 2,
|
||||||
active: 8,
|
active: 8,
|
||||||
all: 11,
|
all: 11,
|
||||||
|
@ -230,10 +229,6 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should work with deprecated api', async () => {
|
|
||||||
await supertest.get(`/api/fleet/agent-status`).set('kbn-xsrf', 'xxxx').expect(200);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should work with adequate package privileges', async () => {
|
it('should work with adequate package privileges', async () => {
|
||||||
await superTestWithoutAuth
|
await superTestWithoutAuth
|
||||||
.get(`/api/fleet/agent_status`)
|
.get(`/api/fleet/agent_status`)
|
||||||
|
@ -296,7 +291,6 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
results: {
|
results: {
|
||||||
events: 0,
|
events: 0,
|
||||||
other: 0,
|
other: 0,
|
||||||
total: 10,
|
|
||||||
online: 3,
|
online: 3,
|
||||||
active: 10,
|
active: 10,
|
||||||
all: 11,
|
all: 11,
|
||||||
|
|
|
@ -170,7 +170,7 @@ export default function (providerContext: FtrProviderContext) {
|
||||||
|
|
||||||
it('should not update tags of hosted agent', async () => {
|
it('should not update tags of hosted agent', async () => {
|
||||||
// move agent2 to policy2 to keep it regular
|
// move agent2 to policy2 to keep it regular
|
||||||
await supertest.put(`/api/fleet/agents/agent2/reassign`).set('kbn-xsrf', 'xxx').send({
|
await supertest.post(`/api/fleet/agents/agent2/reassign`).set('kbn-xsrf', 'xxx').send({
|
||||||
policy_id: 'policy2',
|
policy_id: 'policy2',
|
||||||
});
|
});
|
||||||
// update enrolled policy to hosted
|
// update enrolled policy to hosted
|
||||||
|
|
|
@ -1525,7 +1525,7 @@ export default function (providerContext: FtrProviderContext) {
|
||||||
|
|
||||||
it('enrolled in a hosted agent policy bulk upgrade should respond with 200 and object of results. Should not update the hosted agent SOs', async () => {
|
it('enrolled in a hosted agent policy bulk upgrade should respond with 200 and object of results. Should not update the hosted agent SOs', async () => {
|
||||||
// move agent2 to policy2 to keep it regular
|
// move agent2 to policy2 to keep it regular
|
||||||
await supertest.put(`/api/fleet/agents/agent2/reassign`).set('kbn-xsrf', 'xxx').send({
|
await supertest.post(`/api/fleet/agents/agent2/reassign`).set('kbn-xsrf', 'xxx').send({
|
||||||
policy_id: 'policy2',
|
policy_id: 'policy2',
|
||||||
});
|
});
|
||||||
// update enrolled policy to hosted
|
// update enrolled policy to hosted
|
||||||
|
|
|
@ -137,7 +137,7 @@ export default function (providerContext: FtrProviderContext) {
|
||||||
.set('kbn-xsrf', 'xxxx')
|
.set('kbn-xsrf', 'xxxx')
|
||||||
.expect(200);
|
.expect(200);
|
||||||
|
|
||||||
if (apiResponse.list.length === expectedAgentCount) {
|
if (apiResponse.items.length === expectedAgentCount) {
|
||||||
return apiResponse;
|
return apiResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,10 +45,6 @@ export default function (providerContext: FtrProviderContext) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should work with deprecated api', async () => {
|
|
||||||
await supertest.post(`/api/fleet/service-tokens`).set('kbn-xsrf', 'xxxx').expect(200);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create a valid remote service account token', async () => {
|
it('should create a valid remote service account token', async () => {
|
||||||
const { body: apiResponse } = await supertest
|
const { body: apiResponse } = await supertest
|
||||||
.post(`/api/fleet/service_tokens`)
|
.post(`/api/fleet/service_tokens`)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue