'Import' endpoint is used to import already exported zip file to the Controller. This endpoint can be used to move flows from one controller another. Note that, target item with 'targetItemId' must be a folder.

Request URL


Input parameters

Field Type Description Comments
timeoutMinutes integer Maximum timeout for upload  
targetItemId string Unique identifier for Item in the Asset hierarchy Item can be 'Folder', 'Flow', 'DataFile', 'SubFlow', 'InteractiveImage', 
'DesktopElement', 'WebElement', 
'InteractiveImageCollection' etc.
zip file formData File to be imported  



curl curl -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' --header 'accessKey: Mo87Nc4qDAtzJNDb' {"type":"formData"} 'http://{controllerMachine}:{controllerPort}/api/v3/import/30/{targetItemId}'


$function Import {
        [string]$TargetItemId = ""
    $fileName = [IO.Path]::GetFileName($Path)
    $boundary = [guid]::NewGuid().ToString()
    $fileBytes = [System.IO.File]::ReadAllBytes($Path)
    $fileBody = [System.Text.Encoding]::GetEncoding("iso-8859-1").GetString($fileBytes)
    $LF = "`r`n";
    $headers = @{}
    $url = "http://$Hostname"+":$ApiPort/api/v3/import/$MinutesTimeOut/$TargetItemId"
    $bodyLines = (
    "Content-Disposition: form-data; name=`"zip file`"; filename=`"`"",
    "Content-Type: application/x-zip-compressed$LF",
) -join $LF
           Invoke-RestMethod -Uri $url -Method Post -Headers $headers -ContentType "multipart/form-data;              boundary=`"$boundary`"" -Body $bodyLines
          $ErrorMessage = $_.Exception.Message
$hostName = "controllerMachine"
$apiPort = controllerPort
$accessKey = "Mo87Nc4qDAtzJNDb"
$timeOut = 10

#Import $uploadPath
Import -Path $uploadPath -Hostname $hostName -ApiPort $apiPort -AccessKey $accessKey -MinutesTimeOut $timeOut

Please note : It is strongly recommended to set timeoutMinutes >> than real export time, even if it is small. If it is <= 0, default value of 3 hours will be set.

Response Body

Below response object 

   "$id": "1",
"IsSuccessful": true


Response Parameters

Field Type Description Values
$id string ID of internal object  
IsSuccessful bool Returns true on successful import else false  

Response Code

200 (OK)

400 (Request type is incorrect)

401 (Incorrect access key)

404 (Folder by targetItemId not found/asset is found but it’s not a folder)

409 (Non-resolvable asset title collision)


500 (Internal Server Error)