Carry removed elements' data to live ones (spec 048)
curl --request POST \ --url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/carry-overs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "pairs": [ { "from": "example", "to": "example" } ], "batch_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Moves each pair’s label, inspections, plan rows and element events from the removed element to the live one in one transaction, and adds the live one to findings. A pair that would put two labels or two inspections with results on one element, or that is no longer valid, comes back refused with its code; the rest are carried. The removed element stays archived. Each carry-over comes in listCarryOvers. A repeat with the same Idempotency-Key and body returns the carry-overs the first call made and carries nothing again. A carry-over still running 25 seconds after the request arrived answers 400 VALIDATION_ERROR with the reason TIME_LIMIT in details and carries nothing: carry fewer pairs at a time.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The model’s id
Header Parameters
Section titled “Header Parameters”A repeat with the same key and body returns the first answer instead of writing again. Keys are per integration and project.
Request Bodyrequired
Section titled “Request Bodyrequired”object
from a removed element of the model, to a live one of its current version
A removed element and the live one its data goes to.
object
Groups the pairs for undoCarryOvers; default derived from the Idempotency-Key, or new
Example generated
{ "pairs": [ { "from": "example", "to": "example" } ], "batch_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Carried and refused pairs
object
One pair of a carry-over’s answer.
object
A pair’s status.
The tier of a carried pair: the proposal’s, or manual when the pair was not the proposal.
What moved to the new element. New counts may come.
object
Labels.
Inspections.
Placeholders.
Plan rows.
Plan scopes.
Viewpoints.
Element events.
Why a pair was refused.
What moved to the new element. New counts may come.
object
Labels.
Inspections.
Placeholders.
Plan rows.
Plan scopes.
Viewpoints.
Element events.
Example
{ "pairs": [ { "status": "carried", "tier": "varma", "code": "LABEL_ON_BOTH" } ]}Invalid body, parameters or Idempotency-Key
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Missing, malformed, expired or revoked token
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
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
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}No such project, model, model version or reference document
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}MODEL_BUSY: the model is being processed or carried; try again
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RESOURCE_DELETED: what this Idempotency-Key created has since been deleted; details.id names it
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}IDEMPOTENCY_KEY_REUSED: the key was used with another body
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RATE_LIMITED; wait for Retry-After seconds
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}UPLOAD_NOT_READY: try again in a moment
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}