Aether Kernel is the core app.
- It contains all the relevant data:
- The list of Projects (AKA Surveys).
- The list of instructions (AKA Mappings) that transforms the received submissions into entities.
- The submissions and the extracted entities.
Aether UI is the "instructions" builder UI.
- Starting from an input sample (AKA Pipeline), it helps creating the instructions (AKA Contract) to extract and transform the relevant data (AKA Output).
Aether ODK is the module that communicates with ODK Collect.
- It contains the xForms and the surveyors.
- For each xForm it generates an "identity" mapping that for each received submission extracts an entity equal to it (this kind of entities are the ones showed in Gather).
- It implements the API that ODK Collect needs to fetch the xForms and media files and, to submit data.
- It receives the submissions from ODK Collect and redirects them to Aether Kernel along with the linked attachments.
Gather is basically the data UI.
- So far, it keeps little data only related to the frontend settings.
- It helps creating the Surveys/Projects, xForms and Surveyors and distributing them to the aether apps.
- It fetches the identity entities from Kernel and displays them in a table.
Kernel
+------------------+ +------------------+ +------------------+ +------------------+
| Project |<----| MappingSet |<----| Submission |<----| Attachment |
+==================+ +==================+ +==================+ +==================+
^ ^
| |
+------------------+ +------------------+
| Mapping |<----| Entity |
+==================+ +==================+
UI
+------------------+ +------------------+ +------------------+
| Project |<----| Pipeline |<----| Contract |
+==================+ +==================+ +==================+
ODK
+------------------+ +------------------+ +------------------+
| Project |<----| XForm |<----| MediaFile |
+==================+ +==================+ +==================+
Gather
+------------------+
| Survey |
+==================+
Correspondence table:
App | Set of similar inputs | Input sample | Set of transform instructions |
---|---|---|---|
Kernel | Project | MappingSet | Mapping |
UI | Project | Pipeline | Contract |
ODK | Project | xForm | XForm (identity instructions) |
Gather | Survey | --- | --- |
The way to authenticate in Aether and Gather using Kong as Gateway service is to include the X-Oauth-Token
value in all the requests.
curl -L -H "Authorization: Bearer $X_OAUTH_TOKEN" $url
The URLs to access Aether are:
- Aether Kernel:
${BASE_HOST}/{realm}/kernel
- Aether ODK:
${BASE_HOST}/{realm}/odk
Using
BASE_HOST=http://aether.local
realm=ehealth
then:
- Aether Kernel:
http://aether.local/ehealth/kernel
- Aether ODK:
http://aether.local/ehealth/odk
The REST API implements a page number pagination.
http://aether.local/ehealth/kernel/projects.json?page_size=10&page=5
{
"count": 1023,
"next": "http://aether.local/ehealth/kernel/projects.json?page_size=10&page=6",
"previous": "http://aether.local/ehealth/kernel/projects.json?page_size=10&page=4",
"results": [
…
]
}
The default page_size
is 10
.
To reduce the size of the response there are also available two parameters:
field
, comma-separate list of field names to include in the response.omit
, comma-separate list of field names to omit in the response.
http://aether.local/ehealth/kernel/mappingsets.json?omit=created,modified
http://aether.local/ehealth/kernel/projects.json?fields=id,name
{
…,
"results": [
{
"id": "dcb361e7-643e-4761-84b6-0f011e2a6a9b",
"name": "Project 1"
},
…
]
}
These two parameters are also available to GET a single item.
-
http://aether.local/ehealth/kernel/projects.json
-
http://aether.local/ehealth/odk/projects.json
This request is very expensive because it also returns the linked xForms and surveyors. It's convenient to reduce the size of the response with
omit=xforms,surveyors
.
There is a one to one relation between Kernel and ODK projects sharing the same id
.
http://aether.local/ehealth/odk/xforms.json?fields=id,title,version,kernel_id,project
The ODK xForms produce a pair of MappingSet and Mapping (with the same id
) in kernel.
The xForm model has a field named kernel_id
to identify them.
http://aether.local/ehealth/odk/projects/<<project_id>>.json?fields=id,name,xforms
http://aether.local/ehealth/kernel/submissions.json?fields=id,payload&project=<<project_id>>
http://aether.local/ehealth/kernel/submissions.json?fields=id,payload&mappingset=<<xform_kernel_id>>
http://aether.local/ehealth/kernel/entities.json?fields=id,payload&project=<<project_id>>
http://aether.local/ehealth/kernel/entities.json?fields=id,payload&mapping=<<xform_kernel_id>>