Skip to content

Get a dataset commit

GET
/datasets/{datasetId}/commits/{commitId}
curl --request GET \
--url https://api.modeldesk.io/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/commits/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

One commit of the dataset’s history, with the record of the staged changes it landed when it is a landing. A commit staged on a draft is read with that draft as ref, by its owner; at any other ref it is not found.

datasetId
required
string format: uuid
commitId
required
string format: uuid
ref
string format: uuid

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.

OK

Media typeapplication/json

A commit read whole, with the record of the staged changes it landed when it is a landing.

object
id
required
string format: uuid
datasetId
required
string format: uuid
parentIds

None for the first commit, one for an ordinary one, two for a merge.

Array<string>
createdAt
string format: date-time
createdBy
object
id
required
string format: uuid
type
required

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.

string
Allowed values: USER ORGANIZATION SYSTEM MACHINE
name

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.

string
message

What the commit records about the change. Absent on a staged change sent without one.

string
requestId
string
rowsChanged

How many rows the commit wrote or removed. For a change staged on a draft, listed in a stale head’s gap or among a rebase’s dropped changes, the rows that one change touched.

integer
stagedChanges

What a landing recorded about each staged change it landed, in the order they were staged: one entry per change, each the request id and message the change was staged with and the rows that one change touched. What a reader has of the chain once the nightly sweep has taken the micro-commits. Absent on a commit that is no landing and on a landing made before landings recorded their chain.

Array<object>
object
requestId

The changeRequestId the change was staged with. Absent when it sent none.

string
message

The message the change was staged with. Absent when it was blank or left out.

string
rowsChanged
required

How many rows that one change wrote or removed.

integer

Example

{
"createdBy": {
"type": "USER"
}
}

The commit belongs to another dataset

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"
}
]
}

Dataset or commit not found

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"
}
]
}