Approvals work in the app today. The API steps that submit and read approvals are
in preview.
Prerequisites
- An ego account with the app running. See the project README to run it locally.
- A token that carries the
approvals:writeandapprovals:readscopes. Grant them on the consent screen.
Submit the approval
The app submits an approval withapprovals:write. Give it a question and the options the owner can choose from.
id:
Resolve it in ego
Open the app and go to Approvals. The pending approval shows the question, the background context, and the options. Select one to resolve it. ego records the choice and marks the approvalresolved.
Read the result
The app reads the resolution withapprovals:read. Fetch the approval by id:
resolution. resolvedBy is the role that resolved it — owner here:
Resolve from the app
The app can also resolve its own approval withapprovals:resolve, choosing an option or supplying free-text:
{ "ok": true }. Resolving one that is already resolved returns 409.
Next steps
Push notifications
Send the owner an event from an app.
API reference
The endpoints behind approvals.
