Skip to content

List model mappings

GET
/model-mappings
curl --request GET \
--url https://api.modeldesk.io/model-mappings \
--header 'Authorization: Bearer <token>'

The model mappings the caller may apply: their organizations own every model a mapping writes against, and one of them holds a seat for the metamodel it writes (with organization, that organization). A mapping this list leaves out is refused by the export’s mapping parameter and by POST /models/{modelId}/map.

sourceMetamodel
string format: uuid
sourceMetamodelVersion
string

Narrows the listing to mappings whose source is this release of sourceMetamodel, by version name.

sourceMetamodelExtensions
Array<string>
sourceMetamodelExtensionVersions
Array<string>

Narrows the listing to mappings whose source extensions are at these releases. Each entry is <extensionId>:<versionName>; repeat the parameter or join entries with commas. A malformed entry answers 400.

sourceMetamodelAddOns
Array<string>

Narrows the listing to mappings whose source must add these add-ons.

sourceMetamodelAddOnVersions
Array<string>

Narrows the listing to mappings whose source add-ons are at these releases. Each entry is <addOnId>:<versionName>; repeat the parameter or join entries with commas. A malformed entry answers 400.

targetMetamodel
string format: uuid
organization
string format: uuid

Filter mappings by seat assignments for this organization

OK

Media typeapplication/json
object
items
required
Array<object>
object
id
required
string format: uuid
name
required
string
type
required

A mapping’s type as a listing writes it: the same as MappingType, except that each targetDependencies entry is written without its members. Read one mapping for them.

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
Array<object>
object
sourceMetamodelAddOns

The add-ons a source model must add for the mapping to read it, as sourceMetamodelExtensions are the extensions it must pin. A source model may add more.

Array<string>
sourceMetamodelAddOnVersions

Pinned version names per source add-on id, one for every entry in sourceMetamodelAddOns; a source model pinning another release of one is refused.

object
key
additional properties
string
targetMetamodelAddOns

The add-ons the mapped model adds to its metamodel, in the order their profiles apply: the mapping resolves its target with them and creates the result with them.

Array<string>
targetMetamodelAddOnVersions

Pinned version names per target add-on id, one for every entry in targetMetamodelAddOns.

object
key
additional properties
string

Example generated

{
"items": [
{
"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": [
{}
],
"sourceMetamodelAddOns": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"sourceMetamodelAddOnVersions": {
"additionalProperty": "example"
},
"targetMetamodelAddOns": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"targetMetamodelAddOnVersions": {
"additionalProperty": "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"
}
]
}