api
engine-dmo api: The content API: its contract, a site's project contract, and what it answers for a path. Every subcommand, argument and flag.
The content API: its contract, a site’s project contract, and what it answers for a path.
| Command | What it does |
|---|---|
engine-dmo api keys create | Issue a key and print it once: a publishable key for browser code (CORS for its origins) or a secret key for the frontend’s server |
engine-dmo api keys list | Every key, live first: its id, name, kind, the key masked to its prefix and last four characters, sites, capabilities, origins and state |
engine-dmo api keys revoke | End a key now; requests carrying it answer invalid_key |
engine-dmo api keys rotate | Issue a key like an existing one and print it once; the old key keeps working for --grace, so the new one is deployed first |
engine-dmo api member form | Print the form description a given member would receive for a listing |
engine-dmo api member openapi | Print the member API’s OpenAPI 3.1 document, generated from the route table in this binary |
engine-dmo api member routes | List the member API’s operations and whether this project serves them |
engine-dmo api openapi | Print the content API’s OpenAPI 3.1 document: the generic contract from the route table in this binary, or with --types this project’s, its types included |
engine-dmo api resolve | Print what the content API answers for a path on a site: the outcome, the document and the page metadata, recording no miss |
engine-dmo api schema | Print a site’s project contract: the JSON Schema of each of its types as delivered, or an OpenAPI document with them |
engine-dmo api keys create
Issue a key and print it once: a publishable key for browser code (CORS for its origins) or a secret key for the frontend’s server.
engine-dmo api keys create [flags] | Flag | Type | Default | Meaning |
|---|---|---|---|
--capability | strings | preview (secret keys), events (secret keys) or forms; reading published content is implied | |
--expires | string | when the key stops: a duration such as 2160h or a time such as 2027-01-01T00:00:00Z; never when absent | |
--kind | string | publishable (browser code) or secret (the frontend’s server) | |
--name | string | what the key is for, such as “Astro frontend (production)” | |
--origin | strings | a publishable key’s allowed browser origin, such as https://www.example.org; none allows the frontend origin of a headless site it reads | |
--site | strings | a site the key reads; repeat or comma separate for several |
--json prints the command’s own JSON document. Runs in a project.
engine-dmo api keys list
Every key, live first: its id, name, kind, the key masked to its prefix and last four characters, sites, capabilities, origins and state.
engine-dmo api keys list [flags] | Flag | Type | Default | Meaning |
|---|---|---|---|
--site | string | only the keys that read this site |
--json prints the command’s own JSON document. Runs in a project.
engine-dmo api keys revoke
End a key now; requests carrying it answer invalid_key.
engine-dmo api keys revoke [flags] | Flag | Type | Default | Meaning |
|---|---|---|---|
--confirm | bool | confirm the key should stop working now | |
--id | string | the key’s id, from engine-dmo api keys list |
--json prints the command’s own JSON document. Runs in a project.
engine-dmo api keys rotate
Issue a key like an existing one and print it once; the old key keeps working for --grace, so the new one is deployed first.
engine-dmo api keys rotate [flags] | Flag | Type | Default | Meaning |
|---|---|---|---|
--grace | duration | 24h0m0s | how long the old key keeps working; 0 ends it now |
--id | string | the key’s id, from engine-dmo api keys list |
--json prints the command’s own JSON document. Runs in a project.
engine-dmo api member form
Print the form description a given member would receive for a listing.
engine-dmo api member form [flags] Available in engine-dmo only.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--listing | string | the listing’s document id | |
--person | string | the person’s id |
--json prints the text output in the JSON envelope. Runs in a project.
engine-dmo api member openapi
Print the member API’s OpenAPI 3.1 document, generated from the route table in this binary.
engine-dmo api member openapi Available in engine-dmo only.
--json prints the text output in the JSON envelope. Needs no project.
engine-dmo api member routes
List the member API’s operations and whether this project serves them.
engine-dmo api member routes [flags] Available in engine-dmo only.
--json prints the text output in the JSON envelope. Runs in a project.
engine-dmo api openapi
Print the content API’s OpenAPI 3.1 document: the generic contract from the route table in this binary, or with --types this project’s, its types included.
engine-dmo api openapi [flags] | Flag | Type | Default | Meaning |
|---|---|---|---|
--api | string | content | the API whose contract to print: content |
--types | bool | include the project’s types: the document GET /api/content/v1/openapi.json serves |
--json prints the text output in the JSON envelope. Needs no project.
engine-dmo api resolve
Print what the content API answers for a path on a site: the outcome, the document and the page metadata, recording no miss.
engine-dmo api resolve <path> [flags] | Argument | Required | Repeatable |
|---|---|---|
path | yes | no |
| Flag | Type | Default | Meaning |
|---|---|---|---|
--host | string | the request host, for a site whose locales are by domain | |
--site | string | the site’s key; the default site when absent |
--json prints the text output in the JSON envelope. Runs in a project.
engine-dmo api schema
Print a site’s project contract: the JSON Schema of each of its types as delivered, or an OpenAPI document with them.
engine-dmo api schema [flags] | Flag | Type | Default | Meaning |
|---|---|---|---|
--format | string | jsonschema | jsonschema or openapi |
--site | string | the site’s key |
--json prints the text output in the JSON envelope. Runs in a project.