Skip to content

List dataset commits

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

A page of the dataset’s first-parent history, newest first — a merge commit appears, the line it merged in does not. cursor is the last commit of the previous page, and the page resumes at its parent. At the caller’s draft, the history is the draft’s own chain, ending above the commit the draft started from. A landing’s record of the staged changes it landed is not listed, so a page stays bounded whatever its landings held: each item carries stagedChangeCount, and the single read carries the record.

datasetId
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.

limit
integer
default: 10
cursor
string format: uuid

OK

Media typeapplication/json
object
items
Array

A commit as the history lists it, with the size of its record 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
stagedChangeCount

How many staged changes the commit’s record holds, when it is a landing of a draft made since landings recorded their chain. Absent on every other commit.

integer

Example

{
"items": [
{
"createdBy": {
"type": "USER"
}
}
]
}

The limit is outside its bounds, or the cursor is another dataset’s commit

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