Blog
Read the latest blogs
Find tutorials, guides and use case examples in the
Learning centerExport from Team
The 'Export From Team' endpoint returns a .zip file containing all assets ('Folder', 'Flow', 'DataFile', 'SubFlow', etc.) from a predefined team on the basis of a team and 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' endpoint 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 Leapwork Enterprise Edition only.
http://{controllerMachine}:{controllerPort}/api/v4/export/teamid/{timeoutMinutes}/{targetItemId)
Field | Type | Description | Comments |
---|---|---|---|
teamId | string | The teamId is a unique Id for the team defined under the LEAPWORK Enterprise Edition. | teamId can be fetched from the Response Body of Get All Team endpoint |
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/teamid/{timeoutMinutes}/{targetItemId}'
$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")
$headers.Add("Accept","application/octet-stream")
Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v4/export/teamid/{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.