bb
Devbox setup to start Aidbox, it contains configured API constructor example. Once Aidbox is running, open Profiles
tab in the Aidbox UI. If everything is configured properly, page should contain namespace with AIDBOX_ZEN_ENTRYPOINT
symbol which is mybox/box
in this example. View of the symbol should show loaded routes.AIDBOX_ZEN_ENTRYPOINT
env, the value must be a namespace/symbol
, e.g.:AIDBOX_ZEN_PATHS
and imported or specified directly inAIDBOX_ZEN_ENTRYPOINT
env.
More info on loading namespace​aidbox/system
tag. aidbox/system
describes a set of services to start and configurations.engine
and its configuration.aidbox/http
- Describes http service, contains set of apis
. Each api must be tagged with aidbox.rest/api
.aidbox.rest/api
api
describes routing, route can contain operations, subroutes and other apis. Operations must be tagged with aidbox.rest/op
.:middlewares
can be added to an api
.aidbox.rest/op
op
describes REST operation. :engine
specifies what operation handler should be used for this operation. Each engine can accept own parametersaidbox.rest/op-engine
saidbox.rest.v1/aidbox-action
- Expects :action
, passes request to existing Aidbox action. You can see list of available operations with this request:
GET /Operation?_elements=action&_result=array&_count=1000
aidbox.rest.v1/echo
- expects :response
in the definition, returns the response.:resource
and :format
(fhir
or aidbox
)aidbox.rest.v1/search
aidbox.rest.v1/create
aidbox.rest.v1/read
aidbox.rest.v1/update
aidbox.rest.v1/delete
aidbox.rest.v1/patch
aidbox.rest.v1/transaction
aidbox.rest.acl/search
aidbox.rest.acl/create
aidbox.rest.acl/read
aidbox.rest.acl/update
aidbox.rest.acl/delete
op
. Middlewares are applied to aidbox.rest/api
which contains operations or other apis. On request Aidbox routing determines what op
should be executed. Before executing the op
Aidbox collects all middlewares applied to the apis containing the op. Then collected middlewares are applied in sequence to the request.:engine
. The :engine
determines what the middleware will do. Depending on the chosen :engine
middleware can accept different parameters.aidbox.rest/middleware-engine
aidbox.rest.v1/match-middleware
- checks if a request satisfies to some pattern. Similar to the AccessPolicy
matcho
engineaidbox.rest.v1/params-middleware
- adds request query-string parameters taking data from the request contextaidbox.rest.v1/transform-middleware
- transforms incoming request taking data from the request context aidbox.rest.middlewares/transform-request-data
- the same as transform-middleware
but provides more complex functionalityObservation
resource available at GET /access/Observation
and GET /access/Observation/<id>
. Defined endpoints also contain a middleware injecting patient
search parameter to ensure that user can only search for Observations for a specific patient.