The /api/apps endpoint can be used for installing, deleting and listing apps. The app key is based on the app name, but with all non-alphanumerical characters removed, and spaces replaced with a dash. My app! will return the key My-app .
Previous to 2.28, the app key was derived from the name of the ZIP archive, excluding the file extension. URLs using the old format should still return the correct app in the api.
Previous to 2.28 the app property folderName referred to the actual path of the installed app. With the ability to store apps on cloud services, folderName’s purpose changed, and will now refer to the app key.
You can read the keys for apps by listing all apps from the apps resource and look for the key property. To list all installed apps in JSON:
curl -X GET -u user:pass -H "Accept: application/json" http://server.com/api/26/apps
You can also simply point your web browser to the resource URL:
The apps list can also be filtered by app type and by name, by appending one or more filter parameters to the URL:
App names support the eq and ilike filter operators, while appType supports eq only.
To install an app, the following command can be issued:
curl -X POST -u user:pass -F firstname.lastname@example.org http://server.com/api/26/apps
To delete an app, you can issue the following command:
curl -X DELETE -u user:pass http://server.com/api/26/apps/<app-key>
To force a reload of currently installed apps, you can issue the following command. This is useful if you added a file manually directly to the file system, instead of uploading through the DHIS2 user interface.
curl -X PUT -u user:pass http://server.com/api/26/apps