REST API · Texts
Context
The stored context notes.
GET
/api/v1/contextWhere the text sits in its work, what happens, who and where is named, what comes next, and a few lines on the work. Hand-written for graded passages; for library sections, stored once a reader has opened Context. Never generated here.
Parameters
| Name | Description |
|---|---|
refstring | RequiredA library or graded-passage URL, a CTS URN (urn:cts:latinLit:phi0690.phi003.perseus-lat2:1.46) or a citation ("Virgil, Aeneid 1.46"). Up to 500 characters. Example |
Response
200 OK with a ContextResponse object.
| Name | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kindstring | One of | ||||||||||||||||
langstring | Language code: la (Latin) or grc (Ancient Greek). One of | ||||||||||||||||
languagestring | |||||||||||||||||
citationstring | |||||||||||||||||
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. | ||||||||||||||||
prevLink or null | 4 fields
| ||||||||||||||||
nextLink or null | 4 fields
| ||||||||||||||||
creditCredit | 5 fields
| ||||||||||||||||
machineWrittenboolean | False for the graded passages' hand-written notes. | ||||||||||||||||
sectionobject or null | Null until someone has opened Context for this part in the reader.4 fields
| ||||||||||||||||
workobject or null | A few lines about the work.2 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.