Skip to content

Get a model mapping

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

Get model mapping

modelMappingId
required
string format: uuid

OK

Media typeapplication/json
object
id
required
string format: uuid
name
required
string
type
required
object
sourceMetamodel
required
string format: uuid
sourceMetamodelVersion

The release of the source metamodel the mapping reads, by version name.

string
sourceMetamodelExtensions
Array<string>
sourceMetamodelExtensionVersions

The release of each source extension, keyed by extension id.

object
key
additional properties
string
targetMetamodel
required
string format: uuid
targetMetamodelVersion

The release of the target metamodel the mapping writes, by version name.

string
targetMetamodelExtensions
Array<string>
targetMetamodelExtensionVersions

The release of each target extension, keyed by extension id.

object
key
additional properties
string
targetDependencies

The models the mapping’s output depends on, each at the commit it is pinned to.

Array<object>
object
modelId
required
string format: uuid
commitId
required
string format: uuid
elementMapping
object
key
additional properties
object
squashElement
object
on
Array<object>
object
id
string
valueMappings
Array
One of:
Constant
path

Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.

One of:
Path expression
string
root
boolean
typeMapping
One of:
Constant
attributeMapping
object
key
additional properties
object
valueMapping
One of:
Constant
attributeMapping
object
key
additional properties
object recursive
relationMapping
object
key
additional properties
object
elementMapping
required
string
joinOn
required
object
leftValue
required
One of:
Constant
rightValue
required
One of:
Constant
selectElement
required
object
filter

Optional per-diagram edge suppression: a reference whose target matches is not drawn as an edge, while both terms stay nodes and the reference reappears as a row naming its target. Distinct from the metamodel-declared collapse on a connection, which is fixed per diagram type and tests the edge element.

object
>= 1 properties
@path

Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.

One of:
Path expression
string
@root
boolean
@attr
One of:
string
@type
One of:
string
@value
object
type
string
valueMapping
One of:
Constant
options
object
key
additional properties
any
@not
object recursive
@and
Array<object> recursive
@or
Array<object> recursive
@absent

Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.

One of:
Path expression
string
@present

Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.

One of:
Path expression
string
key
additional properties
any
elementId
One of:
string
ownedRelationMapping
object
key
additional properties
object
path

Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.

