Get a dataset commit's diff
const url = 'https://api.modeldesk.io/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/commits/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/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/commits/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/diff?offset=0&limit=100' \ --header 'Authorization: Bearer <token>'What one commit changed against its parent: the ids of the rows it added, changed and removed, and one page of those rows, each as it stood before and after with the columns that differ. A commit staged on a draft is read with that draft as ref, by its owner.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”A ref of the dataset to read at: the caller’s own draft, whose staged changes read as one commit each, or a branch. Without it, the main branch. Another user’s draft reads as not found.
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 commit belongs to another dataset
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 or commit 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" } ]}