Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get file extended attributes (deprecated) Deprecated

GET /metadata/xattrs/{path}

This enpoint is deprecated, please use this one.

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

Example cURL requests

Get extended file attributes

curl -H "X-Auth-Token: $TOKEN" -X GET \
"https://$HOST/api/v3/oneprovider/metadata/xattrs/MySpace1/File2.txt?extended=true&attribute=license"

{
  "license": "CC-0"
}

Path parameters

Parameter Type & Description
path required
string

File or directory path or space name (e.g. '/MySpace/testfiles/file1.txt')

Query parameters

Parameter Type & Description
attribute
string

Type of attribute to query for.

inherited
boolean

When set to true, this operation returns attributes including those inherited from parent directories and from the space root directory. If the same attribute is set on different nesting levels, the lowest level takes precedence (e.g. file attributes override the attributes from its parent directory).

show_internal
boolean

When set to true, this operation returns all attributes including those normally not shown (e.g. json/rdf metadata, acl and cdmi attributes).

Request Examples

Shell
oneprovider-rest-cli getFileXattrs path='/MySpace/testfiles/file1.txt'

Responses

application/json
200

Returns the requested file extended 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."
}