Update the API key of the Entity Store tasks Generally available

POST /api/security/entity_store/update_api_key

Spaces method and path for this operation:

post /s/{space_id}/api/security/entity_store/update_api_key

Refer to Spaces for more information.

Replace the API key of every Entity Store background task with one owned by the user making this request, for example after the user who installed the Entity Store is removed. The tasks keep their schedules and state, and no entity data is changed. The user needs the same privileges as the install endpoint. Tasks that could not be updated are listed in failed; call the endpoint again to retry them.

[Required authorization] Route required privileges: securitySolution.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

object object

Additional properties are NOT allowed.

Responses

  • 200 application/json

    Indicates that the request was processed. Check ok and failed to see whether every task was updated.

POST /api/security/entity_store/update_api_key
curl -X POST -H "kbn-xsrf: true" -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "${KIBANA_URL}/api/security/entity_store/update_api_key"
POST kbn://api/security/entity_store/update_api_key
{}
Request example
Re-grant the API key of every Entity Store task as the user making the request.
{}
Response examples (200)
Call the endpoint again to retry the tasks listed in `failed`.
{
  "failed": [
    {
      "id": "entity_store:v2:status_report_task:default",
      "message": "Version conflict",
      "statusCode": 409
    }
  ],
  "ok": false,
  "updated": [
    "entity_store:v2:history_snapshot_task:default"
  ]
}
Every Entity Store task now runs with an API key owned by the caller.
{
  "failed": [],
  "ok": true,
  "updated": [
    "entity_store:v2:history_snapshot_task:default",
    "entity_store:v2:status_report_task:default"
  ]
}