- Method
GET- Path
/api/v1/models- Auth
- Token required (Authorization: Bearer, X-Api-Key or ?key=)
- Handler
ApiController::models()- Routing
- Reserved endpoint for $first === 'models' in dispatch()
- Description
- Content models and their field definitions
Parameters
This endpoint takes no parameters at all.
Response sample
not captured yet Run php cli/build-manual.php --capture; the reconciler reports a missing sample as a failure.
Error codes
| Code | Meaning | Scope |
|---|---|---|
401 |
Invalid API token | |
403 |
This token may not access that model | Authorization |
404 |
Endpoint not found | |
404 |
Unknown content model | |
405 |
Read-only API: GET is the only supported method | |
429 |
Too many requests, please retry later | |
500 |
Internal server error | |
503 |
The open API is not enabled on this site |
Example call
The URL is built from the registry path plus real parameters from this site; replace the token with your own.
curl -sS \
-H 'Authorization: Bearer ' \
-H 'Accept: application/json' \
'https://www.genhikesports.com/api/v1/models'
| Placeholder | Value on this site |
|---|---|
{model} |
news |
{slug} |
heng-air-6-3-launch |
Common scenarios
- Fetch the field definitions before mapping categories to fields so column names are never guessed
/api/v1/models