Skip to content

Start a realm export

POST
/clusters/{cluster_id}/realms/{realm}/exports
curl --request POST \
  --url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/example/exports \
  --header 'API-Key: <API-Key>' \
  --header 'API-Version: 2026-06-01.beta' \
  --header 'Content-Type: application/json' \
  --data '{ "scope": "full", "encryption_password": "a-strong-passphrase" }'

Queues an encrypted export of a single realm (configuration, users, and all credentials). Generated asynchronously by a server-side kc.sh export; poll GET /realm-exports/{export_id} until status is completed, then download from download_url before expires_at. Skycloak does not retain the artifact past expires_at.

Required scope: clusters:exports:write

cluster_id
required
string format: uuid
realm
required
string
API-Version
required
string
Allowed values: 2026-06-01.beta
Media typeapplication/json
object
scope

Export scope. Only full is currently supported.

string
Allowed values: full
encryption_password
required

Password used to encrypt the archive (AES-256-CBC, PBKDF2). Required: every realm export contains credentials. Never stored; only a hash is retained for verification.

string
>= 8 characters <= 128 characters

Example

{
  "scope": "full",
  "encryption_password": "a-strong-passphrase"
}

Returned when a realm export has been accepted for processing. Poll the resource until status is completed or failed, then download from download_url.

Media typeapplication/json
object
id
required
string format: uuid
cluster_id
required
string format: uuid
realm
required

The exported realm’s name (Keycloak realm id).

string
scope
required
string
Allowed values: full
status
required
string
Allowed values: pending processing completed failed
progress
required

Percent complete, 0-100.

integer
source_version

Keycloak version that produced the export. An import target must run this version or newer. Only set once status is completed.

string
nullable
sha256_checksum

SHA-256 checksum of the produced encrypted archive (hex). Only set once status is completed.

string
nullable
download_url

Time-limited presigned URL to download the encrypted archive. Only set when status is completed and expires_at is in the future. Skycloak does not retain the artifact past expires_at.

string format: uri
nullable
expires_at

When the archive is deleted from storage (24h after completion).

string format: date-time
nullable
error_message

Failure description. Only set when status is failed.

string
nullable
created_at
required
string format: date-time
completed_at
string format: date-time
nullable

Example

{
  "id": "5fa3e1a0-2c9b-4d2f-9b3a-1e8c4d2f9b3a",
  "cluster_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "realm": "cust-brasilia",
  "scope": "full",
  "status": "completed",
  "progress": 100,
  "source_version": "26.6.1",
  "sha256_checksum": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "download_url": "https://exports.skycloak.io/.../cust-brasilia.zip.enc?X-Amz-Signature=...",
  "expires_at": "2026-07-20T14:15:00Z",
  "error_message": null,
  "created_at": "2026-07-19T14:00:00Z",
  "completed_at": "2026-07-19T14:12:00Z"
}
Location
required
string format: uri

URL of the resource being created or modified. Poll this endpoint to track completion.

Retry-After
integer

The server could not understand the request due to invalid syntax.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Access is unauthorized.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Client error

Media typeapplication/problem+json

Returned when a workspace plan quota would be exceeded. required_plan indicates the minimum plan needed to complete the request.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri
current_plan
required
string
required_plan
required
string
code

Machine-readable identifier of the quota that was hit, so a client can tell quotas apart without parsing detail. Known values include cluster_limit (the workspace’s total cluster allowance), cluster_size_quota (the allowance for the requested cluster size) and cluster_size (the requested size is not offered on the plan at all). New values may be added.

string
current_usage

How many of the resource the workspace currently has.

integer
current_limit

Maximum allowed by the current plan. 0 means the plan does not include the resource at all.

integer

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com",
  "current_plan": "example",
  "required_plan": "example",
  "code": "example",
  "current_usage": 1,
  "current_limit": 1
}

Access is forbidden.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

The server cannot find the requested resource.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Client error

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri
errors
required
Array<object>
>= 1 items
object
field
required
string
detail
required
string
code
string
value

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com",
  "errors": [
    {
      "field": "example",
      "detail": "example",
      "code": "example",
      "value": "example"
    }
  ]
}

Client error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}
Retry-After
integer
RateLimit-Limit
integer
RateLimit-Remaining
integer
RateLimit-Reset
integer
X-RateLimit-Limit-Second
integer
X-RateLimit-Remaining-Second
integer
X-RateLimit-Limit-Minute
integer
X-RateLimit-Remaining-Minute
integer
X-RateLimit-Limit-Hour
integer
X-RateLimit-Remaining-Hour
integer
X-RateLimit-Limit-Day
integer
X-RateLimit-Remaining-Day
integer

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}