Migrate Database

This operation migrates a local database. A RemoteDb returns 400; call the migration endpoint on its owning AgentOS instead. When target_version is supplied, the session-table version determines whether the manager upgrades or downgrades. Review the target and take a restorable backup before calling it. See Database Migrations.

POST/databases/{db_id}/migrate

Migrate the given database schema to the given target version. If a target version is not provided, the database will be migrated to the latest version.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

db_id*Db Id

Query Parameters

target_version?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl --request POST 'https://example.com/databases/string/migrate'
{  "message": "Database migrated successfully to version 3.0.0"}