Review your dataset draft's changes
const url = 'https://api.modeldesk.io/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/draft/diff?offset=0&limit=100';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.modeldesk.io/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/draft/diff?offset=0&limit=100' \ --header 'Authorization: Bearer <token>'What the caller’s own draft has staged, as a row diff of its head against the baseline it started from, with one page of the rows it touched as they stood and as the draft holds them, as a commit’s diff carries them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”How many touched rows to skip before the page.
How many touched rows the page holds.
Responses
Section titled “Responses”OK
What one commit changed against its parent, by row: the ids of every row it touched, and one page of those rows with both sides. The pages run over every touched row in row id order. A row that changed twice and came back to where it started shows in none of the three lists.
object
Absent for the first commit of a dataset.
How many rows the diff added, changed and removed, over all its pages.
object
Where the page starts among all touched rows.
One row on both sides of a diff, whole: a reader names it by its naming column and shows the reason it gives beside a changed column, neither of which a change need touch.
object
The row before; absent for a row the commit added.
object
The row’s stable identity, minted once and surviving every edit.
Value-property source element id to the terms the row holds for it.
object
Reference-property source element id to the rows it points at.
object
A pointer to a row, in this dataset or in one this dataset declares a dependency on.
object
Reference-property source element id to the models, model elements and datasets it points at, for a property whose target type is represented by things the platform holds. Such a property holds these and never row references. Absent when the row holds none. A write that leaves platformRefs out keeps the ones the row holds, as a client that knows nothing of them writes every row; one that sends {} clears them. The two fields are told apart each on its own.
object
A pointer to a thing the platform holds: a model, an element of a model, or a dataset. A model or element is read at the state the dataset pins the model at; a dataset as it stands.
object
The model, for a model or an element; the dataset, for a dataset.
The element of the model; present exactly for an ELEMENT.
Containment-property source element id to the parts the row holds inside itself, for a property whose target type has no identity of its own (a contact point, a period). Such a property holds parts and never row references. Absent when the row holds none. A write that leaves parts out keeps the parts the row holds, as a client that knows nothing of parts writes every row; one that sends it, empty included, leaves the row holding what it sent.
object
One part a row holds inside itself: an occurrence of a containment property whose target type has no identity of its own. Its maps are keyed as a row’s are, and it holds parts of its own to whatever depth the model nests them.
object
The part’s identity inside its row, so a change to one part is told from a change to another. Send it back unchanged on every write of the row; a part written without one gets a new one, and two parts of one row under one id are a 400.
Value-property source element id to the terms the part holds for it.
object
Reference-property source element id to the rows it points at.
object
A pointer to a row, in this dataset or in one this dataset declares a dependency on.
object
Reference-property source element id to the models, model elements and datasets the part points at, for a property whose target type is represented by things the platform holds. A part is written whole, so a part sent without them holds none. Absent when the part holds none.
object
A pointer to a thing the platform holds: a model, an element of a model, or a dataset. A model or element is read at the state the dataset pins the model at; a dataset as it stands.
object
The model, for a model or an element; the dataset, for a dataset.
The element of the model; present exactly for an ELEMENT.
Containment-property source element id to the parts this part holds.
object
The row after; absent for a row the commit removed.
object
The row’s stable identity, minted once and surviving every edit.
Value-property source element id to the terms the row holds for it.
object
Reference-property source element id to the rows it points at.
object
A pointer to a row, in this dataset or in one this dataset declares a dependency on.
object
Reference-property source element id to the models, model elements and datasets it points at, for a property whose target type is represented by things the platform holds. Such a property holds these and never row references. Absent when the row holds none. A write that leaves platformRefs out keeps the ones the row holds, as a client that knows nothing of them writes every row; one that sends {} clears them. The two fields are told apart each on its own.
object
A pointer to a thing the platform holds: a model, an element of a model, or a dataset. A model or element is read at the state the dataset pins the model at; a dataset as it stands.
object
The model, for a model or an element; the dataset, for a dataset.
The element of the model; present exactly for an ELEMENT.
Containment-property source element id to the parts the row holds inside itself, for a property whose target type has no identity of its own (a contact point, a period). Such a property holds parts and never row references. Absent when the row holds none. A write that leaves parts out keeps the parts the row holds, as a client that knows nothing of parts writes every row; one that sends it, empty included, leaves the row holding what it sent.
object
One part a row holds inside itself: an occurrence of a containment property whose target type has no identity of its own. Its maps are keyed as a row’s are, and it holds parts of its own to whatever depth the model nests them.
object
The part’s identity inside its row, so a change to one part is told from a change to another. Send it back unchanged on every write of the row; a part written without one gets a new one, and two parts of one row under one id are a 400.
Value-property source element id to the terms the part holds for it.
object
Reference-property source element id to the rows it points at.
object
A pointer to a row, in this dataset or in one this dataset declares a dependency on.
object
Reference-property source element id to the models, model elements and datasets the part points at, for a property whose target type is represented by things the platform holds. A part is written whole, so a part sent without them holds none. Absent when the part holds none.
object
A pointer to a thing the platform holds: a model, an element of a model, or a dataset. A model or element is read at the state the dataset pins the model at; a dataset as it stands.
object
The model, for a model or an element; the dataset, for a dataset.
The element of the model; present exactly for an ELEMENT.
Containment-property source element id to the parts this part holds.
object
The value, reference and part columns, by source element id, whose content differs, a part column where any of its parts differs at any depth; every column the row holds for an added or removed row. The parts of both sides are whole on before and after, to be paired by partId.
The rows of this dataset the page’s references point at, by row id, as the commit holds them, else as its parent did, so a reference is named without a second read.
object
One entry of a dataset. Both maps are keyed by the data schema’s source element ids, never by a name: the element id is what survives a rename, and it is what lets a model mapping induce a dataset migration later.
object
The row’s stable identity, minted once and surviving every edit.
Value-property source element id to the terms the row holds for it.
object
Reference-property source element id to the rows it points at.
object
A pointer to a row, in this dataset or in one this dataset declares a dependency on.
object
Reference-property source element id to the models, model elements and datasets it points at, for a property whose target type is represented by things the platform holds. Such a property holds these and never row references. Absent when the row holds none. A write that leaves platformRefs out keeps the ones the row holds, as a client that knows nothing of them writes every row; one that sends {} clears them. The two fields are told apart each on its own.
object
A pointer to a thing the platform holds: a model, an element of a model, or a dataset. A model or element is read at the state the dataset pins the model at; a dataset as it stands.
object
The model, for a model or an element; the dataset, for a dataset.
The element of the model; present exactly for an ELEMENT.
Containment-property source element id to the parts the row holds inside itself, for a property whose target type has no identity of its own (a contact point, a period). Such a property holds parts and never row references. Absent when the row holds none. A write that leaves parts out keeps the parts the row holds, as a client that knows nothing of parts writes every row; one that sends it, empty included, leaves the row holding what it sent.
object
One part a row holds inside itself: an occurrence of a containment property whose target type has no identity of its own. Its maps are keyed as a row’s are, and it holds parts of its own to whatever depth the model nests them.
object
The part’s identity inside its row, so a change to one part is told from a change to another. Send it back unchanged on every write of the row; a part written without one gets a new one, and two parts of one row under one id are a 400.
Value-property source element id to the terms the part holds for it.
object
Reference-property source element id to the rows it points at.
object
A pointer to a row, in this dataset or in one this dataset declares a dependency on.
object
Reference-property source element id to the models, model elements and datasets the part points at, for a property whose target type is represented by things the platform holds. A part is written whole, so a part sent without them holds none. Absent when the part holds none.
object
A pointer to a thing the platform holds: a model, an element of a model, or a dataset. A model or element is read at the state the dataset pins the model at; a dataset as it stands.
object
The model, for a model or an element; the dataset, for a dataset.
The element of the model; present exactly for an ELEMENT.
Containment-property source element id to the parts this part holds.
object
Example
{ "rows": [ { "diffType": "ADDED", "before": { "platformRefs": { "additionalProperty": [ { "kind": "MODEL" } ] }, "parts": { "additionalProperty": [ { "platformRefs": { "additionalProperty": [ { "kind": "MODEL" } ] } } ] } }, "after": { "platformRefs": { "additionalProperty": [ { "kind": "MODEL" } ] }, "parts": { "additionalProperty": [ { "platformRefs": { "additionalProperty": [ { "kind": "MODEL" } ] } } ] } } } ], "referenced": { "additionalProperty": { "platformRefs": { "additionalProperty": [ { "kind": "MODEL" } ] }, "parts": { "additionalProperty": [ { "platformRefs": { "additionalProperty": [ { "kind": "MODEL" } ] } } ] } } }}The dataset does not exist, answered with the plain problem, or the caller holds no draft on it, answered as RefNotFoundProblem: to a client that is the news a read at a gone ref brings, that the draft it was working in, perhaps committed or discarded in another session, is no longer there.
A Problem answered when a ref the request reads at is not there for the caller, on a resource they may read: a ref id that names nothing, a ref of another resource, and another user’s draft, which reads exactly as a ref that does not exist. The draft routes answer it too when the caller holds no draft.
A 404, as a missing resource is, and told apart from one by its type. A resource the caller cannot read keeps the plain answer it always had, whatever ref was named, so this one never says anything about a resource the caller could not see. To a client it means that the ref it was reading, typically a draft committed or discarded in another session, is gone while the resource stays: it goes back to the branch. The problem names no ref, so the answer for an id that names nothing and for another user’s draft is the same, byte for byte.
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
Stable constant a client branches on, which is what tells this 404 from a resource that is missing or not the caller’s to read.
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
{ "type": "https://modeldesk.io/problems/ref-not-found"}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" } ]}