Update a share

put/shares/{shareId}
Internal-Use Only

Updates a share by completely replacing it with specified values.

Request Samples

1

Response Samples

1{
2 "type": "read",
3 "sharedWith": "testUser",
4 "sharedWithType": "user",
5 "sharedBy": "currentUser",
6 "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
7 "name": "test file",
8 "enabled": true,
9 "version": 3,
10 "links": [
11 {
12 "method": "GET",
13 "rel": "self",
14 "href": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
15 "uri": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
16 "type": "application/vnd.sas.authorization.share"
17 },
18 {
19 "method": "PUT",
20 "rel": "update",
21 "href": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
22 "uri": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
23 "type": "application/vnd.sas.authorization.share",
24 "responseType": "application/vnd.sas.authorization.share"
25 },
26 {
27 "method": "DELETE",
28 "rel": "delete",
29 "href": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
30 "uri": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac"
31 }
32 ],
33 "id": "3288b305-981f-4b8d-b440-0911eabc3fac",
34 "modifiedTimestamp": "2016-08-27T04:09:42.150Z",
35 "createdTimestamp": "2016-08-27T04:09:42.150Z",
36 "createdBy": "currentUser",
37 "modifiedBy": "currentUser"
38}

Path Parameters

NameTypeRequiredDescription
shareId
string
true

The ID of the share to update.

Header Parameters

NameTypeRequiredDescription
If-Match
string
true

The entity tag obtained from the most recent ETag response header. Must match the current entity tag for the share.

Request Body

The properties of the share.

A share that does not have a known ID or sharedBy value. The share has not been saved or the ID is unavailable for some other reason. Compare with SavedShare.

NameTypeRequiredDescription
sharedWith
string
true

The principal name of the share recipient.

resourceUri
string
true

A relative URI that represents a resource. All shares must target a resource URI.

name
string
false

The user-friendly name of the shared resource.

sharedWithType
string
true

The type of principal to which the share applies.

Allowed values:
usergroupauthenticatedUserseveryoneguest
type
string
true

The level of access that the share provides.

Allowed values:
readreadEditreadSharereadEditShare
enabled
boolean
false

Flag indicating whether the current share is in effect or not.

Default:
true
version
integer<int32>
false

The version of the share representation. The current representation version is 2.

links
array [Link]
false

Zero or more links that are to related resources and actions.

Responses

StatusMeaningDescription
200OKThe request succeeded. Returned if the object was updated.HeadersSchema
400Bad RequestThe request was invalid. Returned if the format of the request does not match the schema for the media type used or there is no existing object with the given ID. Also can be returned if the ID passed in the request payload does not match the ID in the URI.Schema
412Precondition FailedPrecondition failedSchema
428Precondition RequiredPrecondition requiredSchema