Skip to content

Commit eebeab1

Browse files
Enable enableAgentRollback feature flag (#249416)
## Summary Make `enableAgentRollback` feature flag `true` by default. Implementation PR: #247398 Backport to 9.3: #249250 ### Identify risks Agent rollback is mostly insulated from other existing flows: low probability risk of affecting agent actions menus in Fleet UI. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
1 parent d076c70 commit eebeab1

File tree

7 files changed

+976
-2
lines changed

7 files changed

+976
-2
lines changed

oas_docs/bundle.json

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23386,6 +23386,150 @@
2338623386
]
2338723387
}
2338823388
},
23389+
"/api/fleet/agents/bulk_rollback": {
23390+
"post": {
23391+
"description": "Rollback multiple agents to the previous version.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all.",
23392+
"operationId": "post-fleet-agents-bulk-rollback",
23393+
"parameters": [
23394+
{
23395+
"description": "A required header to protect against CSRF attacks",
23396+
"in": "header",
23397+
"name": "kbn-xsrf",
23398+
"required": true,
23399+
"schema": {
23400+
"example": "true",
23401+
"type": "string"
23402+
}
23403+
}
23404+
],
23405+
"requestBody": {
23406+
"content": {
23407+
"application/json": {
23408+
"examples": {
23409+
"bulkRollbackAgentsRequest": {
23410+
"value": {
23411+
"agents": [
23412+
"agent-1",
23413+
"agent-2"
23414+
],
23415+
"batchSize": 100,
23416+
"includeInactive": false
23417+
}
23418+
}
23419+
},
23420+
"schema": {
23421+
"additionalProperties": false,
23422+
"properties": {
23423+
"agents": {
23424+
"anyOf": [
23425+
{
23426+
"items": {
23427+
"type": "string"
23428+
},
23429+
"maxItems": 10000,
23430+
"type": "array"
23431+
},
23432+
{
23433+
"type": "string"
23434+
}
23435+
]
23436+
},
23437+
"batchSize": {
23438+
"type": "number"
23439+
},
23440+
"includeInactive": {
23441+
"default": false,
23442+
"type": "boolean"
23443+
}
23444+
},
23445+
"required": [
23446+
"agents"
23447+
],
23448+
"type": "object"
23449+
}
23450+
}
23451+
}
23452+
},
23453+
"responses": {
23454+
"200": {
23455+
"content": {
23456+
"application/json": {
23457+
"examples": {
23458+
"successResponse": {
23459+
"value": {
23460+
"actionIds": [
23461+
"actionId1",
23462+
"actionId2"
23463+
]
23464+
}
23465+
}
23466+
},
23467+
"schema": {
23468+
"additionalProperties": false,
23469+
"properties": {
23470+
"actionIds": {
23471+
"items": {
23472+
"type": "string"
23473+
},
23474+
"maxItems": 10000,
23475+
"type": "array"
23476+
}
23477+
},
23478+
"required": [
23479+
"actionIds"
23480+
],
23481+
"type": "object"
23482+
}
23483+
}
23484+
},
23485+
"description": "OK: A successful request."
23486+
},
23487+
"400": {
23488+
"content": {
23489+
"application/json": {
23490+
"examples": {
23491+
"badRequestResponse": {
23492+
"value": {
23493+
"message": "Bad Request"
23494+
}
23495+
}
23496+
},
23497+
"schema": {
23498+
"additionalProperties": false,
23499+
"description": "Generic Error",
23500+
"properties": {
23501+
"attributes": {},
23502+
"error": {
23503+
"type": "string"
23504+
},
23505+
"errorType": {
23506+
"type": "string"
23507+
},
23508+
"message": {
23509+
"type": "string"
23510+
},
23511+
"statusCode": {
23512+
"type": "number"
23513+
}
23514+
},
23515+
"required": [
23516+
"message",
23517+
"attributes"
23518+
],
23519+
"type": "object"
23520+
}
23521+
}
23522+
},
23523+
"description": "A bad request."
23524+
}
23525+
},
23526+
"summary": "Bulk rollback agents",
23527+
"tags": [
23528+
"Elastic Agent actions"
23529+
],
23530+
"x-state": "Technical Preview; added in 9.4.0"
23531+
}
23532+
},
2338923533
"/api/fleet/agents/bulk_unenroll": {
2339023534
"post": {
2339123535
"description": "[Required authorization] Route required privileges: fleet-agents-all.",
@@ -26052,6 +26196,120 @@
2605226196
]
2605326197
}
2605426198
},
26199+
"/api/fleet/agents/{agentId}/rollback": {
26200+
"post": {
26201+
"description": "Rollback an agent to the previous version.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all.",
26202+
"operationId": "post-fleet-agents-agentid-rollback",
26203+
"parameters": [
26204+
{
26205+
"description": "A required header to protect against CSRF attacks",
26206+
"in": "header",
26207+
"name": "kbn-xsrf",
26208+
"required": true,
26209+
"schema": {
26210+
"example": "true",
26211+
"type": "string"
26212+
}
26213+
},
26214+
{
26215+
"description": "The agent ID to rollback",
26216+
"in": "path",
26217+
"name": "agentId",
26218+
"required": true,
26219+
"schema": {
26220+
"type": "string"
26221+
}
26222+
}
26223+
],
26224+
"responses": {
26225+
"200": {
26226+
"content": {
26227+
"application/json": {
26228+
"examples": {
26229+
"successResponse": {
26230+
"value": {
26231+
"actionId": "actionId"
26232+
}
26233+
}
26234+
},
26235+
"schema": {
26236+
"anyOf": [
26237+
{
26238+
"additionalProperties": false,
26239+
"properties": {
26240+
"actionId": {
26241+
"type": "string"
26242+
}
26243+
},
26244+
"required": [
26245+
"actionId"
26246+
],
26247+
"type": "object"
26248+
},
26249+
{
26250+
"additionalProperties": false,
26251+
"properties": {
26252+
"message": {
26253+
"type": "string"
26254+
}
26255+
},
26256+
"required": [
26257+
"message"
26258+
],
26259+
"type": "object"
26260+
}
26261+
]
26262+
}
26263+
}
26264+
},
26265+
"description": "OK: A successful request."
26266+
},
26267+
"400": {
26268+
"content": {
26269+
"application/json": {
26270+
"examples": {
26271+
"badRequestResponse": {
26272+
"value": {
26273+
"message": "Bad Request"
26274+
}
26275+
}
26276+
},
26277+
"schema": {
26278+
"additionalProperties": false,
26279+
"description": "Generic Error",
26280+
"properties": {
26281+
"attributes": {},
26282+
"error": {
26283+
"type": "string"
26284+
},
26285+
"errorType": {
26286+
"type": "string"
26287+
},
26288+
"message": {
26289+
"type": "string"
26290+
},
26291+
"statusCode": {
26292+
"type": "number"
26293+
}
26294+
},
26295+
"required": [
26296+
"message",
26297+
"attributes"
26298+
],
26299+
"type": "object"
26300+
}
26301+
}
26302+
},
26303+
"description": "A bad request."
26304+
}
26305+
},
26306+
"summary": "Rollback an agent",
26307+
"tags": [
26308+
"Elastic Agent actions"
26309+
],
26310+
"x-state": "Technical Preview; added in 9.4.0"
26311+
}
26312+
},
2605526313
"/api/fleet/agents/{agentId}/unenroll": {
2605626314
"post": {
2605726315
"description": "[Required authorization] Route required privileges: fleet-agents-all.",

0 commit comments

Comments
 (0)