- 20 Dec 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Export Folder Endpoint
- Updated on 20 Dec 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
The Export Folder is an endpoint in ProGet's Asset Directory API. It exports the contents of the specified folder as either a ZIP
or a TGZ
archive.
This example exports a folder project-files
as exported-files.zip
to C:\ProGet
, authenticating with the API key abc12345
:
curl -X GET --header "X-ApiKey: abc12345" "https:/proget.corp.local/endpoints/internal-files/export/project-files?format=zip&recursive=true" -o "C:\ProGet\exported_files.zip"
The format
argument may be either zip
(for a zip file) or tgz
(for a GZipped tar file). When recursive
is false
or not specified, only items contained directly in the specified path are included. When recursive
is true
, the archive will contain all subdirectories as well.
Request Specification
To export an asset directory or folder, simply GET
to the URL with the AssetDirectoryName
, path to the folder and the format.
GET /endpoints/«AssetDirectoryName»/export/«path_to_folder»?format=«zip/tgz»&recursive=«true/false»
Exporting an asset directory requires the asset directory name (e.g. myAssetDirectory
), and the file type of the exported file (e.g. zip
). The path is omitted.
GET /endpoints/myAssetDirectory/export/?format=zip&recursive=true
Exporting a folder requires the asset directory name (e.g. myAssetDirectory
), the name of the folder to be exported (e.g. myFolder
), and the file type of the exported file (e.g. zip
)
GET /endpoints/myAssetDirectory/export/myFolder?format=zip&recursive=true
Response Specification
A successful (200
) response body will return download details and the contents of the asset directory or folder as either zip
or tgz
.
Response | Details |
---|---|
200 (Success) | the body will return download details, the contents of the folder is returned as either zip or tgz |
400 (Invalid Format) | indicates that the format is invalid |
401 (Authentication Required) | indicates a missing, unknown, or unauthorized API Key |
404 (Directory not Found) | indicates that the directory does not exist |