Get share details
Returns the private details about a specific share.
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 space_view privilege in space where share is created or
oz_shares_view admin privilege.
Example cURL requests
Get share details
curl -u admin:password -X GET \
https://$ZONE_HOST/api/v3/onezone/shares/$SHARE_ID
{
"shareId": "1f4b762b1380946e73aeca574c77f14c",
"name": "Experiment XYZ",
"description": "# Experiment XYZ\nThis collection contains results from Experiment XYZ.",
"publicUrl": "https://example.com/shares/1f4b762b1380946e73aeca574c77f14c",
"publicRestUrl": "https://example.com/api/v3/onezone/shares/1f4b762b1380946e73aeca574c77f14c/public",
"fileType": "dir",
"rootFileId": "00000000006CB663736861726547756964233339643236366165646365\
6266666164353939663761373734313235363166342336656331613534313362366634653\
2623031613563383561386664373937653223316634623736326231333830393436653733\
6165636135373463373766313463",
"spaceId": "6ec1a5413b6f4e2b01a5c85a8fd797e2",
"handleId" "70570c0ebcd081835ca29560708fd98f",
"creator": {
"type": "user",
"id": "7434b256e71e1052e0d5e3e9da657ebf"
},
"creationTime": 1576152793,
"visitCount": 997
}
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Share Id. |
Request Examples
onezone-rest-cli getShare id=303884afb761d91a7362b2841647bc08Responses
Information about a share.
Share Id.
The name of the share.
Description of the share contents, interpreted as markdown format when displayed in GUI.
Publicly accessible link that can be used to view the contents of the share in a web browser. Anyone with the link will be able to access the share browser, without any authentication.
URL to the publicly accessible REST endpoint, which can be used to programmatically access the share information and data. The endpoint does not require any authentication.
The Id of the space in which the share was created. Not included in public share details.
Public Id of shared file or directory, allowing read access to its contents without authentication.
Denotes the type of the shared element (regular file or directory)
The Id of Public Data Handle (e.g. DOI or PID) assigned to this share, or null.
creator object (Subject) The creator of the share.
Not included in public share details.
The creator of the share. Not included in public share details.
Type of the subject
Id of the subject (null for nobody)
Timestamp in seconds (UNIX epoch), e.g. 1563819329.
The number of hits for the publicUrl.
Example
{
"shareId": "1f4b762b1380946e73aeca574c77f14c",
"name": "Experiment XYZ",
"description": "# Experiment XYZ\\nThis collection contains results from Experiment XYZ.",
"publicUrl": "https://example.com/shares/1f4b762b1380946e73aeca574c77f14c",
"publicRestUrl": "https://example.com/api/v3/onezone/shares/1f4b762b1380946e73aeca574c77f14c/public",
"spaceId": "6ec1a5413b6f4e2b01a5c85a8fd797e2",
"fileType": "DIR",
"rootFileId": "00000000006CB663736861726547756964233339643236366165646365\\ 6266666164353939663761373734313235363166342336656331613534313362366634653\\ 2623031613563383561386664373937653223316634623736326231333830393436653733\\ 6165636135373463373766313463",
"handleId": "70570c0ebcd081835ca29560708fd98f260fb4da",
"creator": {
"type": "user",
"id": "7434b256e71e1052e0d5e3e9da657ebf"
},
"creationTime": 1576152793
}Invalid request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}