Knowledge base
Tips and tricks Best practice guides, FAQ & more
Find tutorials, guides and use case examples in the
Learning centerExport
The 'Get Export' endpoint returns a .zip file containing all assets ('Folder', 'Flow', 'DataFile', 'SubFlow', etc.) on the basis of an itemId. The itemId is a unique Id of an element in the asset menu. If an itemId is not supplied, the endpoint will export all assets in the asset menu available in the Controller. The output .zip file can be used as the input parameter to the 'Import' end point or can be imported manually in the Leapwork Studio. Note, the target item with 'targetItemId' must be a folder with flows inside, or a flow.
Please note this endpoint will work with the LeapworkPlatform Edition only.
http://{controllerMachine}:{controllerPort}/api/v4/export/{timeoutMinutes}/{targetItemId)
Field | Type | Description | Comments |
---|---|---|---|
timeoutMinutes | integer | Define maximum timeout based on volume of export objects | |
targetItemId | string | Unique identifier (itemId) for an Item in the Asset menu. | Items can be of the following type: 'Folder', 'Flow', 'DataFile', 'SubFlow', 'InteractiveImage', 'DesktopElement', 'WebElement', 'InteractiveImageCollection' |
curl -X GET --header 'Accept: application/octet-stream' --header 'AccessKey: Mo87Nc4qDAtzJNDb' 'http://{controllerMachine}:{controllerPort}/api/v4/export/{timeoutMinutes}/{targetItemId}'
$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")
$headers.Add("Accept","application/octet-stream")
Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v4/export/{timeoutMinutes}/{targetItemId}" -ContentType "application/octet-stream" -Headers $headers -Method GET
The Response body returns a URL that can be used to download a .zip file containing exported assets.
Download All_Assets.zip
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)
©2024, Leapwork. All rights reserved.