Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get file attributes by Id (deprecated) Deprecated

GET /metadata-id/attrs/{id}

This enpoint is deprecated, please use this one.

This method returns the selected attributes associated with specified file, directory or space by Id.

Example cURL requests

Get file POSIX mode

curl -X GET -H "X-Auth-Token: $TOKEN" \
"https://$HOST/api/v3/oneprovider/metadata-id/attrs/$FILE_ID?attribute=mode"

{
  "mode": "0777"
}

Path parameters

Parameter Type & Description
id required
string

File, directory or space Id

Query parameters

Parameter Type & Description
attribute
string

Type of attribute to query for.

Request Examples

Shell
oneprovider-rest-cli getFileAttrsById id=$FILE_ID

Responses

application/json
200

Returns the requested file attributes.

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

File 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."
}