Modify share details
Updates the share details - name or description.
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 privilege space_manage_shares in space
in which the share was created or oz_shares_update admin privilege.
Example cURL requests
Modify share details
curl -u username:password -H "Content-type: application/json" \
-X PATCH -d '{"name": "NewShareName", "description": "# New description"}' \
https://$HOST/api/v3/onezone/shares/$SHARE_ID
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Space Id. |
Request body
New share details
| Property | Type & Description |
|---|---|
name string New name for the share. | |
description string New description of the share. | |
Request Examples
onezone-rest-cli modifyShare id=303884afb761d91a7362b2841647bc08 name==NewShareName description=="# New description"Responses
Share details have been updated.
Invalid request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}