Bundle import API
Import API endpoint
API endpoint is available at https://${contror_tower_host:port}/workfusion/api/v2/workfusion/bundle/import.
API uses form authentication and get be accessed with your Control Tower credentials.
Request type: multipart/form-data
For additional details, see API request below.
Import API specification
The table below specifies API contracts for the BP Bundle Import with emphasizing differences in implementation of 9.x and 10.x versions.
Requirement |
Details |
||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| API execution | |||||||||||||||||||||
API contract |
|||||||||||||||||||||
| API request | POST request /workfusion/api/v2/workfusion/bundle/import Request type: Params:
|
||||||||||||||||||||
| API response | Details of each sub-component in a format of /v1/healthcheck API Refer to the documentation for additional details:
|
||||||||||||||||||||
| Non-persistent import and roll-back |
Import API example
One can send a POST request to the API using the one of the examples below:
curl POST
curl -X POST \
--user user:password \
-H 'Authorization: Basic ...' \
-F bundleFile=@path_to_file \
-F conflictResolution=REPLACE \
https://${control_tower_host:port}/workfusion/api/v2/workfusion/bundle/import
Or Postman with v9.2.2 Import API for Postman.json.
An API response is in the form of a JSON with details for each component imported.
Response sample
{
"name":"Bundle Import",
"status":"OK",
"errors":[
],
"warnings":[
],
"infos":[
],
"components":[
{
"name":"S3",
"status":"OK",
"errors":[
],
"warnings":[
],
"infos":[
'/bucketname/filepath/filename1.ext was imported',
'/bucketname/filepath/filename2.ext was imported',
'/bucketname/filepath/filename3.ext was imported'
],
"components":[
]
},
{
"name":"Artifactory",
"status":"OK",
"errors":[
],
"warnings":[
],
"infos":[
'ews-api-1.0 jar was imported to release repository under com.microsoft.ews ews-api-1.0.jar'
],
"components":[
]
},
{
"name":"AutoML",
"status":"OK",
"errors":[
],
"warnings":[
],
"infos":[
"Hyper model 'generic-ru-1.0' was replaced",
"Trained model 'document_xml_123fe_sdsdsdv_123123' was imported"
],
"components":[
]
},
{
"name":"Datastore",
"status":"OK",
"errors":[
],
"warnings":[
],
"infos":[
"Datastore 'users' was imported"
],
"components":[
]
}
]
}
For authentication options, refer to the REST API guide.
REST service troubleshooting
Make sure your SPA/IA Cloud Enterprise environment supports Import API. Import API is supported in SPA 9.2.2 and Intelligent Automation Cloud Enterprise 10.1+. Note that 9.x and 10.x versions have different API endpoints.
401 authentication error
Solution: Check your username/password. Use Control Tower user. This user account is expected to have the Advanced Package Import permission.
500 internal server error
Solution: Get SSH access to your Control Tower application server. Then, look for workfusion.out.log in /opt/workfusion/supervisord/log.
cd /opt/workfusion/supervisord/log
tail -500 workfusion.out.log
Known issues and limitations
- Repeatable import of the Rules with the Composite type results in duplicates created in the instance causing duplicates even when
conflictResolution=REPLACEis used. The duplicates do not affect the runtime, just create clutter. They can be removed from Control Tower UI. All other entities like Bot Configs (ETL, Machine), Rules (Adjudication, Qualification, Task Comparator), Templates (Macro, Bot, Base, Bot Base, Task), Use Cases (Manual, Bot Other, Bot ETL, Business Process), Data Stores will be replaced in case of conflict. It is recommended to import Composite Rules in a separate bundle to avoid duplicates. - If the Business Process has been run and one tries to import the Bundle with
conflictResolution=REPLACE, it will create a copy of the Business Process with the same name in Control Tower. If the Business Process has never been run, it will override the existing Business Process. - The maximum Bundle size is limited to 3 GB. If the bundle exceeds this limit, it is recommended to split into multiple smaller packages.