Skip to content

Create a tenant import request from verified uploads

POST
/api/admin/tenant-backups/imports
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/tenant-backups/imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "idempotencyKey": "example", "selection": { "settings": true, "users": true, "admin": true, "artifacts": true, "logs": { "audit": true, "other": true, "sensitive": true, "period": 7 } }, "source": { "tenantId": "example", "issuer": "https://example.com", "productVersion": "example" }, "uploadIds": [ "example" ] }'

Requires backup read, manage, and import permissions plus fresh human administrator authentication. The client reads the source identity from the locally decrypted manifest; the server fixes the target tenant and product version, then requires the authenticated uploaded manifest to match that source identity. One to 32 completed uploads are atomically pinned by R2 key, version, ETag, size, and SHA-256 digest. The operation waits for the administrator to submit the bundle content key before validation or staging begins.

Media type application/json
object
idempotencyKey
required
string
/^[A-Za-z0-9_.:-]{1,256}$/
selection
required
object
settings
required
boolean
users
required
boolean
admin
required
boolean
artifacts
required
boolean
logs
required
object
audit
required
boolean
other
required
boolean
sensitive
required
boolean
period
required
One of:
integer
Allowed values: 7 30 90
key
additional properties
key
additional properties
source
required
object
tenantId
required
string
/^[A-Za-z0-9_.:-]{1,256}$/
issuer
required
string format: uri
<= 2048 characters
productVersion
required
string
/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?(?:\+[A-Za-z0-9.-]+)?$/
key
additional properties
uploadIds
required
Array<string>
>= 1 items <= 32 items unique items
key
additional properties

The durable import request exists and waits for its content key.

Media type application/json
object
id
required
string
kind
required
string
Allowed value: import
state
required
string
Allowed value: waiting
phase
required
string
Allowed value: unlock
revision
required
integer
key
additional properties
Example
{
"kind": "import",
"state": "waiting",
"phase": "unlock"
}

Invalid selection

Missing permission or fresh administrator authentication

Upload ownership

The request body exceeds 32768 bytes

Import storage