Skip to content

Get a commit without its changes

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

Get a single commit of a model as the history list shows it: when it was made, by whom, and the releases cut at it, without the changes it made. A landing’s record of the staged changes it landed is carried: it is provenance, not the actions this read leaves out, and the listing shows only its size. A commit id that belongs to a different model is a 400 rather than a 404, as for the full commit.

modelId
required
string format: uuid
commitId
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.

OK

Media typeapplication/json

A commit without the actions it made, with the record of the staged changes it landed when it is a landing.

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>
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 types of the actions it staged. What a reader has of the chain once the nightly sweep has taken the micro-commits. Absent on a commit that is no landing (a staged change, a merge, an import, a direct write) 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
actionTypes
required

The deduped, sorted type values of the actions the change staged, as CommitMetadata gives them. Empty rather than absent on a change that recorded none.

Array<string>

Example

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

Bad request

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

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

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