List directory files and subdirectories
Returns the list of directory files and subdirectories for directory specified by $FILE_ID.
Example cURL requests
Get files in space subdirectory
curl -X GET -H "X-Auth-Token: $TOKEN" \
"https://$HOST/api/v3/oneprovider/data/$DIR_ID/children"
{
"children": [
{
"id": "00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873",
"name": "File1.txt"
},
{
"id": "00000000006CB6637368617265477569642333396432363661656463656266666164353939663761373734313235363166342336656331613534313362366634653262303161356338356138666437393765322331663462373632623133383039343665",
"name": "Dir2"
}
]
}
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Id of the directory. |
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 listChildren id=$FILE_ID limit=100 offset=300Responses
The list of directory files and subdirectories.
| Property | Type & Description | ||||
|---|---|---|---|---|---|
children array of objects The list of directory files and subdirectories.
| |||||
Example
{
"children": [
{
"id": "YzQ3OThlYjItZGJkMi00ODZmLWFlOTQtMGU2ZmEwYTUwNzFk",
"name": "File1.txt"
},
{
"id": "NjIwZTE2NDItNGYyZC00NWYyLWI0ZWItMzdmOGE5NThiNDZm",
"name": "Dir2"
}
]
}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."
}