AI Agent Variation Asset Bundle migration API
An AI Agent Variation Asset Bundle is not the same as an AI Agent Asset Bundle. For the AI Agent Asset Bundle API, see the related API documentation.
- For authentication details, see WorkFusion REST API | API security.
- To make API requests on a Windows 10 machine shipped with cURL, refer to the Windows 10 cURL example documentation.
- To explore AI Agent Variation Asset Bundle migration via the Control Tower user interface, refer to the Manage AI Agent Variations guide.
Import
Unlike the AI Agent Asset Bundle import, there are no special import strategies for an AI Agent Variation Asset Bundle.
POST /v1/bundle-import/variant
Uploads an AI Agent Variation Asset Bundle to a temporary folder, validates the Bundle structure, and starts asynchronous import.
Returns the import UUID and status.
The following statuses are possible:
- ACCEPTED: the import is successful.
- UPLOAD_FAILED: the upload fails.
- VALIDATION_FAILED: incorrect checksum or Variation Asset Bundle structure are provided.
- FAILED: the import fails with errors.
Parameters
bundleFile: required; path to the zip file representing an AI Agent Variation Asset Bundle. The acceptable size is up to 3 GB.digital-worker-code: required; AI Agent code used to identify the exact AI Agent to import a variant.checksum: optional; AI Agent Variation Asset Bundle MD5 checksum to verify that the provided bundle is uploaded without data corruption.
Request example
curl -X POST "https://core1-wfaw-10061-workfusion-lb1.wflab.io/workfusion/api/v1/bundle-import/variant?digital-worker-code=UCDEMO" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "bundleFile=@UCDEMO_0.1.3.zip;type=application/zip"
Successful response example
{
"uuid": "ac89f1b1-e761-4664-86f3-24d3bfb894f1",
"bundleName": "UCDEMO_0.1.3",
"importStatus": "ACCEPTED",
"errors": [],
"warnings": []
}
With the help of the UUID, you can check the status of the import operation using GET /bundle-import/{uuid}.
Failed response example
{
"uuid": null,
"bundleName": null,
"importStatus": "VALIDATION_FAILED",
"errors": [
"AI Agent version - 0.1.3 for code UCDEMO doesn't exist"
],
"warnings": []
}
Export
POST /v1/bundle-export/variant
Exports a variant with Business Processes and their dependencies by code, version, and flavor.
Returns the export UUID and status. The following statuses are possible:
- ACCEPTED: the export is successful.
- FAILED: the export fails with errors.
Parameters:
code: required; Variation code, the same as AI Agent code the Variation relates toversion: required; Variation version, the same as AI Agent version the Variation relates toflavor: required; Variation namename: optional; filenamedescription: optional; description of the exported Variation Asset Bundle
Request example
curl -X POST "https://core1-wfaw-10061-workfusion-lb1.wflab.io/workfusion/api/v1/bundle-export/variant" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "code=UCDEMO&version=0.1.3&flavor=Variation1"
Successful response example
{
"uuid": "056444c6-8b1f-452b-a3ac-43eb24f05da9",
"errors": [],
"warnings": [],
"status": "ACCEPTED"
}
With the help of the UUID, you can check the status of the export operation using GET /bundle-export/{uuid}.
Failed response example
{
"message": "Use case version with use case code: UCDEMO, version: 0.1.3 and flavor Variation1v not found!",
"code": "com.workfusion.api.error.http.not.found"
}