Skip to content

Take left-out concepts back in

POST
/datasets/{datasetId}/base/left-out:take
curl --request POST \
--url https://api.modeldesk.io/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/base/left-out:take \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "elementIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "draftHeadId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "changeRequestId": "example", "branchId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Makes a row of each named concept, as creating the dataset would have made it at the release the dataset is pinned to, and stages them as one change on your draft, opening it on the default branch if you hold none. Each concept must be one the scope holds without a row at the draft. Held to what any staged change is, draftHeadId compared first; answered as a staged change is, with the draft’s id in the Draft-Ref header.

datasetId
required
string format: uuid
Media typeapplication/json
object
elementIds
required
Array<string>
>= 1 items
draftHeadId
required

The draft head you believe you are editing; before a draft exists, the default branch’s head.

string format: uuid
changeRequestId
required

Your own key for the change, as a staged change carries one.

string
<= 200 characters
branchId

The branch the change is meant for, as a staged change names one.

string format: uuid

Example generated

{
"elementIds": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"draftHeadId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"changeRequestId": "example",
"branchId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

The draft as it stands after the change, and the rows it left not conforming

Media typeapplication/json

Where the draft stands after a change was staged or undone, and the rows that move left not conforming.

object
draft
required

One user’s private staging ref on a branch of the model. updatedAt is derived rather than stored: the newer of the draft’s creation and its head commit, so it moves with every staged change.

object
id
required

The draft’s ref id, which is also what ?ref= takes on the read routes.

string format: uuid
targetRefId
required

The branch the draft lands on.

string format: uuid
baselineCommitId
required

The target branch’s head the draft started from.

string format: uuid
headCommitId
required

The draft’s own head, equal to the baseline while nothing is staged.

string format: uuid
changeCount
required

How many changes are staged: the length of the draft’s chain from its head down to its baseline. Computed per read rather than stored, and 0 on a draft nothing has been staged into. A change is the undo grain, so five edits to one element count as five.

integer
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
movesBaseTo

For a dataset draft that moves the dataset to another release of its base, that release’s name; the dataset is pinned to it once the draft lands.

string
handoff

A draft’s most recent handoff for review, set by POST /models/{modelId}/draft/handoff. Absent on a draft never handed off. Neither a commit nor a staged change: it goes with the draft when the draft is committed or discarded, and a staged change, an undo or a rebase leaves it in place.

object
summary
required

The author’s own words about the draft. Written by whoever handed it off, often an agent, so a client renders it as plain text and never as markup.

string
<= 2000 characters
headCommitId
required

The draft head when it was handed off. A headCommitId on the draft other than this one means the draft changed after the handoff.

string format: uuid
at
required

When the draft was handed off.

string format: date-time
flagged

Row id to what is wrong with it. For a staged change, the written rows that do not conform; they were staged all the same. For an undo, the rows moved back onto a revision whose recorded verdict flags them. Absent when there are none.

object
key
additional properties

How a row stands against its dataset’s data schema. A row that does not conform is flagged and kept, never dropped: reference data arrives incomplete and is corrected in place.

object
valid

Whether no violation is an error. A row whose violations are all warnings is valid and still carries them.

boolean
violations

Absent when nothing is wrong with the row.

Array<object>

One way in which a row does not conform.

object
code
required
string
Allowed values: TOO_FEW_VALUES TOO_MANY_VALUES VALUE_NOT_IN_TYPE PROPERTY_NOT_DECLARED REFERENCE_TARGET_MISSING REFERENCE_DATASET_NOT_DECLARED REFERENCE_MODEL_NOT_DECLARED REFERENCE_TARGET_WRONG_TYPE REFERENCE_TARGET_NOT_SELECTABLE OTHER
propertyId

The schema property’s source element id — the same key the row’s own maps use, so a caller marks the offending cell without a lookup. Absent for a violation about the row itself. For a violation inside a part, the row’s column that holds the part, with path leading from there to the field.

string format: uuid
valueIndex

Which value of the property; absent when the violation is the property’s as a whole. For a violation inside a part, which value of the field path ends at.

integer
path

For a violation inside a part, the way from propertyId down to the field, outermost part first: contactpunt[2].email is one step, the part at index 1 and its property email. Absent for a violation of one of the row’s own fields.

Array<object>

One step of a violation’s way into a part: the part at a position among the parts of the property reached so far, and the property of that part the way goes on to.

object
index
required

The part’s position among that property’s parts, from 0.

integer
partId
required
string format: uuid
propertyId

The part’s property the way goes on to; absent where the violation is about the part.

string format: uuid
message
required
string
severity

How much the violation weighs; the row is kept and flagged either way. A value outside a code list is a WARNING unless the list is marked strict; everything else is an ERROR.

string
Allowed values: WARNING ERROR
inPlatformRefs

For a reference property, which of its lists the violation is about: true for its references to models, model elements and datasets (platformRefs), which valueIndex then counts in; false for its references to rows (refs) where that needs saying beside the other. Absent for its references to rows, as every violation from before the other list existed reads. Inside a part as at the row: beside path, it says which list of the field path ends at.

boolean

Example

{
"flagged": {
"additionalProperty": {
"violations": [
{
"code": "TOO_FEW_VALUES",
"severity": "WARNING"
}
]
}
}
}

The dataset was made from no base, or a concept named is not left out of its scope

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

Error

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}