latestOpenAPI 3.0.32026-08-10152216352.3 KB

eea119b4113f

Workspace State

Restore state version

Restores a specific state version as the current state for the workspace

post/workspaces/{workspaceId}/state-versions/{stateVersionId}/actions/restore

Response

State version restored successfully

idstring

Unique identifier for a state version

serialinteger

State serial number (monotonically increasing)

terraformVersionstring nullable

Terraform version used to create this state version

createdAtstring date-time

Timestamp when the state version was created

createdBystring nullable

Owner/user who created this state version

downloadUrlstring uri nullable

Presigned URL for downloading the state file. May be null if the state file is not available.

Example response

{
  "id": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
  "serial": 42,
  "terraformVersion": "1.5.0",
  "createdAt": "2024-01-15T10:30:00Z",
  "createdBy": "user@example.com",
  "downloadUrl": "https://s3.amazonaws.com/bucket/path/to/state?X-Amz-Algorithm=..."
}