Apps
You can extend Aidbox with custom Apps. The app can define custom resources, custom endpoints, and subscribe to hooks or subscriptions. The app is a standalone service which will work with Aidbox to implement your specific app. App should be registered in Aidbox.
You define the App using Aidbox SDK for your language and should not reverse engineer internal API, because it can be subject to change.
NodeJs SDKClojure SDKPython SDKApp Resource
To define the App, we should provide the app manifest:
endpoint
In the endpoint
section, you describe how Aidbox will communicate with your service.
type
string
true
http-rpc | ws-rpc
http-rpc
Protocol of communication
url
string
true
Url of service to communicate
secret
string
Secret key used for communication
entities
In the entities
section of the App manifest, you can extend existing resources, define custom profiles, or hook into lifecycle:
As well as define custom resources:
In the entities section, you define resources as a map <resourceType> : <resourceStructure>
:
Resource structure is defined by keyword attrs{ <element-name>: <element-definition> ... }
At the root of resource definition, you can also define hooks and profiles for this resource.
Element definition will be translated into Attribute Meta-Resource and have the following properties:
type
code
Primitive or Complex Type name
operations
In the operation section, you define Custom REST operations as a map <operation-id>: <operation-definition> and access policy (which will be bound to this operation):
resources
In the resources section, you can provide other meta-resources for Aidbox in the form {resourceType: {id: resource}}
hooks
Aidbox will provide a set of hooks you can hook-in to customize its behavior:
subscriptions
In the subscription section, you can define subscriptions (a special type of hooks, which do not need a response). You can subscribe to specific life-cycle events of resources filtered by criteria or to changes in search queries.
Last updated