API Documentation
π§ββοΈ Realm of the Elderlings API (Mock API)β
A fantasy-themed exercise to play around with API documentation. Inspired by Robin Hobbβs Realm of the Elderlings universe.
This mock API was created as a Technical Writing and Developer Experience exercise to demonstrate API design and documentation skills.
π§ Overviewβ
The Realm of the Elderlings API is a mock REST API that exposes resources from the world of FitzChivalry Farseer, including characters, Wit and Skill bonds, and assassin assignments. It is implemented as a mock server using an OpenAPI 3.0 specification.
This project showcases:
- API design
- OpenAPI specification writing
- REST documentation
- JSON modeling
- Developerβfriendly structure and clarity
π Base URLβ
This API uses multiple mock endpoints generated via swagger.io.
The mock server is automatically generated from the OpenAPI specification:
https://virtserver.swaggerhub.com/fakenamespace/elderlings/1.0.0
πΉ Endpointsβ
1. GET /characters/fitzβ
Retrieve detailed information about FitzChivalry Farseer.
Descriptionβ
Returns Fitzβs identity, titles, and magical bonds (Wit and Skill).
Example Requestβ
GET /characters/fitz
Example Responseβ
{
"id": "fitz-001",
"name": "FitzChivalry Farseer",
"titles": ["Royal Bastard", "Catalyst", "Assassin"],
"bonds": {
"wit": ["Nighteyes"],
"skill": ["Verity"]
},
"status": "Alive (mostly)"
}
2. GET /characters/nighteyesβ
Retrieve information about Nighteyes, Fitzβs Witβbonded wolf companion.
Descriptionβ
Returns species, personality traits, and bond information.
Example Requestβ
GET /characters/nighteyes
Example Responseβ
{
"id": "wit-001",
"name": "Nighteyes",
"species": "Wolf",
"bondedTo": "FitzChivalry Farseer",
"traits": ["Loyal", "Sarcastic", "Wise"],
"status": "Gone to the wolf-dream"
}
3. GET /assignmentsβ
List current and past assassin assignments.
Descriptionβ
Returns a collection of tasks handled by the royal assassin, including outcomes.
Example Requestβ
GET /assignments
Example Responseβ
{
"assignments": [
{
"id": "task-001",
"target": "Prince Regal",
"status": "Failed (politics happened)"
},
{
"id": "task-002",
"target": "Forged Ones",
"status": "Completed"
}
]
}
π§ͺ Data Model Summaryβ
Character Objectβ
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier |
| name | string | Character |
| titles | array[string] | Honorifics or roles |
| bonds | object | Wit and Skill connections |
| status | string | Current state |
Assignment Objectβ
| Field | Type | Description |
|---|---|---|
| id | string | Assignment ID |
| target | string | Intended target |
| status | string | Outcome |
π Core API Conceptsβ
RESTβ
The API follows REST conventions: resources, predictable URLs, and standard HTTP methods.
HTTP Methodsβ
The API uses standard HTTP methods to interact with resources:
| Method | Meaning |
|---|---|
GET | retrieve data |
POST | create data |
PUT | update data |
DELETE | remove data |
Response Formatβ
All responses are JSON.
Status Codesβ
| Code | Description | Meaning |
|---|---|---|
200 | OK | successful request |
404 | Not Found | resource does not exist |
500 | Internal Server Error | unexpected server issue |
π‘ Technology Usedβ
- OpenAPI 3.0
- Swagger Editor (local editing)
- SwaggerHub Mock Server (autoβgenerated)
- JSON schema modeling