Execute a bot
- Sandbox: available
- Staging: available
- Production: unknown
Runs a Medplum Bot of your project, found by its identifier, and returns its output. Use it to call custom server-side logic without knowing the Bot's id.
Auth: bearer token. The Bot is searched and run with your token, so you need read access to the Bot and permission to execute it.
Behaviour
identifieruses FHIR token search syntax:system|value,system|, or justvalue. Exactly one Bot must match.- The JSON request body is passed to the Bot as its input, unchanged. The body is optional.
- The response is whatever the Bot returns.
Example
curl -X POST 'https://api.sandbox.ovok.com/bots?identifier=https://example.com|get-users' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "parameter1": "value1" }'identifier*stringIdentifier containing system and/or value parameters, e.g.: "https://api.ovok.com/fhir/Identifier/my-resource|abc123", "https://api.ovok.com/fhir/Identifier/my-resource", "abc123"
body*BotInputDtoapplication/jsonInput for the Bot, passed to it unchanged.
Whatever the bot returns.
response?BotOutputDtoapplication/jsonOutput of the Bot, returned unchanged.
curl -X POST 'https://api.sandbox.ovok.com/bots?identifier=string'nullRevoke sessions DELETE
Signs the caller out of one or more sessions. Use it for "sign out everywhere" and "sign out other devices" actions. **Auth:** bearer token. **Scope:** the signed-in user's own sessions. A session ID that is not one of the caller's sessions revokes nothing. ## Behaviour - `option` in the path is one of: - `current`: the session of the token you call with. - `other`: every session except the current one. - `all`: every session, including the current one. - a session ID (UUID) from `GET /auth/session`: that one session. - Ovok rejects the access tokens of the revoked sessions on their next request, and marks each Login as revoked in Medplum so the session cannot be renewed. - Revoking `current` or `all` also ends the token you called with. - The response echoes the revoked sessions with `revoked: true`: one object for `current` or a session ID, a list for `other` and `all`. - To end only the token you hold, without the session, use `POST /v1/auth/logout`. ## Example ```bash curl -X DELETE 'https://api.sandbox.ovok.com/auth/session/other' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
List content with translations GET
Lists content items as pairs of the default-language item and its translation in the requested language. Use it for translation screens that show the original next to the translation. **Auth:** bearer token. **Scope:** the caller's project (from the token). Only items in that project are listed. ## Behaviour - `type` is one of `blog`, `video`, `audio`, `template` or `export-template`. - `language` is the target language and must be one of the languages in your project's locale settings. - Each result has `source` (the item in the project's default language) and `target` (the item in `language`) for the same key. Either one is missing when that language has no item for the key. - Pairs are sorted by the target's `date`, newest first, falling back to the source's `date`. - `search` is a fuzzy match over the title, author name, category, section titles and text, and key of both items. - `code` keeps only items with that content code. - `_count` defaults to `10` and `_offset` to `0`. `total` is the number of matching pairs before paging. - The route is also served under `/internal/cms/{type}`. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/cms/blog/map/de-DE?search=sleep&_count=20' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```