Skip to main content
Back to API List This API imports a new workflow by providing the necessary file IDs, ensuring all the necessary configurations, including the workflow’s flow data, app definitions, and environment variables are correctly imported. After triggering the import, the response returns a dockStatusId. Use this ID to call the Get Dock Status API and verify the successful import of the workflow. To import a workflow, follow the steps below:
  1. Upload Files: Use the File Upload API to upload the files for the flow definition, app definition, and environment variables. This API returns unique file IDs for each file.
  2. Import the Workflow: Call the Import Workflows API using the retrieved file IDs along with the workflow name.
  3. Track Import Status: The API response returns a dockStatusId that helps monitor the import progress using the Get Dock Status API.
MethodPOST
Endpointhttps://{host}/api/public/workflows/import
Content Typeapplication/json
AuthorizationX-api-key - The API key used for authentication.
Where can I find the API key? To use the API, you will need an API key. Learn more.

Query Parameters

PARAMETERDESCRIPTIONTYPEREQUIRED/OPTIONAL
hostThe environment URL. For example, https://ai-for-process.domain.ai/StringRequired

Sample Request

curl --location 'https://{host}/api/public/workflows/import' 
--header 'x-api-key: kg-90xxxxx5-9xxe-5xxf-9xx7-9xxxxxxxxxx4-55xxxxx4-axx9-4xx2-axx2-fxxxxxxxxxxa' 
--header 'Content-Type: application/json' 
--data '{
    "workflowDataFileId": "67bxxxxxxxxxxxxxxxxxxxxc",
    "flowDataFileId": "67bxxxxxxxxxxxxxxxxxxxx2",
    "envVariablesFileId": "67bxxxxxxxxxxxxxxxxxxxxx2",
    "workflowName":"Staging Workflow"
}'

Body Parameters

PARAMETERDESCRIPTIONTYPEREQUIRED/OPTIONAL
workflowDataFileIdThe file ID for the workflow data file.StringRequired
flowDataFileIdThe file ID for the flow data file.StringRequired
envVariablesFileIdThe file ID for the environment variables.StringOptional
workflowNameThe name of the workflow.StringRequired

Sample Response

{
   "dockStatusId": "{dockStatusId}",
   "workflowId": "{workflowId}",
   "jobType": "WORKFLOWS",
   "action": "IMPORT",
   "status": "IN_PROGRESS"
}

Response Parameters

PARAMETERDESCRIPTIONTYPESAMPLE VALUE
dockStatusIdThe unique identifier to track the status of the import action.Stringe.g., ds-cxxxxxx5-dxxd-5xxf-9xxd-0xxxxx6c5xx8
workflowIdThe unique identifier for the workflow.Stringe.g., a-8xxxxxxe-6xxe-5xx1-8xxc-b3xxxxx80xx6
jobTypeThe type of job being performed.StringWORKFLOWS
actionThe action that’s performed on the workflow/model.StringIMPORT
statusThe current status of the job.StringIN_PROGRESS, SUCCESS, or FAILED