A document's sections, in reading order
const url = 'http://localhost:11044/api/v1/documents/outline?uri=example';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:11044/api/v1/documents/outline?uri=example' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Headings only, each once: id, title, ordinal, depth and whether it has words of its own. A document ingested before sections were ordered lists none, with a message saying so.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The document’s uri, as GET /documents lists it
Responses
Section titled “Responses”The outline
What GET /documents/outline answers: a stored document’s headings in reading order, each listed once
object
Why sections is empty — the document predates section ordering and must be ingested again. Null when there are sections
Every heading in reading order, each once. Empty for a document ingested before sections were ordered
One heading of a stored document: where it sits in the document, and what it is called
object
1 for a heading directly inside the document, 2 for one inside that, and so on. Null when not recorded
Whether it has words of its own to read. A heading can have both words and headings inside it
The section’s id: what sectionId on a POST /documents/ask source refers to
Whether it has no headings inside it
Its place in reading order, counted from 0: the ordinal GET /documents/sections takes. Not every number is used. Null when the stored section carries none
Id of what this heading sits directly inside: the enclosing heading, or the document itself for a top-level heading. Null when not recorded
The heading’s text
The document’s title. Null when it has none
The document’s uri, as GET /documents lists it
The caller’s world holds no document at that uri
A 404 from the document reader: the caller’s world holds no such document, or the document has no such section
object
What was not found, naming the uri and, for a section, the ordinal

