Skip to main content
POST
/
api
/
v1
/
admin
/
migration
/
start
Inicia uma migração de schema
curl --request POST \
  --url https://services.pref.rio/app-busca-search/api/v1/admin/migration/start \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "schema_version": "<string>",
  "async": true,
  "dry_run": true
}
'
{
  "backup_collection": "<string>",
  "completed_at": 123,
  "error_message": "<string>",
  "is_locked": true,
  "migrated_documents": 123,
  "progress": 123,
  "schema_version": "<string>",
  "source_collection": "<string>",
  "started_at": 123,
  "started_by": "<string>",
  "status": "idle",
  "target_collection": "<string>",
  "total_documents": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Dados da migração

schema_version
string
required
async
boolean

Se true, executa em background (para API)

dry_run
boolean

Response

OK

backup_collection
string
completed_at
integer
error_message
string
is_locked
boolean
migrated_documents
integer
progress
number
schema_version
string
source_collection
string
started_at
integer
started_by
string
status
enum<string>
Available options:
idle,
in_progress,
completed,
failed,
rollback
target_collection
string
total_documents
integer