Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get space share

GET /spaces/{id}/shares/{sid}

Returns the details about a share from specific space.

NOTE: Only Oneprovider API supports creating / deleting shares and is preferred for all share operations. Onezone API is limited to retrieving and modifying share details.

This operation requires any of the following authentication:

  • as user who has space_view privilege in the space ({id}),
  • as provider that supports the space ({id}),
  • as user who has oz_shares_view admin privilege.

Example cURL requests

Get space share

curl -u username:password -H "Content-type: application/json" -X GET \
https://$HOST/api/v3/onezone/spaces/$SPACE_ID/shares/$SHARE_ID

{
  "shareId": "1f4b762b1380946e73aeca574c77f14c",
  "name": "Experiment XYZ",
  "description": "# Experiment XYZ\nThis collection contains results from Experiment XYZ.",
  "publicUrl": "https://onedata.org/shares/1f4b762b1380946e73aeca574c77f14c",
  "fileType": "dir",
  "rootFileId": "00000000006CB663736861726547756964233339643236366165646365\
  6266666164353939663761373734313235363166342336656331613534313362366634653\
  2623031613563383561386664373937653223316634623736326231333830393436653733\
  6165636135373463373766313463",
  "spaceId": "6ec1a5413b6f4e2b01a5c85a8fd797e2",
  "handleId" "doi:10.15911/MyShares.726855"
}

Path parameters

Parameter Type & Description
id required
string

Space Id.

sid required
string

Share Id.

Request Examples

Shell
onezone-rest-cli getSpaceShare id=b752ceafabb662b4e5728b2ded25cdd1 sid=b45d02d01066b8794ad7f927becf4bde

Responses

application/json
200

The shares was successfully created.

PropertyType & Description
shareId
string

Share Id.

name
string

The name of the share.

description
string

Description of the share contents, interpreted as markdown format when displayed in GUI.

publicUrl
string

The publicly accessible URL for the share.

spaceId
string

The Id of the space in which the share was created.

rootFileId
string

Public Id of shared file or directory, allowing read access to its contents without authentication.

fileType
string

Denotes the type of the shared element (file or directory)

Enum:
filedir
handleId
string

The Id of open data Handle (e.g. DOI or PID) assigned to this share or null.

Example

application/json
{
  "shareId": "1f4b762b1380946e73aeca574c77f14c",
  "name": "Experiment XYZ",
  "description": "# Experiment XYZ\\nThis collection contains results from Experiment XYZ.",
  "publicUrl": "https://onedata.org/shares/1f4b762b1380946e73aeca574c77f14c",
  "spaceId": "6ec1a5413b6f4e2b01a5c85a8fd797e2",
  "rootFileId": "00000000006CB663736861726547756964233339643236366165646365\\ 6266666164353939663761373734313235363166342336656331613534313362366634653\\ 2623031613563383561386664373937653223316634623736326231333830393436653733\\ 6165636135373463373766313463",
  "fileType": "dir",
  "handleId": "doi:10.15911/MyShares.726855"
}
400

Invalid request.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
401

Authentication error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
403

Authorization error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
404

Resource not found.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
500

Internal server Error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}