REST API for Bonita UI Builder
The REST API lets you automatize some UI Builder actions with HTTP requests.
These REST APIs aim to solve the following cloud deployment use cases:
-
Deploy initial applications
-
Update applications: add, update, and remove applications
-
Re-deploy applications: ensuring resilience (for example in case of a Kubernetes pod crash)
These APIs are allowed to the Bonita technical user only. |
Importing applications
Import an application
-
Method: POST
-
URL:
/uib/api/v1/applications/import
-
Headers:
-
x-requested-by: Appsmith
-
-
Body (form-data): A JSON application file
Import a set of applications
-
Method: POST
-
URL:
/uib/api/v1/applications/import-bulk
-
Headers:
-
x-requested-by: Appsmith
-
-
Body (form-data): A zip file containing JSON application files
Response Status
-
200 OK
-
If all the applications have been imported
-
If only a subset of the applications have been imported: the response body contains a status 206 (PARTIAL_CONTENT) and the list of applications that have been imported
-
-
400 BAD_REQUEST
-
If the file is not a zip file
-
If the zip file does not contain JSON application files or the applications have already been imported
-
Example
curl -X POST 'http://localhost/uib/api/v1/applications/import-bulk' \
--header 'x-requested-by: Appsmith' \
--header 'Cookie: X-Bonita-API-Token=xxxxx ; JSESSIONID=xxxxx' \
--form 'file=@"zip_path/apps.zip"'
The JSON descriptors must be placed at the root of the ZIP file to be imported correctly. |