REST API (v2)
GET /schemas/:version/elements/:element_id
Point read for a single element by id.
GET /schemas/:version/elements/:element_id
Default projection is
all. Inspect icon_variants for the variant keys valid in composed-icon URLs.Summary
Return a single element's full record, including its icon_variants array.
Request
GET https://api.dtpr.io/api/v2/schemas/:version/elements/:element_id
| Param | In | Default | Description |
|---|---|---|---|
version | path | — | Canonical version or alias. |
element_id | path | — | Whitelisted to [a-zA-Z0-9_-]. |
locales | query | — | Comma-separated locale codes. |
fields | query | all | Comma-separated field list or all. |
Response
HTTP/1.1 200 OK
Content-Type: application/json
DTPR-Content-Hash: sha256-…
Cache-Control: no-store
{
"ok": true,
"version": "ai@2026-04-16-beta",
"element": {
"id": "purpose.example",
"title": [{"locale":"en","value":"Example purpose"}],
"description": [{"locale":"en","value":"Short description."}],
"category_id": "purpose",
"symbol_id": "example-symbol",
"icon_variants": ["default", "dark", "commercial"],
"variables": []
}
}
Errors
| Code | HTTP | Meaning |
|---|---|---|
bad_request | 400 | Malformed :version or :element_id. |
not_found | 404 | Version or element not registered. |
Example
curl -s "https://api.dtpr.io/api/v2/schemas/ai@2026-04-16-beta/elements/purpose.example?locales=en"
GET /api/v2/schemas/ai@2026-04-16-beta/elements/purpose.example HTTP/1.1
Host: api.dtpr.io
See also
- MCP
get_element GET /schemas/:version/elements- Icon URLs — build URLs from
icon_variants.