Skip to content

List commits

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

List commits for a model with cursor-based pagination. Walks the parent chain from HEAD (or from the cursor) and returns commits ordered newest-first, following the first parent only (linear history). 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 reads carry the record.

modelId
required
string format: uuid
ref
string format: uuid

The ref to read at, a model_branch document id. When omitted, the model’s main branch is read.

limit
integer
default: 10

Maximum number of commits to return. Defaults to 10.

cursor
string format: uuid

Cursor, the commit ID that marks the end of the previous page (exclusive). When omitted, starts from the head of the ref being read.

includeSystem
boolean

Whether to include the commits the platform authored itself (createdBy.type is SYSTEM: metamodel seeding and release-triggered re-pins). Hidden by default, so the history shows people’s and service accounts’ work.

OK

Media typeapplication/json
object
items
required
Array
object
id
required
string format: uuid
modelId
required
string format: uuid
parentIds

The commit’s parents, in order: none for the first commit, which leaves the field out, one for an ordinary commit, and two for a merge, the head of the branch merged into first and the head of the branch merged from second. A history that follows first parents reaches a merged branch’s own commits through the second.

Array<string>
<= 2 items
createdAt
required
string format: date-time
createdBy
required
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

The author’s description of the change. Absent when the commit was made without one.

string
requestId

The idempotency key of the request that produced this commit, as the client sent it. Absent when the request carried none.

string
rootElement
required
object
id
required
string format: uuid
revision
required
string format: uuid
versions

The versions released at this commit. Absent when none were.

Array<object>

A named release of a model at one commit. A release of a metamodel-level model also carries the compilation frozen at release time; see MetamodelRelease.

object
id
required
string format: uuid
modelId
required
string format: uuid
name
required
string
description
string
commitId
required
string format: uuid
createdAt
required
string format: date-time
model

The model’s content as released. Carried when one version is read, created or updated, and left out of listings.

object
rootElementId
required
string format: uuid
elements
required
object
key
additional properties
object
id
required
string format: uuid
type
required
string
external
boolean
attributes
object
key
additional properties
array
relations
object
key
additional properties
object
key
additional properties
Array<object>
object
id
required
string format: uuid
owned
required
boolean
modelId

Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.

string format: uuid
extensionLayer

The values the element holds that its type declares no property for; absent when none.

Array

A value an element holds under no binding its type declares, kept so a round trip loses nothing.

One of: discriminator: kind
attribute
object
kind
required
string
Allowed value: attribute
key
string
lexicalValue
string
typeIdentifier
string
qualifiers
object
key
additional properties
string
lineage

Where an element was derived from: the source and rules models, and per property the source values it read.

object
sourceModels
Array<object>
object
modelId
string format: uuid
commitId
string format: uuid
rulesModels
Array<object>
object
modelId
string format: uuid
commitId
string format: uuid
generatedBy
object
id
required
string format: uuid
owned
required
boolean
modelId

Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.

string format: uuid
properties
Array<object>
object
propertyName
string
propertyType
string
Allowed values: ATTRIBUTE RELATION
sources
Array<object>
object
sourceModelId
string format: uuid
sourceElementId
string format: uuid
sourceProperty
string
propertyType
string
Allowed values: ATTRIBUTE RELATION
role
string
Allowed values: PRIMARY VALUE_READ
usedRule
object
id
required
string format: uuid
owned
required
boolean
modelId

Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.

string format: uuid
dependencyModels
object
key
additional properties
object
rootElementId
required
string format: uuid
elements
required
object
key
additional properties
object
id
required
string format: uuid
type
required
string
external
boolean
attributes
object
key
additional properties
array
relations
object
key
additional properties
object
key
additional properties
Array<object>
object
id
required
string format: uuid
owned
required
boolean
modelId

Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.

string format: uuid
extensionLayer

The values the element holds that its type declares no property for; absent when none.

Array

A value an element holds under no binding its type declares, kept so a round trip loses nothing.

One of: discriminator: kind
attribute
object
kind
required
string
Allowed value: attribute
key
string
lexicalValue
string
typeIdentifier
string
qualifiers
object
key
additional properties
string
lineage

Where an element was derived from: the source and rules models, and per property the source values it read.

object
sourceModels
Array<object>
object
modelId
string format: uuid
commitId
string format: uuid
rulesModels
Array<object>
object
modelId
string format: uuid
commitId
string format: uuid
generatedBy
object
id
required
string format: uuid
owned
required
boolean
modelId

Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.

string format: uuid
properties
Array<object>
object
propertyName
string
propertyType
string
Allowed values: ATTRIBUTE RELATION
sources
Array<object>
object
sourceModelId
string format: uuid
sourceElementId
string format: uuid
sourceProperty
string
propertyType
string
Allowed values: ATTRIBUTE RELATION
role
string
Allowed values: PRIMARY VALUE_READ
usedRule
object
id
required
string format: uuid
owned
required
boolean
modelId

Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.

string format: uuid
dependencyModels
object recursive
compiledMetamodel

The base metamodel compiled at release time. Present only on a base-metamodel release.

object
compiledExtension

The extension compiled at release time. Present only on an extension release.

object
builtInElementModelCommitId

Commit of the associated built-in element model at release time. Absent for extension releases, for base metamodels without a built-in element model and for every other model’s release.

string format: uuid
lastCompiledAt

When the frozen compilation was last built: the release time, changed afterwards only by the rebuild maintenance command. Absent outside metamodel-level releases.

string format: date-time
validationOverride

