Apps management

Get apps

GET /aalam/base/apps

Get the list of apps with chosen fields and with fitering constraints

Permissions

Flags

  • deny_anon

Parameters

  • fields

The list of fields to be selected, separated by comma. Valid fields are [’id’, ‘app_code’, ‘provider_code’, ‘is_running’, ‘app_name’, ‘provider_name’, ‘version’]. If fields value is present, all the fields will be present in the output

  • id(_ne|_ge|_le|_g|_l)

Filter app with ‘id’. Value should be an integer. You can add integer filter qualifiers like the following. _ne - Not equal to value _le - Less than or equal to value _ge - Greater than or equal to value _g - Greater than value _l - Less than value

  • app_code(_like)

Filter apps with ‘app_code’. You can the following qualifiers _like - Wild card pattern matching value. For ex %foo - Any value that ends with ‘foo’ foo% - Any value starting with ‘foo’ foo%bar - Any value starting with ‘foo’ and ends with ‘bar’

  • provider_code(_like)

Filter apps that qualify ‘provider_code’ value.

  • app_name(_like)

Filter apps that qualify ‘app_name’ value.

  • provider_name(_like)

Filter apps that qualify ‘provider_name’ value.

  • is_running

Value should either be ‘true’ or ‘false’. ‘true’ - Filter apps that are running ‘false’ - Filter apps that are not running

  • version(_like)

Filter apps that qualify ‘version’ value.

  • public_rootable

When this filter is set all the other filters will be ignored. This gives the list of App that are capable of rooting to anonymous request. These apps can serve as a website for the anonymous users.

Outputs

  • The request is successful. The output fields varies with the selection of fields parameter.

    Status code: 200

    Content type: application/json

    Content specification

{
    "id": "Integer denoting the app id",
    "app_code": "App's code value",
    "provider_code": "App's provider code value",
    "is_running": "true/false - running status of the app"
    "app_name": "Name of the app",
    "provider_name": "Provider name of the app",
    "version": "Installed version of the app"
}
  • Some of the input parameters are invalid

    Status code: 400

App actions.

POST /aalam/base/app/{provider}/{app_name}

Start, stop or update the application.

Permissions

Permissions

any of the following permissions

  • Apps/manage

  • Apps/start-stop

Parameters

  • action

Action to be performed on the app. Valid values are the following. start - Start the application if not running. stop - Stop the application if it is running. update - Check for updates and update the app if there is a new version public_root - This app will now serve as the root page for for the public (anonymous) requests

Outputs

  • Action is performed successfully.

    Status code: 200

  • The input parameter is not one among (start | stop | update).

    Status code: 400

Get app permissions

GET /aalam/base/app/{provider}/{app_code}/required_permissions

Returns the list of permissions that an app needs as mentioned in itsPKG-INFO

Permissions

Permissions

any of the following permissions

  • Apps/manage

  • Apps/start-stop

Outputs

  • Successfully fetched the app’s permissions.

    Status code: 200

    Content type: application/json

    Content specification

[List of fully qualified permission needed by this app]

Get app status

GET /aalam/base/app/{provider}/{app_name}

Returns the running status of an app.

Permissions

Flags

  • deny_anon

Outputs

  • API is successful.

    Status code: 200

    Content type: application/json

    Content specification

{
    "status": "Running status of the app - Valid values are"
              "running" - The app is up an running.
              "stopped" - The app is not running.
}

Uninstall app.

DELETE /aalam/base/app/{provider}/{app_name}

Uninstall an installed app from a portal.

Permissions

Permissions

all of the following permissions

  • Apps/manage

Outputs

  • Uninstalled the app successfully

    Status code: 200

  • The app is not yet installed

    Status code: 404

  • This app is neede by other apps, and it cannot be uninstalled

    Status code: 409

  • There were some server errors while trying to uninstall

    Status code: 500