Skip to content

Resolve an application profile

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

Resolve an application profile against its pinned bases: the chain each term profile follows to the term it ultimately profiles, every facet’s effective value with the layer that supplied it, and the findings the profiling semantics produced. Read-only and always computed at a head: the model’s main branch head, or the head of ref when given. The path only exists for application-profile models; on any other model it is a 404.

modelId
required
string format: uuid
ref
string format: uuid

The ref to resolve the profile at, a model_branch document id, read as GET /models/{modelId}?ref= reads it: a draft is its owner’s alone. When omitted, the model’s main branch is read.

coverage
boolean

When true, additionally enumerate every base’s terms with whether this profile covers them (the response’s coverage field). Opt-in because it costs more than the resolution itself.

OK

Media typeapplication/json

The interpretation of an application profile against its pinned bases: what each of its term profiles ultimately profiles, what every facet effectively resolves to and which layer said so, plus the findings the profiling semantics produced. Deterministic for a given profile commit and pin set; computed on request, never persisted.

object
profile
required

A model at a point in its history.

object
modelId
required
string format: uuid
commitId
string format: uuid
bases
required

The profile’s bases — one entry per specification element the root’s profileOf targets.

Array<object>

One base of the profile: the specification element the root’s profileOf targets, together with how the hosting dependency is pinned. Exactly one of three shapes applies — an internal pin (dependencyId, modelId, elementId, commitId, versionRef), an external location (dependencyId, modelId, elementId, location), or a by-IRI stand-in (elementId, iri) for a base that is not hosted on the platform.

object
dependencyId
string format: uuid
modelId
string format: uuid
elementId
required
string format: uuid
commitId
string format: uuid
versionRef
string
location
string format: uri
iri
string
findings
required

Model-level findings the profiling semantics produced.

Array<object>
object
code
required
string
logLevel
required

INFO entries are informational — something the reader should know that is not a defect, notably the “unverifiable” verdicts of profile resolution. An INFO entry never makes a model invalid.

string
Allowed values: WARN ERROR INFO
title
required
string
detailMessage
required
string
modelElementId
string format: uuid
property
string
valueIndex
integer
otherElementId

The other element a finding is about, where it concerns two: the element whose key or value this one repeats, or the dependency element publishing the same IRI.

string format: uuid
fingerprint

A hash of the value the finding was about. Sent with modelElementId (as elementId, left out for a model-level finding), code and property to POST /models/{modelId}/dismissals to dismiss the finding; the dismissal holds while the value hashes the same.

string
dismissed

Who dismissed this warning or informational finding and when, where a dismissal of the model names it by element, code, property and fingerprint, so while the value it was about is unchanged. Never on an error, nor on a finding on an element another model answers for.

object
by
required

Who dismissed it: a person (USER) with their current name. name is absent where nothing answers to the id any more, such as an erased user.

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
string format: date-time
subject

What exactly a finding is about, when its check can report more than one finding at the same code, element and property: a relation target, an offending value (with its language tag for a language string) or an identifier the check is about. Exactly one of target, value and name is present, language only beside value.

object
target
string format: uuid
value
string
language
string
name
string
key

The finding’s identity across validation runs: the lowercase hex SHA-256 of the canonical JSON of code, modelElementId (as elementId), property and subject, each left out when absent, keys sorted and no whitespace. Neither valueIndex nor the message is part of it. Present on every entry of a validation result.

string
/^[0-9a-f]{64}$/
terms
required

The resolved term profiles; children follow ownership (ownership = domain).

Array<object>

One ElementProfile resolved: the chain of hops to the term it ultimately profiles, that term’s kind, every facet’s effective value, the reuse edges, its own findings, and the term profiles it owns.

object
elementProfileId
required
string format: uuid
chain
required

The profiledElement hops from this term profile toward the term it ultimately profiles.

Array<object>

One profiledElement hop, from a term profile toward the term it profiles.

object
modelId
required
string format: uuid
elementId
required
string format: uuid
elementType
required
string
term
required

What the chain ends in. Null when the chain could not be walked (a dangling profiledElement or a cycle — reported in findings).

Any of:

What a chain ends in: an element of a base model (modelId, elementId, plus display label/typeLabel), an external IRI (iri), or nothing at all — a new-term profile is its own chain root (newTerm: true) and defines a term rather than profiling one.

object
modelId
string format: uuid
elementId
string format: uuid
iri
string
newTerm
required
boolean
label

The base term’s display text, resolved server-side because the base’s metamodel never reaches the client. Absent when nothing names the element — never an invented placeholder.

string
typeLabel
string
kind
required

The kind of term an element type represents when models of its metamodel serve as the base of an application profile, declared by the metamodel author on the element type. NONE — the value of an absent declaration — means the type takes no part in profiling.

string
Allowed values: SPECIFICATION TYPE VALUE_PROPERTY REFERENCE_PROPERTY VALUE_SET NONE
effective
required

Facet name to effective value. Self-contained rather than a delta — values the profile leaves alone are carried from the layer or base that stated them.

object
key
additional properties

A facet’s resolved value and where it came from.

object
value

The facet’s resolved value; its shape depends on the facet.

definedBy
required

SELF when this profile stated the value, BASE for a value read from the base’s native constraint (the outermost layer), or the id of the layer model that supplied it.

string
source

Where a metadata value came from; absent for constraint facets.

string
Allowed values: LOCAL INHERITED REUSE
reuses
required

The term profile’s ValueReuse edges, resolved.

Array<object>

A ValueReuse resolved to the property it takes its value from.

