Render the briefing lens over a chosen time window
const url = 'http://localhost:11044/api/v1/lenses/briefing';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"asOf":"example","lookbackDays":1,"since":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/lenses/briefing \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "asOf": "example", "lookbackDays": 1, "since": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional, and never needed: the call always acts as the signed-in principal. Naming the principal changes nothing; naming anyone else is refused with 403.
Request Body
Section titled “Request Body”Optional window for the brief. since and asOf are ISO-8601 dates or instants, lookbackDays a whole number of days; every field is optional and an omitted one is not passed to the lens, so with none (or no body) the configured briefing strategy’s window applies. Reading the brief this way does not move the daily brief’s cursor
Optional window for POST /lenses/briefing. Each field present is passed to the world’s briefing lens as the argument of the same name; with none, the lens uses its own default window (30 days in the default world).
object
ISO-8601 date or instant passed to the lens as asOf; it has effect only if the world’s briefing lens reads it, which the default one does not
Number of days back from now the brief covers when since is absent. Null leaves it to the lens.
ISO-8601 date or instant to brief since; the default briefing lens prefers it over lookbackDays. Null leaves it to the lens.
Example generated
{ "asOf": "example", "lookbackDays": 1, "since": "example"}Responses
Section titled “Responses”No authenticated principal
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}username names someone other than the signed-in principal
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}No briefing lens defined in this world
A refusal from the lens authoring surface. Carries only the reason
object
Why the request was refused, written to be shown. Names the lens or view where the refusal is about one
Example generated
{ "error": "example"}
