Skip to content

List base models

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

The base models a model is based on, one row per base model, ordered by name. Storage keeps up to two records per base model — an origin for what it generates and a correspondence for what is linked to it — and this joins them on read, so one base model is one row whichever records it has.

modelId
required
string format: uuid

OK

Media typeapplication/json
Array<object>

One base model a model is based on, joined across the two records storage can keep for it — an origin for what it generates and a correspondence for what is linked to it.

object
baseModelId
required
string format: uuid
baseModelName

Absent while nothing can name it - a base model since deleted, or one this caller cannot read.

string
nature

Nature of a derivation (based-on) edge. VERTICAL = crosses abstraction levels (semantic lineage); HORIZONTAL = same level, different representation; UNKNOWN = could not be inferred. Only VERTICAL/HORIZONTAL are persisted on an origin; UNKNOWN is an inference result, never stored.

string
Allowed values: VERTICAL HORIZONTAL UNKNOWN
correspondenceId

The correspondence recording links; absent for a base model that is only generated from.

string format: uuid
pinnedCommitId
string format: uuid
commitLabel
string
commitType

Type of commit reference - branch (mutable) or version (immutable).

string
Allowed values: BRANCH VERSION
generatedElementCount
required

How many of this model’s elements a rule generated from this base model.

integer
linkCount
required

How many elements are linked to this base model, by rule or by hand.

integer
ruleCount
required

How many rules this base model holds - those that generate from it and those that link to it. Removing the base model removes them.

integer
generationState

Absent where the base model generates nothing - there is no generation to be up to date with.

string
Allowed values: NEVER_GENERATED UP_TO_DATE NEEDS_REGENERATION ORIGIN_NOT_FOUND
hasNewerCommits
required
boolean

Example

[
{
"nature": "VERTICAL",
"commitType": "BRANCH",
"generationState": "NEVER_GENERATED"
}
]

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