object
valueReuseId
required
string format: uuid
reusedProperty
string
reusedAs
string
fromElementId
string format: uuid
findings
required
Array<object>
object
code
required
string
logLevel
required

INFO entries are informational — something the reader should know that is not a defect, notably the “unverifiable” verdicts of profile resolution. An INFO entry never makes a model invalid.

string
Allowed values: WARN ERROR INFO
title
required
string
detailMessage
required
string
modelElementId
string format: uuid
property
string
valueIndex
integer
otherElementId

The other element a finding is about, where it concerns two: the element whose key or value this one repeats, or the dependency element publishing the same IRI.

string format: uuid
fingerprint

A hash of the value the finding was about. Sent with modelElementId (as elementId, left out for a model-level finding), code and property to POST /models/{modelId}/dismissals to dismiss the finding; the dismissal holds while the value hashes the same.

string
dismissed

Who dismissed this warning or informational finding and when, where a dismissal of the model names it by element, code, property and fingerprint, so while the value it was about is unchanged. Never on an error, nor on a finding on an element another model answers for.

object
by
required

Who dismissed it: a person (USER) with their current name. name is absent where nothing answers to the id any more, such as an erased user.

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
string format: date-time
subject

What exactly a finding is about, when its check can report more than one finding at the same code, element and property: a relation target, an offending value (with its language tag for a language string) or an identifier the check is about. Exactly one of target, value and name is present, language only beside value.

object
target
string format: uuid
value
string
language
string
name
string
key

The finding’s identity across validation runs: the lowercase hex SHA-256 of the canonical JSON of code, modelElementId (as elementId), property and subject, each left out when absent, keys sorted and no whitespace. Neither valueIndex nor the message is part of it. Present on every entry of a validation result.

string
/^[0-9a-f]{64}$/
children
required
Array<object> recursive
inheritedFromModelId
required

Null on a locally-authored row. On an inherited row — a term profile owned by a layer this profile profiles but does not itself re-profile — the id of the model hosting that layer’s ElementProfile. Inherited rows carry no findings of their own; the layer’s problems belong to the layer model’s validation report.

string | null format: uuid
coverage

Per-base coverage. Present only when requested with coverage=true; omitted from the response entirely otherwise.

Array<object>

How much of one base the profile covers. Keyed per base — the specification element a profileOf targets — exactly mirroring the resolution’s bases.

object
baseElementId
required
string format: uuid
dependencyId

Locates the base for grouping and deep links; absent for a stand-in base.

string format: uuid
modelId

Absent for a stand-in base.

string format: uuid
profilable
required

Whether the base’s metamodel declares profiling at all. When false, terms still lists the base model’s content — unfiltered, because nothing says which elements are terms — so a reader can show the base and say why coverage cannot be judged.

boolean
wholeModelFallback
required

True when the scope of the base’s specification element was empty and the whole model’s content is listed instead — coverage is then not scoped to this specification.

boolean
terms
required
Array<object>

One term of a base and whether this profile covers it.

object
elementId
required
string format: uuid
kind

The kind of term an element type represents when models of its metamodel serve as the base of an application profile, declared by the metamodel author on the element type. NONE — the value of an absent declaration — means the type takes no part in profiling.

string
Allowed values: SPECIFICATION TYPE VALUE_PROPERTY REFERENCE_PROPERTY VALUE_SET NONE
profiled
required

Chain-wide coverage: true when any of this profile’s term profiles reaches the term along its chain, whether by profiling it directly or by profiling a parent layer that does.

boolean
profiledBy

The covering ElementProfile of this profile — the node an authoring UI navigates to. Absent when the term is not covered.

string format: uuid
label

The term’s display text; absent when nothing names the element.

string
typeLabel
string

Example

{
"findings": [
{
"logLevel": "WARN",
"dismissed": {
"by": {
"type": "USER"
}
}
}
],
"terms": [
{
"kind": "SPECIFICATION",
"effective": {
"additionalProperty": {
"source": "LOCAL"
}
},
"findings": [
{
"logLevel": "WARN",
"dismissed": {
"by": {
"type": "USER"
}
}
}
]
}
],
"coverage": [
{
"terms": [
{
"kind": "SPECIFICATION"
}
]
}
]
}

The caller may not read the model. Such a caller is refused with this or with the plain 404, never with RefNotFoundProblem, and with ref which of the two can depend on the ref named: a ref the model has can meet the model’s read check and its 403, while one it does not have answers 404.

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

No such model, the model is not an application profile at the head read, or the caller may not read it and is refused here rather than with the 403, answered with the plain problem. Or ref names a ref that is not there for the caller, answered as RefNotFoundProblem: an unknown id, a ref of another model and another user’s draft all get that answer, in the same words, and only on a model the caller may read.

Media typeapplication/problem+json
Any of:

A Problem answered when a ref the request reads at is not there for the caller, on a resource they may read: a ref id that names nothing, a ref of another resource, and another user’s draft, which reads exactly as a ref that does not exist. The draft routes answer it too when the caller holds no draft.

A 404, as a missing resource is, and told apart from one by its type. A resource the caller cannot read keeps the plain answer it always had, whatever ref was named, so this one never says anything about a resource the caller could not see. To a client it means that the ref it was reading, typically a draft committed or discarded in another session, is gone while the resource stays: it goes back to the branch. The problem names no ref, so the answer for an id that names nothing and for another user’s draft is the same, byte for byte.

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 404 from a resource that is missing or not the caller’s to read.

string format: uri
Allowed values: https://modeldesk.io/problems/ref-not-found

Example

{
"type": "https://modeldesk.io/problems/ref-not-found"
}

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