Declare a model dependency
const url = 'https://api.modeldesk.io/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/model-dependencies';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"modelId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","versionRef":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.modeldesk.io/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/model-dependencies \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "modelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "versionRef": "example" }'Declares a model this dataset’s rows may point into, or at an element of which they may point, at the state the pin names, or moves the pin of one already declared. A reference to a model or to one of its elements is read at this pin, and is refused until its model is declared here. The model must share this dataset’s owner and be one the caller can read. Unlike a dataset dependency, an omitted versionRef pins the model’s latest release, and its working copy (@HEAD) while it has none. A pin that is added or moves has every row on the branch judged again before the answer, and the answer’s entriesChecked says what that found; a pin left where it was writes nothing and judges nothing. The commit that records the change names the model and the version now used, such as Now refers to Gemeenten, release 1.0, and never an id. Refused with a 409 in an environment that does not write platform references yet.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”The branch to change, or main when omitted. Each branch stands on its own pins.
Request Body
Section titled “Request Body”Declaring, or moving, a model this dataset’s rows may point into. Naming a model already declared moves its pin rather than adding a second entry.
object
Name one of the model’s releases, or send @HEAD to snapshot its working copy. Omit for its latest release, and its working copy while it has none.
Example generated
{ "modelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "versionRef": "example"}Responses
Section titled “Responses”OK
object
object
USER is a person, MACHINE a service account, and SYSTEM the platform itself, whose commits (metamodel seeding and re-pins) the commit log hides unless asked for them.
The display name, where one is known: a person’s from their account, a service account’s as stored with what it wrote. Left out for the platform and for a person whose account holds no name.
Who inside the owning organization may reach a model. Optional on creation and update: a creation that omits it takes the owner organization’s default access mode (falling back to SHARED).
object
The backing model’s metamodel, denormalized; a seat is held per metamodel.
The state of a model a dataset takes its shape from: a release, or a snapshot of the model’s working copy at a commit. The name is what an author picks; the version and commit are what it resolved to when the pin was written.
object
A release name, or @HEAD for a snapshot of the working copy.
The release the name resolved to; absent for a snapshot of the working copy.
The data entity type of the backing release’s schema whose entries this dataset holds.
The text property of the data entity type, declared on it or a supertype, that names an entry wherever it is shown from outside its own row. Absent when none is set.
The absolute IRI the entries are given IRIs under when they are written as RDF. Absent when none is set, in which case they are given IRIs under urn:modeldesk:dataset:{id}/.
The text property of the data entity type, declared on it or a supertype, whose value an entry’s IRI is made from. Absent to make it from the type’s identity. Kept when the dataset moves to a release that no longer declares it, whose entries are then given the IRIs made from the identity.
Whether the dataset and its entries are shown in the organization’s public catalog. Alone it publishes nothing: a dataset is publicly visible once it also has a release, is shared, and its organization publishes (a slug, an active subscription and the catalog feature).
What a dataset is to the public catalog, which picks its public pages: a value list is one table with a page per value; metadata records are descriptions. Absent, or a value a client does not know, reads as VALUE_LIST.
The text property that sums up an entry on the public pages, shown as the definition on a value list’s. Absent to take the default. Kept when the dataset moves to a version that no longer declares it, where the default applies.
The value property a value list’s public pages show an entry by as its code. Absent to take the default. Kept when the dataset moves to a version that no longer declares it, where the default applies.
What a dataset made from a begrippenkader or another concept model was made from: a scope its binding offers and the element picked for it. The release is the dataset’s backing pin. Absent on a dataset made from no base.
object
Which rows a value may point at, unless a row says otherwise.
The namespaces the release the dataset is pinned to declares, by which a value that is an IRI in one of them is shown as prefix:localName. Taken when the dataset is made and again when it moves; the values themselves stay full IRIs.
object
A dataset this dataset’s rows may reference, pinned as @HEAD or a release name. The version and commit are what the selector resolved to when the pin was written; versionId is absent for a @HEAD pin, because a working head is not a release.
object
The @HEAD dependencies, by dataset id, whose target has written or removed an entry on its main since the commit pinned, so that moving the pin would take those changes in. Said only by the read of one dataset, and absent when no pin is behind.
The models this dataset’s rows may point into, each at the state a reference to it or to one of its elements is read at. Absent when none is declared.
A model this dataset’s rows may point into, pinned as @HEAD (a snapshot of its working copy) or a release name. The version and commit are what the selector resolved to when the pin was written; versionId is absent for a @HEAD pin.
object
The model dependencies, by model id, that a newer state of their model has passed: a release made after the one pinned, or for a @HEAD pin a head moved since or a release cut where the pin stands. Said only by the read of one dataset, and absent when no pin is behind.
Whether the entries of the branch read are still to be judged against the pins it stands on: a change of its dependencies or of its backing release was recorded, by a change of either or by a merge, and the judging after it did not finish, or judged pins that had moved on by its end. A branch made from such a branch says so too, and a release made while main does records no backing version. POST /datasets/{datasetId}/rows:check judges them. Said only by the read of one dataset, and absent when every entry stands judged.
Whether the backend that answered writes the parts an entry holds inside itself; where it does not, a client shows such a property as references. Every current backend writes them, so the read of one dataset always says true. Said only by the read of one dataset.
What judging the entries of the branch again found, on the answer to a change of a dataset or a model its entries refer to: how many no longer fit, and which of those fitted before. A change that left the versions as they were and judged nothing answers with nothing found. Absent everywhere else, and from a backend that does not answer it.
object
The first few rows that do not conform, at most twenty of them.
How many rows conform but carry warnings, such as a value outside a list that is not strict.
How many of the rows that do not conform conformed before the pass, or carried no verdict. A row that did not conform before either is not counted, whatever else the pass found wrong with it. Absent from a backend that does not tell them apart.
The first few of the rows counted in rowsNewlyFlagged, at most twenty of them.
Example
{ "owner": { "type": "USER" }, "accessMode": "SHARED", "resourceKind": "VALUE_LIST", "base": { "levels": "ALL" }}The model belongs to a different owner
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}Not authorized to update this dataset, or to read the model
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}Dataset, model or named release not found
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}This environment does not write platform references yet, or the dataset kept changing while the pin was written
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}default
Section titled “default”Error
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}