Skip to content
Suomi

Take back carry-overs

POST
/v1/projects/{projectId}/models/{modelId}/carry-overs/undo
Code sample: Shell / cURL
curl --request POST \
--url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/carry-overs/undo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "carry_over_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "batch_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

By carry_over_ids or a whole batch_id. Moves back exactly what each carry-over moved; work recorded on the live element after it stays there and is counted in stayed. An undone carry-over is a change in listCarryOvers with undone_at. Undoing one again answers it refused with REMAP_STALE. An undo still running 25 seconds after the request arrived answers 400 VALIDATION_ERROR with the reason TIME_LIMIT in details and undoes nothing: undo fewer carry-overs at a time, by carry_over_ids.

projectId
required
string format: uuid
modelId
required
string format: uuid

The model’s id

Media typeapplication/json
object
carry_over_ids
Array<string>
>= 1 items <= 500 items
batch_id
string format: uuid

Example generated

{
"carry_over_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"batch_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Undone and refused carry-overs

Media typeapplication/json
object
carry_overs
required
Array<object>

One carry-over of an undo’s answer.

object
carry_over_id
required
string
from
required
string
to
required
string
status
required

An undo’s status.

string
Allowed values: undone refused
moved_back

What an undo moved back.

object
labels
integer format: int64
workflows
integer format: int64
plan_rows
integer format: int64
plan_scopes
integer format: int64
viewpoints
integer format: int64
element_events
integer format: int64
stayed

Work recorded on the new element after the carry-over; it stays there

integer format: int64
code

Why a pair was refused.

string
Allowed values: LABEL_ON_BOTH INSPECTION_ON_BOTH REMAP_STALE
totals
required

What an undo moved back.

object
labels
integer format: int64
workflows
integer format: int64
plan_rows
integer format: int64
plan_scopes
integer format: int64
viewpoints
integer format: int64
element_events
integer format: int64
stayed
required
integer format: int64

Example

{
"carry_overs": [
{
"status": "undone",
"code": "LABEL_ON_BOTH"
}
]
}

Invalid body, parameters or Idempotency-Key

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

Missing, malformed, expired or revoked token

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

INSUFFICIENT_SCOPE; INSUFFICIENT_PROJECT_ROLE when the project role the scopes give does not cover the write, or the project is not the integration’s; PUBLIC_API_DISABLED when the project’s owning organisation has turned the API off

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

No such project, model, model version or reference document

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

MODEL_BUSY

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

IDEMPOTENCY_KEY_REUSED: the key was used with another body

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RATE_LIMITED; wait for Retry-After seconds

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}