Types
Info
The type index lists all object types present in the collection with object counts. It is designed as a discovery endpoint — use it to populate a type filter UI without hardcoding values.
endpoint:
GET https://data.designmuseumgent.be/v2/id/types
| Code | Description |
|---|---|
| 200 | Successful request |
| 500 | Server error |
Response fields
| Field | Description | Example |
|---|---|---|
@id | Internal DMG concept URI for the type | https://data.designmuseumgent.be/v2/id/concept/530003520 |
@type | CIDOC-CRM class | crm:E55_Type |
rdfs:label | Dutch label of the type | "pepervat" |
object_count | Number of objects classified as this type | 42 |
onDisplay | Only return objects that ar on display in the collection presentation | ...onDisplay=true |
filter | Ready-to-use filter URL for the objects collection | ...?type=pepervat |
Results are sorted by object_count descending.
Using the type index
// fetch all types
const index = await fetch('https://data.designmuseumgent.be/v2/id/types').then(r => r.json())
// show sorted list
index["hydra:member"].forEach(t => {
console.log(`${t["rdfs:label"]}: ${t.object_count} objects`)
})
// use the filter URL directly
const vazen = index["hydra:member"].find(t => t["rdfs:label"] === "vaas")
const objects = await fetch(vazen.filter).then(r => r.json())
Example response
{
"@context": {
"crm": "http://www.cidoc-crm.org/cidoc-crm/",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"hydra": "http://www.w3.org/ns/hydra/core#"
},
"@id": "https://data.designmuseumgent.be/v2/id/types",
"@type": "hydra:Collection",
"rdfs:label": "Object type index",
"hydra:totalItems": 312,
"hydra:member": [
{
"@id": "https://data.designmuseumgent.be/v2/id/concept/530001234",
"@type": "crm:E55_Type",
"rdfs:label": "vaas",
"object_count": 843,
"filter": "https://data.designmuseumgent.be/v2/id/objects?type=vaas"
},
{
"@id": "https://data.designmuseumgent.be/v2/id/concept/530003520",
"@type": "crm:E55_Type",
"rdfs:label": "schaal",
"object_count": 612,
"filter": "https://data.designmuseumgent.be/v2/id/objects?type=schaal"
},
{
"@id": "https://data.designmuseumgent.be/v2/id/concept/530004716",
"@type": "crm:E55_Type",
"rdfs:label": "beeldhouwwerk",
"object_count": 203,
"filter": "https://data.designmuseumgent.be/v2/id/objects?type=beeldhouwwerk"
}
]
}