Skip to main content
POST
Clone a procedure to the workspace
Drafts a workspace copy of a built-in or marketplace procedure’s latest active version, as Console’s clone does. The copy is a new family (<origin>-copy, then -copy-2, …) at version 1.0.0, a draft with source.clonedFrom provenance, for the Procedure Builder to refine. The origin never changes, and the copy reaches dispatch only through finalize, validation, judging and approval. The answer is 201 with the copy’s procedureId, version and clonedFromVersion.

Who may clone, and where the copy lives

  • The origin must be one you read (procedures:read at its home); otherwise 404 resource_missing. Built-in procedures are homed at the platform scope.
  • The copy is homed at owningOrgUnitId. Without it, an External App’s copy is homed at the app’s own owning unit; a Personal key or platform key must name one (400 bad_request otherwise).
  • You need procedures:write at that home (403 naming it otherwise). The copy is created and audited (procedure_cloned_to_workspace) with you as the actor.
An origin with no active version is 409 invalid_state. An origin that is already a workspace procedure (refine it instead), and an origin with too many copies, are 409 conflict.

Idempotency

Each call makes a new copy. With an Idempotency-Key, a same-key repeat within 24 hours returns the recorded copy, without making another, only while you still hold procedures:write at the copy’s home; otherwise 409 idempotency_result_unavailable.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Headers

Idempotency-Key
string

Optional logical intent key. A same-key retry within 24 hours returns the recorded result without writing again.

Required string length: 1 - 255

Path Parameters

procedureId
string
required

The built-in or marketplace procedure to copy.

Minimum string length: 1

Body

application/json
owningOrgUnitId
string

The org unit the copy is homed at. Required for a Personal key or platform key; an External App defaults to its own owning unit.

Minimum string length: 1

Response

Success

data
object
required

The workspace copy: a new family (<origin>-copy, -copy-2, …) at version 1.0.0 as a draft, homed at the chosen unit.

meta
object
required