Get file(s) or folder info
Retrieves information about a specific file, a folder, or several files.
Scenario 1: Get a Single File
- Use
format=base64if you want to download the actual file content. - Do not use
filterorisRecursive.
Scenario 2: Get Several Files
- Use
filterto specify what to retrieve (e.g.,*for everything,*.pngfor images). - Use
isRecursive=trueif you want to include subfolders. - Do not use
format.
Scenario 3: Get Folder Information
- Do not use
formatorfilter.
Path Parameters
- filePathstringrequired
The path relative to the root (
...resources/Storage/). Encode forward slashes in path - use%2Finstead of/.- For a single file, specify the full file path with its extension.
- For several files or folder information, specify the folder path.
Query Parameters
- formatstring
[Single File Only] Allowed value:
base64. Use it to include the actual file content in the response. Do not use this parameter when querying a folder or several files. - filterstring
[Several Files Only] File name mask to filter the results. Use
*to get all files, or specify an extension like*.png. - isRecursiveboolean
[Several Files Only] Whether to return files from all nested subfolders recursively.
Responses
GET/storage/{filePath}
# Scenario 1: Get a Single File
curl --location -g --request GET 'https://{portal-url}/api/v2/storage/project-deep-space-exploration/info.png?format=base64'
# Scenario 2: Get Several Files
curl --location -g --request GET 'https://{portal-url}/api/v2/storage/project-deep-space-exploration?filter=*&isRecursive=false'
# Scenario 3: Get Folder Information
curl --location -g --request GET 'https://{portal-url}/api/v2/storage/project-deep-space-exploration/images'
{
"fileName": "info.png",
"fileFullName": "Storage\\project-deep-space-exploration\\info.png",
"content": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQklEQVQ4y2P0av/xn4ECwMRAIcBrwNYKdoatFey0dQELPknvjp/kG4DsdHwGMVFiO+1jYdQACg1ATgf4kjPLgKcDAL8dECIPWD7kAAAAAElFTkSuQmCC",
"modifiedBy": "katherine",
"modifiedOn": "2021-04-07T15:50:15",
"size": 123,
"isFolder": false
}