The violations a version was released with, because the releasing user overrode them. Absent on a version released without violations.

object
violationCount
required

The number of error findings the model had when it was released.

integer
codes
required

The distinct codes of those findings, sorted.

Array<string>
by
required

Who released it, as a commit names its author: a person (USER), whose name reads resolve, or a service account (MACHINE) with its name.

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
at
required

When it was released; the same instant as the version’s createdAt.

string format: date-time
dismissedFindings

The findings dismissed when a version was cut: how many of the warnings and informational findings of its release validation a dismissal of the model matched at that commit, and under which codes. Absent on a version cut with none dismissed, and on every version cut before dismissals were recorded. It names no person.

object
count
required

How many findings were dismissed.

integer
>= 1
codes
required

The distinct codes of those findings, sorted.

Array<string>
actions
required
Array<object>
object
type
required
string
Allowed values: MODEL_CREATE ELEMENT_CREATE ELEMENT_UPDATE ELEMENT_DELETE ELEMENT_BULK_UPDATE RELATION_MEMBERSHIP_UPDATE ELEMENT_MOVE ELEMENT_IMPORT DEPENDENCY_CREATE DEPENDENCY_UPDATE DEPENDENCY_DELETE METAMODEL_PIN_UPDATE NAMESPACE_CREATE NAMESPACE_UPDATE NAMESPACE_DELETE TEMPLATE_CONFIG_UPDATE TEMPLATE_ENTRY_CREATE TEMPLATE_ENTRY_UPDATE TEMPLATE_ENTRY_DELETE ALIGNMENT_CREATE MAPPING_GENERATE DIAGRAM_CREATE DIAGRAM_UPDATE DIAGRAM_DELETE LAYOUT_RULE_CREATE LAYOUT_RULE_UPDATE LAYOUT_RULE_DELETE HIERARCHY_GROUP_CREATE HIERARCHY_GROUP_UPDATE HIERARCHY_GROUP_DELETE ELEMENT_COLOR_UPDATE DIAGRAM_COLORS_UPDATE SEMANTIC_CORRESPONDENCE_CREATE SEMANTIC_CORRESPONDENCE_DELETE CORRESPONDENCE_LINK_CREATE CORRESPONDENCE_LINK_UPDATE CORRESPONDENCE_LINK_DELETE CORRESPONDENCE_RULE_CREATE CORRESPONDENCE_RULE_UPDATE CORRESPONDENCE_RULE_DELETE
elementIds
required
Array<string>
generationMetadata

Present only on a MAPPING_GENERATE action.

object
ruleIds
Array<string>
originModelId
string format: uuid
originCommitId
string format: uuid
sourceModelId
string format: uuid
sourceCommitId
string format: uuid
rulesModelId
string format: uuid
rulesCommitId
string format: uuid
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. The record itself is on the single commit reads, ModelCommitRecordView and ModelCommitHeaderView.

integer
mergedImport

On a page of history, a merge commit that merged an import into the model: the import whose mergeCommitId it is, so a client names the row by the import rather than by its branches. Derived when the page is read from the import records, with one read per page that holds a merge commit; never stored on the commit. Absent on every other commit, including a merge of an import whose record is gone.

object
importId
required
string format: uuid
sourceName

The import’s source name, reduced as the model’s source route gives it. Absent where the reader may not read the import by its own access rules, as on the source route; those rules still hold for a merged import whose record was deleted.

string

Example

{
"items": [
{
"createdBy": {
"type": "USER"
},
"versions": [
{
"model": {
"elements": {
"additionalProperty": {
"extensionLayer": [
{
"kind": "attribute"
}
],
"lineage": {
"properties": [
{
"propertyType": "ATTRIBUTE",
"sources": [
{
"propertyType": "ATTRIBUTE",
"role": "PRIMARY"
}
]
}
]
}
}
}
},
"validationOverride": {
"by": {
"type": "USER"
}
}
}
],
"actions": [
{
"type": "MODEL_CREATE"
}
]
}
]
}

The caller is an agent acting for a person, and the organization that owns the model has not enabled the agent’s AI platform, answered as AgentPlatformNotEnabledProblem. Any other refusal is answered with the plain problem.

Media typeapplication/problem+json
Any of:

A Problem answered when an agent acting for a person reached a model whose owning organization has not enabled the AI platform the agent runs on, which its token names. Model content reaches the platform an agent runs on, so the organization decides: until an organization admin turns the platform on in the organization’s AI agent platforms setting, every route on the model refuses the agent, conditional reads and the events stream included, and the model list and every page that names other models leave the organization’s models out. A change of the setting applies to new requests within a minute; an events stream that is already open ends at its token’s expiry, at most ten minutes later.

object
type
required

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
type
required

Stable constant a client branches on, which is what tells this 403 from the plain one the same routes answer for a model the caller may not read.

string format: uri
Allowed values: https://modeldesk.io/problems/agent-platform-not-enabled

Example

{
"type": "https://modeldesk.io/problems/agent-platform-not-enabled"
}

The model does not exist or is not the caller’s to read, answered with the plain problem whatever ref was named. Or ref names a ref that is not there for the caller, answered as RefNotFoundProblem: an unknown id, a ref of another model and another user’s draft all get that answer, in the same words, and only on a model the caller may read.

Media typeapplication/problem+json
Any of:

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
type
required

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
type
required

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.

string format: uri
Allowed values: https://modeldesk.io/problems/ref-not-found

Example

{
"type": "https://modeldesk.io/problems/ref-not-found"
}

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