Developer
REST API
This portfolio exposes its project data through a public, versioned REST API. All endpoints are read-only and require no authentication.
Base URL
https://www.xavieroc.dev/api/v1
Read-only
·
No auth required
·
JSON responses
·
CORS enabled
Response format
Every response shares the same outer shape regardless of the endpoint.
Single resource
{
"success": true,
"data": { ... }
}
Collection
{
"success": true,
"data": [ ... ],
"count": 12
}
Error
{
"success": false,
"error": "..."
}
Endpoints
GET
/api/v1/projects
Returns all projects. Supports optional filtering by category, tag, or featured status.
| Parameter | Type | Description |
|---|---|---|
category |
string | Filter by category. One of web, data, software. |
tag |
string | Filter by tag slug, e.g. web-app, machine-learning. |
featured |
boolean | Pass true to return only featured projects. |
Examples:
GET
/api/v1/projects/<slug>
Returns a single project by its URL slug. Returns 404 with a JSON error body if the slug does not exist.
Examples:
GET
/api/v1/categories
Returns all project categories with the number of projects in each.
GET
/api/v1/tags
Returns all tags alphabetically with the number of projects using each.
curl examples
curl https://www.xavieroc.dev/api/v1/projects
curl https://www.xavieroc.dev/api/v1/projects?category=web
curl https://www.xavieroc.dev/api/v1/projects?tag=machine-learning
curl https://www.xavieroc.dev/api/v1/projects?featured=true
curl https://www.xavieroc.dev/api/v1/projects/higher-lower-web-game
curl https://www.xavieroc.dev/api/v1/categories
curl https://www.xavieroc.dev/api/v1/tags