Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

List files and directories by Id (deprecated) Deprecated

GET /files-id/{id}

This enpoint is deprecated, please use this one.

Returns the list of directories and files directly under directory specified by Id.

If the Id 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-id/$FILE_ID"

[
  {
    "id": "c4798eb2-dbd2-486f-ae94-0e6fa0a5071d",
    "path": "/MySpace1/MyDir2/File1.txt"
  },
  {
    "id": "620e1642-4f2d-45f2-b4eb-37f8a958b46f",
    "path": "/MySpace1/MyDir2/Dir33"
  },
  {
    "id": "55ac4ed3-a723-47ab-a892-638578b9cad7",
    "path": "/MySpace1/MyDir2/File3.txt"
  }
]

Path parameters

Parameter Type & Description
id required
string

Id of the file.

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 query parameter.

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

Shell
oneprovider-rest-cli listFilesById id=$FILE_ID limit=100 offset=300

Responses

application/json
200

The list of files and directories under specified path.

No schema provided.

400

Invalid request.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
403

Forbidden request.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
404

Invalid path - file or directory not found.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
500

Internal server error.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}