One of:
Path expression
string
elementMapping
required
string

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"type": {
"sourceMetamodel": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"sourceMetamodelVersion": "example",
"sourceMetamodelExtensions": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"sourceMetamodelExtensionVersions": {
"additionalProperty": "example"
},
"targetMetamodel": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"targetMetamodelVersion": "example",
"targetMetamodelExtensions": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"targetMetamodelExtensionVersions": {
"additionalProperty": "example"
},
"targetDependencies": [
{
"modelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"commitId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
]
},
"elementMapping": {
"additionalProperty": {
"squashElement": {
"on": [
{
"id": "example",
"valueMappings": [
{
"path": {
"relation": "example",
"filter": {
"@path": {},
"@root": true,
"@attr": {
"type": "example",
"options": {}
},
"@type": {
"type": "example",
"options": {}
},
"@value": {
"type": "example",
"valueMapping": {},
"options": {}
},
"@not": {},
"@and": [],
"@or": [],
"@absent": {},
"@present": {}
},
"distinct": true
},
"attribute": [
"example"
],
"template": {
"expr": "example"
},
"map": {
"type": "example",
"options": {}
},
"skipValues": [
"example"
],
"default": "example"
}
]
}
]
},
"path": {
"relation": "example",
"filter": {
"@path": {},
"@root": true,
"@attr": {
"type": "example",
"options": {}
},
"@type": {
"type": "example",
"options": {}
},
"@value": {
"type": "example",
"valueMapping": {
"path": {},
"attribute": [
"example"
],
"template": {
"expr": "example"
},
"map": {
"type": "example",
"options": {}
},
"skipValues": [
"example"
],
"default": "example"
},
"options": {}
},
"@not": {},
"@and": [],
"@or": [],
"@absent": {},
"@present": {}
},
"distinct": true
},
"root": true,
"typeMapping": {
"path": {
"relation": "example",
"filter": {
"@path": {},
"@root": true,
"@attr": {
"type": "example",
"options": {}
},
"@type": {
"type": "example",
"options": {}
},
"@value": {
"type": "example",
"valueMapping": {},
"options": {}
},
"@not": {},
"@and": [],
"@or": [],
"@absent": {},
"@present": {}
},
"distinct": true
},
"attribute": [
"example"
],
"template": {
"expr": "example"
},
"map": {
"type": "example",
"options": {}
},
"skipValues": [
"example"
],
"default": "example"
},
"attributeMapping": {
"additionalProperty": {
"valueMapping": {
"path": {
"relation": "example",
"filter": {
"@path": {},
"@root": true,
"@attr": {
"type": "example",
"options": {}
},
"@type": {
"type": "example",
"options": {}
},
"@value": {
"type": "example",
"valueMapping": {},
"options": {}
},
"@not": {},
"@and": [],
"@or": [],
"@absent": {},
"@present": {}
},
"distinct": true
},
"attribute": [
"example"
],
"template": {
"expr": "example"
},
"map": {
"type": "example",
"options": {}
},
"skipValues": [
"example"
],
"default": "example"
},
"attributeMapping": {
"additionalProperty": {}
}
}
},
"relationMapping": {
"additionalProperty": {
"elementMapping": "example",
"joinOn": {
"leftValue": {
"path": {
"relation": "example",
"filter": {
"@path": {},
"@root": true,
"@attr": {
"type": "example",
"options": {}
},
"@type": {
"type": "example",
"options": {}
},
"@value": {
"type": "example",
"valueMapping": {},
"options": {}
},
"@not": {},
"@and": [],
"@or": [],
"@absent": {},
"@present": {}
},
"distinct": true
},
"attribute": [
"example"
],
"template": {
"expr": "example"
},
"map": {
"type": "example",
"options": {}
},
"skipValues": [
"example"
],
"default": "example"
},
"rightValue": {
"path": {
"relation": "example",
"filter": {
"@path": {},
"@root": true,
"@attr": {
"type": "example",
"options": {}
},
"@type": {
"type": "example",
"options": {}
},
"@value": {
"type": "example",
"valueMapping": {},
"options": {}
},
"@not": {},
"@and": [],
"@or": [],
"@absent": {},
"@present": {}
},
"distinct": true
},
"attribute": [
"example"
],
"template": {
"expr": "example"
},
"map": {
"type": "example",
"options": {}
},
"skipValues": [
"example"
],
"default": "example"
}
},
"selectElement": {
"filter": {
"@path": {
"relation": "example",
"filter": {},
"distinct": true
},
"@root": true,
"@attr": {
"type": "example",
"options": {}
},
"@type": {
"type": "example",
"options": {}
},
"@value": {
"type": "example",
"valueMapping": {
"path": {
"relation": "example",
"filter": {},
"distinct": true
},
"attribute": [
"example"
],
"template": {
"expr": "example"
},
"map": {
"type": "example",
"options": {}
},
"skipValues": [
"example"
],
"default": "example"
},
"options": {}
},
"@not": {},
"@and": [],
"@or": [],
"@absent": {
"relation": "example",
"filter": {},
"distinct": true
},
"@present": {
"relation": "example",
"filter": {},
"distinct": true
}
},
"elementId": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}
}
},
"ownedRelationMapping": {
"additionalProperty": {
"path": {
"relation": "example",
"filter": {
"@path": {},
"@root": true,
"@attr": {
"type": "example",
"options": {}
},
"@type": {
"type": "example",
"options": {}
},
"@value": {
"type": "example",
"valueMapping": {
"path": {},
"attribute": [
"example"
],
"template": {
"expr": "example"
},
"map": {
"type": "example",
"options": {}
},
"skipValues": [
"example"
],
"default": "example"
},
"options": {}
},
"@not": {},
"@and": [],
"@or": [],
"@absent": {},
"@present": {}
},
"distinct": true
},
"elementMapping": "example"
}
}
}
}
}

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