Create a record set
const url = 'https://api.modeldesk.io/datasets/record-set';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"owner":{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","type":"USER","name":"example"},"accessMode":"SHARED","backingModelId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","backingModelVersion":"example","datasets":[{"dataEntityTypeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","existingDependencies":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"namedBy":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}]}'};
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/record-set \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "owner": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "type": "USER", "name": "example" }, "accessMode": "SHARED", "backingModelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "backingModelVersion": "example", "datasets": [ { "dataEntityTypeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "existingDependencies": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "namedBy": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] }'Creates one dataset per picked data entity type of one backing model, all pinned to the same release (or to the working copy with @HEAD), checked as creating each on its own would check it. Each dataset declares, at its working head, every other dataset of the set its rows can reference: one whose type a reference of its type targets, or whose type is a subtype of a targeted type. A reference to its own type, a containment reference, a reference through a code list and a reference to a type held by the platform declare nothing in the set. The existing datasets each one names are declared at their working heads, refused as declaring a dependency refuses them. The datasets are created in one transaction, so a refusal anywhere leaves none of them behind, and each starts with one commit, which holds all of its dependencies.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”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).
The name of the backing model release every dataset pins, or @HEAD to pin a snapshot of its working copy at its head commit.
The datasets to create, in the order the response lists them; each type at most once.
object
Existing datasets this one’s rows may reference, each declared at its working head. They must share the owner and be readable by the caller.
The text property of the type, declared on it or a supertype, that names the dataset’s entries, refused as a dataset update refuses one that holds no text. Absent leaves it unset, so the first text property outside the identity names them.
Responses
Section titled “Responses”Created
object
The created datasets, in request order, each with the dependencies it declares.
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
{ "datasets": [ { "owner": { "type": "USER" }, "accessMode": "SHARED", "resourceKind": "VALUE_LIST", "base": { "levels": "ALL" } } ]}No dataset named, more than 50, a blank name, a type named twice, a type the release’s data schema does not declare or declares as held by the platform, or an existing dependency of another 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 an owner candidate, or no active seat on the backing metamodel
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" } ]}Backing model, release or an existing dependency 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" } ]}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" } ]}