List files and directories (deprecated) Deprecated
This enpoint is deprecated, please use this one.
Returns the list of directories and files directly under specified path.
If the path points to a file, the result array will consist only of the single item with the path to the file requested, confirming it exists.
Example cURL requests
Get files in space subdirectory
curl -X GET -H "X-Auth-Token: $TOKEN" \
"https://$HOST/api/v3/oneprovider/files/MySpace1/MyDir2"
[
{
"id": "c4798eb2-dbd2-486f-ae94-0e6fa0a5071d",
"path": "/MySpace1/MyDir2/File1.txt"
},
{
"id": "620e1642-4f2d-45f2-b4eb-37f8a958b46f",
"path": "/MySpace1/MyDir2/Dir3"
},
{
"id": "55ac4ed3-a723-47ab-a892-638578b9cad7",
"path": "/MySpace1/MyDir2/File3.txt"
}
]
Path parameters
| Parameter | Type & Description |
|---|---|
| path required | string Directory path (e.g. '/MySpace/testfiles') |
Query parameters
| Parameter | Type & Description |
|---|---|
| limit | integer Allows to specify maximum number of files that should be returned. If there are more files, they can be retrieved using |
| offset | integer Index of the partial result, can be used to get subset of the result, when the number of files and directories under given path exceeds 1000. |
Request Examples
oneprovider-rest-cli listFiles path='/MySpace/testfiles' limit=100 offset=300Responses
The list of files and directories under specified path.
No schema provided.
Invalid request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Forbidden request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Invalid path - file or directory not found.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Internal server error.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}