List model mappings
const url = 'https://api.modeldesk.io/model-mappings';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Narrows the listing to mappings whose source is this release of sourceMetamodel, by version name.
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.
Narrows the listing to mappings whose source must add these add-ons.
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.
Filter mappings by seat assignments for this organization
Responses
Section titled “Responses”OK
object
object
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
The release of the source metamodel the mapping reads, by version name.
The release of each source extension, keyed by extension id.
object
The release of the target metamodel the mapping writes, by version name.
The release of each target extension, keyed by extension id.
object
object
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.
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
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.
Pinned version names per target add-on id, one for every entry in targetMetamodelAddOns.
object
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" } } } ]}default
Section titled “default”Error
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}