REST API · Library
Work
A work, its editions and its contents.
GET
/api/v1/library/{lang}/{author}/{work}Mirrors the work page. The contents list the default edition's reading sections in order, a page at a time.
Parameters
| Name | Description |
|---|---|
langstring | RequiredIn the pathLanguage as in site URLs. One of |
authorstring | RequiredIn the path Example |
workstring | RequiredIn the pathWork slug, as in the site URL. Example |
limitinteger | OptionalAt most 1000. Default |
offsetinteger | Optional Default |
Response
200 OK with a Work object.
| Name | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
titlestring | |||||||||||||||||||||
nativeTitlestring or null | The title in Latin or Greek, when it differs. | ||||||||||||||||||||
authorstring | |||||||||||||||||||||
langstring | Language code: la (Latin) or grc (Ancient Greek). One of | ||||||||||||||||||||
genrestring or null | |||||||||||||||||||||
wordsinteger | |||||||||||||||||||||
sectionsinteger | Reading sections. | ||||||||||||||||||||
urnstring or null | CTS URN, e.g. urn:cts:latinLit:phi0690.phi003.perseus-lat2:1.1-1.11. Null when the edition has none (The Latin Library's own numbering). | ||||||||||||||||||||
urlstring | Absolute URL. | ||||||||||||||||||||
apistring | Absolute URL. | ||||||||||||||||||||
languagestring | |||||||||||||||||||||
formstring or null | prose, verse or mixed. | ||||||||||||||||||||
meterstring or null | |||||||||||||||||||||
markdownstring | Absolute URL. | ||||||||||||||||||||
authorUrlstring | Absolute URL. | ||||||||||||||||||||
creditCredit or null | The default edition's credit: the text every section URL serves.5 fields
| ||||||||||||||||||||
editionsarray of object | 4 fields
| ||||||||||||||||||||
contentsobject | 5 fields
|
Errors
| Status | When |
|---|---|
400 Bad Request | A parameter is missing or invalid, or the reference isn't a text. |
404 Not Found | Not in the library. |
429 Too Many Requests | Too many requests from one address. Wait a minute. |
500 Internal Server Error | Something went wrong on our side. |
Error bodies are described in Caching, limits and errors.