Spaces method and path for this operation:
post /s/{space_id}/api/detection_engine/signals/finalize_migration
Refer to Spaces for more information.
DEPRECATED. Completes a legacy alert index migration. Do not automate against this in new code. WARNING: Finalizing swaps read aliases; confirm the migration has finished successfully before calling.
Finalize successful migrations of detection alerts. This replaces the original index's alias with the successfully migrated index's alias. The endpoint is idempotent, so you can poll until a migration finishes and then call this operation once.
POST
/api/detection_engine/signals/finalize_migration
curl \
--request POST 'https://localhost:5601/api/detection_engine/signals/finalize_migration' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"migration_ids":["924f7c50-505f-11eb-ae0a-3fa2e626a51d"]}'
Request example
{
"migration_ids": [
"924f7c50-505f-11eb-ae0a-3fa2e626a51d"
]
}
Response examples (200)
{
"migrations": [
{
"completed": true,
"destinationIndex": ".siem-signals-default-000002-r000016",
"id": "924f7c50-505f-11eb-ae0a-3fa2e626a51d",
"sourceIndex": ".siem-signals-default-000002",
"status": "success",
"updated": "2021-01-06T22:05:56.859Z",
"version": 16
}
]
}
Response examples (400)
{
"error": "Bad Request",
"message": "[request body].migration_ids: at least one migration id is required to finalize",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
"statusCode": 401
}
Response examples (500)
{
"message": "Internal Server Error",
"status_code": 500
}