Skip to content

List the entries of a connected list

GET
/models/{modelId}/value-sets/{classifierId}/entries
curl --request GET \
--url 'https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/value-sets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/entries?offset=0&limit=50' \
--header 'Authorization: Bearer <token>'

A page of the entries of the list a value-domain classifier (a code list) is connected to, at the release its connection reads: the dataset’s latest release, or its working copy when it has none yet. Entries are ordered by code; query keeps those whose code or name contains it, ignoring case. The classifier is read at ref, or at the model’s main branch, so a draft’s owner reads the connection the draft holds.

modelId
required
string format: uuid
classifierId
required
string format: uuid

The value-domain classifier whose list to read.

ref
string format: uuid

The ref to read the classifier at, a model_branch document id, read as GET /models/{modelId}?ref= reads it. When omitted, the model’s main branch is read.

query
string

Text an entry’s code or name contains; every entry when omitted or blank.

offset
integer format: int64
0
limit
integer
default: 50 >= 1 <= 500

OK

Media typeapplication/json
object
items
required
Array<object>

One entry of a list, the same shape whichever source serves it.

object
id
required

The entry, a row of the dataset; what a field taking its value stores.

string format: uuid
code

What the entry is shown and written as. Absent when the list has no code property.

string
labels
required

The entry’s name per language tag; the empty tag for a name without one.

object
key
additional properties
string
iri
string
status
string
broader
required

The entries this one sits under, in a hierarchical list.

Array<string>
selectable
required

Whether a value may point at this entry.

boolean
total
required

How many entries the query matched.

integer format: int64
offset
required
integer format: int64

Example generated

{
"items": [
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"code": "example",
"labels": {
"additionalProperty": "example"
},
"iri": "example",
"status": "example",
"broader": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"selectable": true
}
],
"total": 1,
"offset": 1
}

The page is out of bounds, or the classifier’s connection cannot be read or names a kind of source no list is read from yet

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

The model, the ref or the classifier is not there for the caller, the classifier is connected to no list, or the list’s dataset or release does not exist or the caller cannot read it

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