APIs
App Settings
- GET /aalam/base/settings
For every app, you will have multiple settings that are specific to theapp itself. This API will consolidate all the settings that are applicablefor the user requesting it. The apps that want to be part of the settingsapp can hook this and send out their list of settings menus
Permissions
Flags
deny_anon
Outputs
Sends the list of apps and their configuration urls
Status code: 200
Content type: application/json
Content specification
[
{
"provider_name": "Provider name of the app",
"app_name": "App name of the app",
"provider_code": "Provider code of the app",
"app_code": "App code of the app"
"setting_items": [{
"url": "App's frontend setting url",
"title": "Title of the setting item",
"description": "A breif description of the configuration",
"should_setup" "boolean"
},
...
]
},
...
Hooks Input
An app can return the list of frontend URLs along with a short description. Content type: application/json Content specification
[{
"url": "Configuration HTML URL that will be loaded in an iframe
in the client browser",
"title": "Title of the setting item",
"description": "Very brief description of the configuration",
"should_setup": "True or false"
},
...
]
Apps palette
- GET /aalam/base
The list of apps that are applicable for a user who invokes this API.This API accepts input hooks. The app which hooks this API must processthe requesting user permissions and send an appropriate URL as theentry point.If the user is not permitted to any of the resources of a hooked app,the app should return a status_code other than 200 from the hookcallback.
Outputs
Sends the list of apps applicable for the user requesting
Status code: 200
Content type: application/json
Content specification
[
{
"entry": "The entry url of an app",
"provider_name": "Provider name of the app",
"app_name": "App name of the app",
"provider_code": "Provider code of the app",
"app_code": "App code of the app"
},
...
Hooks Input
An app can return a data if the user who had requested this url is permitted to access any resource of that app. Content type: application/json Content specification
{
"entry": "Entry url to the app for the user who
requested this API",
"description": "Very brief description of the app",
"has_setup": <boolean> True if app is to be configured else False
}
Setup Items
- GET /aalam/base/setup
For each and every app that needs some configuration done before beingusable, can send its configuration url. This way the users can completethe setup all in a single page. This is like a setup wizard that willguide the user to complete the configurations easily.
Outputs
Sends the list of apps and their configuration urls
Status code: 200
Content type: application/json
Content specification
[
{
"entry": "The entry url of an app",
"provider_name": "Provider name of the app",
"app_name": "App name of the app",
"provider_code": "Provider code of the app",
"app_code": "App code of the app"
"setup_items": [{
"url": "App's configuration url",
"priority": "A number ranging from 1 - 100, 100 being most priority",
"description": "A breif description of the configuration"
},
...
]
},
...
Hooks Input
An app can return the list of configuration URLs along with the priority in the range of 1 - 100 with 100 being the most priority. The configuration with the most priority will be show to user first. Content type: application/json Content specification
[{
"url": "Configuration HTML URL that will be loaded in an iframe
in the client browser",
"description": "Very brief description of the configuration",
"priority": "Number in range of 1 - 100, with 100 being the
highest priority"
},
...
]
Dashboard
- GET /aalam/base/dashboard
Get a list of graphs applicable for the user.
Outputs
Request success
Status code: 200
Hooks Input
Any app can hook in to this API to show a relavant graphical information for a user. If a hooked app has not information to present, it should return a status code other than 200 from the hook callback. Content type: application/json Content specification
[{
"title": "Title of the graph",
"url": "Url which would be returning the dashboard data",
"width": "With of the graph. Number in the range of 1 to 10"
"height": "Height of the graph. Number in the range of 1 to 10",
"tiles": true if the item has tile information else false,
"type": The type of data that 'url' sends. It should be either 'json' or 'html'. If 'json',
the contents would be used by chart.js to create data. The
json data should be of format {
'tiles': [{
'title': '', 'value': '',
'comp-title': '',
'comp-value': '',
'percent': 'value'}],
'chartjs': 'The content to be use to create chart'
}. If it is html, an the page would be loaded in an iframe
}]