Get a model's RDF projection
const url = 'https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rdf-projection';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/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rdf-projection \ --header 'Authorization: Bearer <token>'Returns the RDF-projection datoms of the model at its branch head, or at the head of ref when given, with the element-to-subject index, the vocabulary naming its metamodel’s RDF rendering declares (absent where the rendering declares none), and the projected commit id. Dependencies are expanded, because subject IRIs may resolve through elements in imported models. A metamodel with no registered RDF rendering is a 400 carrying the UNSUPPORTED_METAMODEL code. Computed on read; persists nothing.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”The ref to project the model 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.
Responses
Section titled “Responses”OK
A model’s RDF projection at its branch head, as the query engine takes it.
object
The head commit the projection was taken at, for keying a client-side cache.
The projection’s facts, each an [entity, attribute, value] triple.
The subject IRI each element projects to, keyed by element id.
object
The vocabulary naming the metamodel’s RDF rendering declares, so a surface can write a query for an attribute or relation by its predicate. Absent for a metamodel whose rendering declares none.
object
The naming of each element type, keyed by the type’s name.
object
How one element type and its properties are named in RDF.
object
The IRI of the class an element of the type is typed with. Absent for a type that is no class.
The predicate IRI of each attribute, keyed by the attribute’s name.
object
The naming of each relation, keyed by the relation’s name.
object
How one relation is named in RDF.
object
The predicate IRI.
Whether the triple runs from the target to the source.
Predicates more than one property of the type is named by, which a query cannot read back to one property. Absent when there are none.
Example generated
{ "commitId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "datoms": [ [ "example" ] ], "subjectsByElementId": { "additionalProperty": "example" }, "naming": { "types": { "additionalProperty": { "class": "example", "attributes": { "additionalProperty": "example" }, "relations": { "additionalProperty": { "predicate": "example", "inverse": true } }, "sharedPredicates": [ "example" ] } } }}Bad request
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" } ]}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.
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" } ]}The model does not exist, 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.
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
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
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.
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
{ "type": "https://modeldesk.io/problems/ref-not-found"}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" } ]}