Get shares

get/shares

Retrieves some or all shares, with or without paging.

Request Samples

1

Response Samples

1{
2 "value": [
3 {
4 "type": "read",
5 "sharedWith": "testUser",
6 "sharedWithType": "user",
7 "sharedBy": "currentUser",
8 "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
9 "name": "test file",
10 "enabled": true,
11 "version": 3,
12 "links": [
13 {
14 "method": "GET",
15 "rel": "self",
16 "href": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
17 "uri": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
18 "type": "application/vnd.sas.authorization.share"
19 },
20 {
21 "method": "PUT",
22 "rel": "update",
23 "href": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
24 "uri": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
25 "type": "application/vnd.sas.authorization.share",
26 "responseType": "application/vnd.sas.authorization.share"
27 },
28 {
29 "method": "DELETE",
30 "rel": "delete",
31 "href": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac",
32 "uri": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac"
33 }
34 ],
35 "id": "3288b305-981f-4b8d-b440-0911eabc3fac",
36 "modifiedTimestamp": "2016-08-27T04:09:42.150Z",
37 "createdTimestamp": "2016-08-27T04:09:42.150Z",
38 "createdBy": "currentUser",
39 "modifiedBy": "currentUser"
40 },
41 {
42 "type": "read",
43 "sharedWith": "testUser",
44 "sharedWithType": "user",
45 "sharedBy": "currentUser",
46 "resourceUri": "/files/files/file2",
47 "name": "test file",
48 "enabled": true,
49 "version": 3,
50 "links": [
51 {
52 "method": "GET",
53 "rel": "self",
54 "href": "/authorization/shares/file2",
55 "uri": "/authorization/shares/file2",
56 "type": "application/vnd.sas.authorization.share"
57 },
58 {
59 "method": "PUT",
60 "rel": "update",
61 "href": "/authorization/shares/file2",
62 "uri": "/authorization/shares/file2",
63 "type": "application/vnd.sas.authorization.share",
64 "responseType": "application/vnd.sas.authorization.share"
65 },
66 {
67 "method": "DELETE",
68 "rel": "delete",
69 "href": "/authorization/shares/file2",
70 "uri": "/authorization/shares/file2"
71 }
72 ],
73 "id": "3288b305-981f-4b8d-b440-0911eabc3fac",
74 "modifiedTimestamp": "2016-08-27T04:09:42.150Z",
75 "createdTimestamp": "2016-08-27T04:09:42.150Z",
76 "createdBy": "currentUser",
77 "modifiedBy": "currentUser"
78 }
79 ]
80}

Query Parameters

NameTypeRequiredDescription
filter
string<filter-criteria>
false

Constraints on which shares to retrieve. Here are the supported filters and criteria: sharedBy (eq, ne, startsWith, endsWith, contains) sharedWith (eq, ne, startsWith, endsWith, contains) resourceUri (eq, ne, startsWith, endsWith, contains) name (eq, ne, startsWith, endsWith, contains) type (eq, ne)

limit
integer
false

The maximum number of shares to return per page.

Default:
50
sortBy
string<sort-criteria>
false

Instructions for sorting the retrieved shares. You can sort by name or description in ascending or descending order.

start
integer
false

The index number for the first share in a page.

Default:
0

Responses

StatusMeaningDescription
200OK

The request succeeded.

HeadersSchema
400Bad Request

The request was invalid. Returned if any query criteria (sortBy, filter, limit, start) are invalid.

Schema