Skip to main content
POST
/
v1
/
workflows
/
blocks
/
versions
/
{block_version_id}
/
restore
Restore Block Version
curl --request POST \
  --url https://api.retab.com/v1/workflows/blocks/versions/{block_version_id}/restore \
  --header 'Api-Key: <api-key>'
{
  "id": "<string>",
  "workflow_id": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "label": "",
  "position_x": 0,
  "position_y": 0,
  "width": 123,
  "height": 123,
  "config": {},
  "parent_id": "<string>",
  "declarative_path": "<string>",
  "declarative_source_block_id": "<string>",
  "resolved_schemas": {}
}
Restore a workflow block version into the current workflow draft.
Python
block_version_id = "bkv_abc123"
print(block_version_id)
TypeScript
const blockVersionId = "bkv_abc123";
console.log(blockVersionId);
Go
blockVersionID := "bkv_abc123"
_ = blockVersionID
Java
String blockVersionId = "bkv_abc123";
System.out.println(blockVersionId);
cURL
curl -X POST "https://api.retab.com/v1/workflows/blocks/versions/bkv_abc123/restore?workflow_id=wf_abc123" \
  -H "Api-Key: $RETAB_API_KEY"

Authorizations

Api-Key
string
header
required

Path Parameters

block_version_id
string
required

Response

Successful Response

Public live workflow block object.

id
string
required
workflow_id
string
required

Foreign key to workflow

type
enum<string>
required

Block type (extract, parse, classifier, etc.)

Available options:
start_document,
start_json,
note,
parse,
edit,
extract,
split,
classifier,
conditional,
api_call,
function,
while_loop,
for_each,
merge_dicts,
while_loop_sentinel_start,
while_loop_sentinel_end,
for_each_sentinel_start,
for_each_sentinel_end
updated_at
string<date-time>
required
label
string
default:""

Display label for the block

position_x
number
default:0

X position on canvas

position_y
number
default:0

Y position on canvas

width
number | null

Block width for resizable blocks

height
number | null

Block height for resizable blocks

config
Config · object

Block-specific configuration

parent_id
string | null

ID of parent container (while_loop, for_each)

declarative_path
string | null

Canonical declarative block path used to reconcile imported specs.

declarative_source_block_id
string | null

Authored declarative block id before import-time id regeneration.

resolved_schemas
Resolved Schemas · object

Schemas resolved for this block from the workflow graph.