-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathsharing.stone
More file actions
2904 lines (2500 loc) · 111 KB
/
Copy pathsharing.stone
File metadata and controls
2904 lines (2500 loc) · 111 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
namespace sharing
"This namespace contains endpoints and data types for creating and managing shared links and
shared folders."
import account_id
import async
import common
import files
import seen_state
import team_common
import team_policies
import users
import users_common
route get_file_metadata (GetFileMetadataArg, SharedFileMetadata, GetFileMetadataError)
"Returns shared file metadata."
attrs
auth = "user"
scope = "sharing.read"
select_admin_mode = "team_admin"
route list_file_members (ListFileMembersArg, SharedFileMembers, ListFileMembersError)
"Use to obtain the members who have been invited to a file, both inherited
and uninherited members."
attrs
auth = "user"
scope = "sharing.read"
select_admin_mode = "whole_team"
route list_shared_links (ListSharedLinksArg, ListSharedLinksResult, ListSharedLinksError)
"List shared links of this user.
If no path is given, returns a list of all shared links for the current user. For members of
business teams using team space and member folders, returns all shared links in the team
member's home folder unless the team space ID is specified in the request header.
If a non-empty path is given, returns a list of all shared links that allow access to the
given path - direct links to the given path and links to parent folders of the given path.
Links to parent folders can be suppressed by setting direct_only to true."
attrs
allow_app_folder_app = true
auth = "user"
scope = "sharing.read"
select_admin_mode = "whole_team"
union LinkExpiry
remove_expiry
"Remove the currently set expiry for the link."
set_expiry common.DropboxTimestamp
"Set a new expiry or change an existing expiry."
union LinkPassword
remove_password
"Remove the currently set password for the link."
set_password String
"Set a new password or change an existing password."
union LinkAudience
public
"Link is accessible by anyone."
team
"Link is accessible only by team members."
no_one
"The link can be used by no one. The link merely points the user to the content, and does
not grant additional rights to the user. Members of the content who use this link can only
access the content with their pre-existing access rights."
password
@common.Deprecated
"Use `require_password` instead. A link-specific password is required to access the
link. Login is not required."
members
@common.Deprecated
"Link is accessible only by members of the content."
union LinkAction
"Actions that can be performed on a link."
change_access_level
"Change the access level of the link."
change_audience
"Change the audience of the link."
remove_expiry
"Remove the expiry date of the link."
remove_password
"Remove the password of the link."
set_expiry
"Create or modify the expiry date of the link."
set_password
"Create or modify the password of the link."
struct LinkSettings
"Settings that apply to a link."
access_level AccessLevel?
"The access level on the link for this file. Currently,
it only accepts 'viewer' and 'viewer_no_comment'."
audience LinkAudience?
"The type of audience on the link for this file."
expiry LinkExpiry?
"An expiry timestamp to set on a link."
password LinkPassword?
"The password for the link."
struct LinkPermission
"Permissions for actions that can be performed on a link."
action LinkAction
allow Boolean
reason PermissionDeniedReason?
example default
action = change_audience
allow = true
struct SharedContentLinkMetadataBase
access_level AccessLevel?
"The access level on the link for this file."
audience_options List(LinkAudience)
"The audience options that are available for the content. Some audience options may be
unavailable. For example, team_only may be unavailable if the content is not owned by a
user on a team. The 'default' audience option is always available if the user can modify
link settings."
audience_restricting_shared_folder AudienceRestrictingSharedFolder?
"The shared folder that prevents the link audience for this link from being more
restrictive."
current_audience LinkAudience
"The current audience of the link."
expiry common.DropboxTimestamp?
"Whether the link has an expiry set on it. A link with an expiry will have its
audience changed to members when the expiry is reached."
link_permissions List(LinkPermission)
"A list of permissions for actions you can perform on the link."
password_protected Boolean
"Whether the link is protected by a password."
struct SharedContentLinkMetadata extends SharedContentLinkMetadataBase
"Metadata of a shared link for a file or folder."
audience_exceptions AudienceExceptions?
"The content inside this folder with link audience different than this folder's. This is
only returned when an endpoint that returns metadata for a single shared folder is called,
e.g. /get_folder_metadata."
url String
"The URL of the link."
example default
audience_options = [public, team, members]
current_audience = public
link_permissions = [default]
password_protected = false
url = ""
struct ExpectedSharedContentLinkMetadata extends SharedContentLinkMetadataBase
"The expected metadata of a shared link for a file or folder when a link is first created for
the content. Absent if the link already exists."
example default
audience_options = [public, team, members]
current_audience = public
link_permissions = [default]
password_protected = false
struct AudienceRestrictingSharedFolder
"Information about the shared folder that prevents the link audience for this link from being
more restrictive."
shared_folder_id common.SharedFolderId
"The ID of the shared folder."
name String
"The name of the shared folder."
audience LinkAudience
"The link audience of the shared folder."
struct AudienceExceptions
"The total count and truncated list of information of content inside this folder that has a
different audience than the link on this folder. This is only returned for folders."
count UInt32
exceptions List(AudienceExceptionContentInfo)
"A truncated list of some of the content that is an exception. The length of this list could
be smaller than the count since it is only a sample but will not be empty as long as
count is not 0."
example default
count = 0
exceptions = []
struct AudienceExceptionContentInfo
"Information about the content that has a link audience different than that of this folder."
name String
"The name of the content, which is either a file or a folder."
example default
name = "sample file name"
route get_shared_link_file (GetSharedLinkFileArg, SharedLinkMetadata, GetSharedLinkFileError)
"Download the shared link's file from a user's Dropbox.
This is a download-style endpoint that returns the file content."
attrs
allow_app_folder_app = true
auth = "app, user"
host = "content"
scope = "sharing.read"
style = "download"
route create_shared_link_with_settings (CreateSharedLinkWithSettingsArg, SharedLinkMetadata, CreateSharedLinkWithSettingsError)
"Create a shared link with custom settings.
If no settings are given then the default visibility is RequestedVisibility.public
(The resolved visibility, though, may depend on other aspects such as team and shared folder
settings)."
attrs
allow_app_folder_app = true
auth = "user"
scope = "sharing.write"
select_admin_mode = "team_admin"
route get_shared_link_metadata (GetSharedLinkMetadataArg, SharedLinkMetadata, SharedLinkMetadataError)
"Get the shared link's metadata."
attrs
allow_app_folder_app = true
auth = "app, user"
scope = "sharing.read"
route modify_shared_link_settings (ModifySharedLinkSettingsArgs, SharedLinkMetadata, ModifySharedLinkSettingsError)
"Modify the shared link's settings.
If the requested visibility conflict with the shared links policy of the team or the
shared folder (in case the linked file is part of a shared folder) then the
LinkPermissions.resolved_visibility of the returned SharedLinkMetadata will
reflect the actual visibility of the shared link and the
LinkPermissions.requested_visibility will reflect the requested visibility."
attrs
allow_app_folder_app = true
auth = "user"
scope = "sharing.write"
route create_shared_link (CreateSharedLinkArg, PathLinkMetadata, CreateSharedLinkError) deprecated
"Create a shared link.
If a shared link already exists for the given path, that link is returned.
Previously, it was technically possible to break a shared link by moving or
renaming the corresponding file or folder. In the future, this will no
longer be the case, so your app shouldn't rely on this behavior. Instead, if
your app needs to revoke a shared link, use revoke_shared_link.
DEPRECATED: Use create_shared_link_with_settings instead."
attrs
allow_app_folder_app = true
auth = "user"
scope = "sharing.write"
select_admin_mode = "team_admin"
route get_shared_links (GetSharedLinksArg, GetSharedLinksResult, GetSharedLinksError) deprecated
"DEPRECATED: Use list_shared_links instead. This endpoint will be retired in October 2026.
Returns a list of :type:`LinkMetadata` objects for this user, including collection links.
If no path is given, returns a list of all shared links for the current user,
including collection links, up to a maximum of 1000 links.
If a non-empty path is given, returns a list of all shared links that allow access
to the given path. Collection links are never returned in this case."
attrs
allow_app_folder_app = true
auth = "user"
scope = "sharing.read"
route revoke_shared_link (RevokeSharedLinkArg, Void, RevokeSharedLinkError)
"Revoke a shared link.
Note that even after revoking a shared link to a file, the file may be accessible if there are
shared links leading to any of the file parent folders. To list all shared links that enable
access to a specific file, you can use the list_shared_links with the file as the
ListSharedLinksArg.path argument."
attrs
allow_app_folder_app = true
auth = "user"
scope = "sharing.write"
select_admin_mode = "team_admin"
alias GetSharedLinkFileArg = GetSharedLinkMetadataArg
alias Id = files.Id
alias Path = files.Path
alias ReadPath = files.ReadPath
alias Rev = files.Rev
alias TeamInfo = users.Team
union AlphaResolvedVisibility extends ResolvedVisibility
"check documentation for ResolvedVisibility."
union CreateSharedLinkError
path files.LookupError
union_closed CreateSharedLinkWithSettingsError
path files.LookupError
email_not_verified
"This user's email address is not verified. This functionality is only
available on accounts with a verified email address. Users can verify
their email address :link:`here https://www.dropbox.com/help/317`."
shared_link_already_exists SharedLinkAlreadyExistsMetadata?
"The shared link already exists. You can call :route:`list_shared_links` to get the
existing link, or use the provided metadata if it is returned.
Existing link metadata will not be returned if custom settings were specified in the request that could make the existing link incompatible with the requested settings."
settings_error SharedLinkSettingsError
"There is an error with the given settings."
access_denied
"The user is not allowed to create a shared link to the specified file. For
example, this can occur if the file is restricted or if the user's links are
:link:`banned https://help.dropbox.com/files-folders/share/banned-links`."
banned_member
"The current user has been :link:`banned https://help.dropbox.com/files-folders/share/banned-links` for abuse reasons."
too_many_shared_folders
"Your Dropbox folder will have too many shared folders after the operation.
https://help.dropbox.com/share/shared-folder-faq#Is-there-a-limit-to-the-number-of-shared-folders-I-can-create"
union GetSharedLinkFileError extends SharedLinkError
shared_link_is_directory
"Directories cannot be retrieved by this endpoint."
union GetSharedLinksError
path files.MalformedPathError
union LinkAccessLevel
viewer
"Users who use the link can view and comment on the content."
editor
"Users who use the link can edit, view and comment on the content."
union LinkAudienceDisallowedReason extends VisibilityPolicyDisallowedReason
"check documentation for VisibilityPolicyDisallowedReason."
union ListSharedLinksError
path files.LookupError
reset
"Indicates that the cursor has been invalidated. Call
:route:`list_shared_links` to obtain a new cursor."
union ModifySharedLinkSettingsError extends SharedLinkError
settings_error SharedLinkSettingsError
"There is an error with the given settings."
email_not_verified
"This user's email address is not verified. This functionality is only
available on accounts with a verified email address. Users can verify
their email address :link:`here https://www.dropbox.com/help/317`."
union_closed PendingUploadMode
"Flag to indicate pending upload default (for linking to not-yet-existing paths)."
file
"Assume pending uploads are files."
folder
"Assume pending uploads are folders."
union RequestedLinkAccessLevel
viewer
"Users who use the link can view and comment on the content."
editor
"Users who use the link can edit, view and comment on the content.
Note not all file types support edit links yet."
max
"Request for the maximum access level you can set the link to."
default
"Request for the default access level the user has set."
union_closed RequestedVisibility
"The access permission that can be requested by the caller for the shared link.
Note that the final resolved visibility of the shared link takes into account other aspects,
such as team and shared folder settings.
Check the :type:`ResolvedVisibility` for more info on the possible resolved visibility values
of shared links."
public
"Anyone who has received the link can access it. No login required."
team_only
"Only members of the same team can
access the link. Login is required."
password
"A link-specific password is required to access the
link. Login is not required."
union ResolvedVisibility extends RequestedVisibility
"The actual access permissions values of shared links after taking into account user
preferences and the team and shared folder settings.
Check the :type:`RequestedVisibility` for more info on the possible visibility values
that can be set by the shared link's owner."
team_and_password
"Only members of the same team who
have the link-specific password can access the link. Login is required."
shared_folder_only
"Only members of the shared folder containing the linked file
can access the link. Login is required."
no_one
"The link merely points the user to the content, and does not grant any additional rights.
Existing members of the content who use this link can only access the content with their
pre-existing access rights. Either on the file directly, or inherited from a parent folder."
only_you
"Only the current user can view this link."
union RevokeSharedLinkError extends SharedLinkError
shared_link_malformed
"Shared link is malformed."
union SharedLinkAccessFailureReason
login_required
"User is not logged in."
email_verify_required
"This user's email address is not verified. This functionality is only
available on accounts with a verified email address. Users can verify
their email address :link:`here https://www.dropbox.com/help/317`."
password_required
"The link is password protected."
team_only
"Access is allowed for team members only."
owner_only
"Access is allowed for the shared link's owner only."
union SharedLinkAlreadyExistsMetadata
metadata SharedLinkMetadata
"Metadata of the shared link that already exists."
union SharedLinkError
shared_link_not_found
"The shared link wasn't found."
shared_link_access_denied
"The caller is not allowed to access this shared link."
unsupported_link_type
"This type of link is not supported; use :route:`files.export` instead."
unsupported_parameter_field
"Private shared links do not support `path` or `link_password` parameter fields."
union SharedLinkMetadataError extends SharedLinkError
"The potential errors for a call to get_shared_link_metadata."
union_closed SharedLinkSettingsError
invalid_settings
"The given settings are invalid
(for example, all attributes of the :type:`SharedLinkSettings` are empty,
the requested visibility is :field:`RequestedVisibility.password` but the
:field:`SharedLinkSettings.link_password` is missing, :field:`SharedLinkSettings.expires`
is set to the past, etc.)."
not_authorized
"User is not allowed to modify the settings of this link. Note that basic
users can only set :field:`RequestedVisibility.public`
as the :field:`SharedLinkSettings.requested_visibility` and cannot
set :field:`SharedLinkSettings.expires`."
union Visibility
"Who can access a shared link.
The most open visibility is :field:`public`.
The default depends on many aspects, such as team and user
preferences and shared folder settings."
public
"Anyone who has received the link can access it. No login required."
team_only
"Only members of the same team can
access the link. Login is required."
password
"A link-specific password is required to access the
link. Login is not required."
team_and_password
"Only members of the same team who
have the link-specific password can access the link."
shared_folder_only
"Only members of the shared folder containing the linked file
can access the link. Login is required."
union VisibilityPolicyDisallowedReason
delete_and_recreate
"The user needs to delete and recreate the link to change the visibility policy."
restricted_by_shared_folder
"The parent shared folder restricts sharing of links outside the shared folder. To change
the visibility policy, remove the restriction from the parent shared folder."
restricted_by_team
"The team policy prevents links being shared outside the team."
user_not_on_team
"The user needs to be on a team to set this policy."
user_account_type
"The user is a basic user or is on a limited team."
permission_denied
"The user does not have permission."
union ChangeLinkExpirationPolicy
"Enumerates acceptable values for team's ChangeLinkExpirationPolicy setting."
allowed
not_allowed
struct LinkMetadata
"Metadata for a shared link. This can be either a
:type:`PathLinkMetadata` or :type:`CollectionLinkMetadata`."
union
path PathLinkMetadata
collection CollectionLinkMetadata
url String
"URL of the shared link."
visibility Visibility
"Who can access the link."
expires common.DropboxTimestamp?
"Expiration time, if set. By default the link won't expire."
example default
path = default
struct SharedLinkMetadata
"The metadata of a shared link."
union
file FileLinkMetadata
folder FolderLinkMetadata
url String
"URL of the shared link."
id Id?
"A unique identifier for the linked file."
name String
"The linked file name (including extension).
This never contains a slash."
expires common.DropboxTimestamp?
"Expiration time, if set. By default the link won't expire."
path_lower String?
"The lowercased full path in the user's Dropbox. This always starts with a slash.
This field will only be present only if the linked file is in the authenticated user's
dropbox and the user is the owner of the link."
link_permissions LinkPermissions
"The link's access permissions."
team_member_info TeamMemberInfo?
"The team membership information of the link's owner. This field will only be present
if the link's owner is a team member."
content_owner_team_info TeamInfo?
"The team information of the content's owner. This field will only be present if
the content's owner is a team member and the content's owner team is different from the
link's owner team."
example default
file = default
example folder_link_metadata
folder = default
struct CollectionLinkMetadata extends LinkMetadata
"Metadata for a collection-based shared link."
example default
url = "https://www.dropbox.com/sh/s6fvw6ol7rmqo1x/AAAgWRSbjmYDvPpDB30Sykjfa?dl=0"
expires = null
visibility = public
struct CreateSharedLinkArg
path String
"The path to share."
short_url Boolean = false
@common.Deprecated
pending_upload PendingUploadMode?
"If it's okay to share a path that does not yet exist, set this to
either :field:`PendingUploadMode.file` or :field:`PendingUploadMode.folder`
to indicate whether to assume it's a file or folder."
example default
path = "/Homework/Math/Prime_Numbers.txt"
struct CreateSharedLinkWithSettingsArg
path ReadPath
"The path to be shared by the shared link."
settings SharedLinkSettings?
"The requested settings for the newly created shared link."
example default
path = "/Prime_Numbers.txt"
settings = default
struct FileLinkMetadata extends SharedLinkMetadata
"The metadata of a file shared link."
client_modified common.DropboxTimestamp
"The modification time set by the desktop client
when the file was added to Dropbox. Since this time is not verified
(the Dropbox server stores whatever the desktop client sends up), this
should only be used for display purposes (such as sorting) and not,
for example, to determine if a file has changed or not."
server_modified common.DropboxTimestamp
"The last time the file was modified on Dropbox."
rev Rev
"A unique identifier for the current revision of a file. This field is
the same rev as elsewhere in the API and can be used to detect changes
and avoid conflicts."
size UInt64
"The file size in bytes."
example default
url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0"
id = "id:a4ayc_80_OEAAAAAAAAAXw"
name = "Prime_Numbers.txt"
path_lower = "/homework/math/prime_numbers.txt"
link_permissions = default
team_member_info = default
client_modified = "2015-05-12T15:50:38Z"
server_modified = "2015-05-12T15:50:38Z"
rev = "a1c10ce0dd78"
size = 7212
struct FolderLinkMetadata extends SharedLinkMetadata
"The metadata of a folder shared link."
example default
url = "https://www.dropbox.com/sh/s6fvw6ol7rmqo1x/AAAgWRSbjmYDvPpDB30Sykjfa?dl=0"
id = "id:a4ayc_80_OEAAAAAAAAAXw"
name = "Math"
path_lower = "/homework/math"
team_member_info = default
link_permissions = default
struct GetSharedLinkMetadataArg
url String
"URL of the shared link."
path Path?
"If the shared link is to a folder, this parameter can be used to retrieve the metadata for
a specific file or sub-folder in this folder. A relative path should be used."
link_password String?
"If the shared link has a password, this parameter can be used."
example default
url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0"
path = "/Prime_Numbers.txt"
struct GetSharedLinksArg
path String?
"See :route:`get_shared_links` description."
example default
path = ""
example math_homework_links
path = "/Homework/Math"
struct GetSharedLinksResult
links List(LinkMetadata)
"Shared links applicable to the path argument."
example default
links = [default]
struct LinkAudienceOption
audience LinkAudience
"Specifies who can access the link."
allowed Boolean
"Whether the user calling this API can select this audience option."
disallowed_reason LinkAudienceDisallowedReason?
"If :field:`allowed` is :val:`false`, this will provide the reason that the user is not
permitted to set the visibility to this policy."
example public
audience = public
allowed = true
example team
audience = team
allowed = false
example no_one
audience = no_one
allowed = true
struct LinkPermissions
resolved_visibility ResolvedVisibility?
"The current visibility of the link after considering the shared links policies of the
the team (in case the link's owner is part of a team) and the shared folder (in case the
linked file is part of a shared folder). This field is shown only if the caller has access
to this info (the link's owner always has access to this data). For some links, an
effective_audience value is returned instead."
requested_visibility RequestedVisibility?
"The shared link's requested visibility. This can be overridden by the team and shared
folder policies. The final visibility, after considering these policies, can be found in
:field:`resolved_visibility`. This is shown only if the caller is the link's
owner and resolved_visibility is returned instead of effective_audience."
can_revoke Boolean
"Whether the caller can revoke the shared link."
revoke_failure_reason SharedLinkAccessFailureReason?
"The failure reason for revoking the link. This field will only be present if the
:field:`can_revoke` is :val:`false`."
effective_audience LinkAudience?
"The type of audience who can benefit from the access level specified by the
`link_access_level` field."
link_access_level LinkAccessLevel?
"The access level that the link will grant to its users. A link can grant additional rights
to a user beyond their current access level. For example, if a user was invited as a viewer
to a file, and then opens a link with `link_access_level` set to `editor`, then they will
gain editor privileges. The `link_access_level` is a property of the link, and does not
depend on who is calling this API. In particular, `link_access_level` does not take into
account the API caller's current permissions to the content."
visibility_policies List(VisibilityPolicy)
"A list of policies that the user might be able to set for the visibility."
can_set_expiry Boolean
"Whether the user can set the expiry settings of the link. This refers to the ability to
create a new expiry and modify an existing expiry."
can_remove_expiry Boolean
"Whether the user can remove the expiry of the link."
allow_download Boolean
"Whether the link can be downloaded or not."
can_allow_download Boolean
"Whether the user can allow downloads via the link. This refers to the ability to remove a
no-download restriction on the link."
can_disallow_download Boolean
"Whether the user can disallow downloads via the link. This refers to the ability to impose
a no-download restriction on the link."
allow_comments Boolean
@common.Deprecated
"Whether comments are enabled for the linked file. This takes the team commenting policy into account."
team_restricts_comments Boolean
@common.Deprecated
"Whether the team has disabled commenting globally."
audience_options List(LinkAudienceOption)?
"A list of link audience options the user might be able to set as the new audience."
can_set_password Boolean?
"Whether the user can set a password for the link."
can_remove_password Boolean?
"Whether the user can remove the password of the link."
require_password Boolean?
"Whether the user is required to provide a password to view the link."
can_use_extended_sharing_controls Boolean?
"Whether the user can use extended sharing controls, based on their account type."
can_sync Boolean?
"Whether a user can save the content to their Dropbox account."
can_request_access Boolean?
"Whether the user can request access to the content."
enforce_shared_link_password_policy team_policies.EnforceLinkPasswordPolicy?
"Whether the updated externally available shared link must have password set.
Not provided if the link is not team owned."
days_to_expire_policy team_policies.DefaultLinkExpirationDaysPolicy?
"Existing owning team's policy for default number of days from today to link's expiration.
Not provided if the link is not team owned."
change_shared_link_expiration_policy ChangeLinkExpirationPolicy?
"When owning team's policy :field:`change_shared_link_expiration_policy` is :field:`ChangeLinkExpirationPolicy.not_allowed`,
the updated externally available shared link expiration value cannot be less strict
than :field:`days_to_expire_policy`.
In this case :field:`days_to_expire_policy` is expected to be different from `none`.
Not provided if the link is not team owned."
example default
resolved_visibility = public
can_revoke = false
revoke_failure_reason = owner_only
visibility_policies = [public, password]
can_set_expiry = false
can_remove_expiry = false
allow_download = true
can_allow_download = true
can_disallow_download = false
allow_comments = true
team_restricts_comments = true
audience_options = [public, team, no_one]
can_set_password = true
can_remove_password = true
require_password = false
can_use_extended_sharing_controls = false
struct ListSharedLinksArg
path ReadPath?
"See :route:`list_shared_links` description."
cursor String?
"The cursor returned by your last call to :route:`list_shared_links`."
direct_only Boolean?
"See :route:`list_shared_links` description."
example default
cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu"
example path
path = "/Homework/Math"
example id
path = "id:a4ayc_80_OEAAAAAAAAAYa"
example rev
path = "rev:a1c10ce0dd78"
example id_no_parent_links
path = "id:a4ayc_80_OEAAAAAAAAAYa"
direct_only = true
struct ListSharedLinksResult
links List(SharedLinkMetadata)
"Shared links applicable to the path argument."
has_more Boolean
"Is true if there are additional shared links that have not been returned
yet. Pass the cursor into :route:`list_shared_links` to retrieve them."
cursor String?
"Pass the cursor into :route:`list_shared_links` to obtain the additional links. Cursor is
returned only if no path is given."
example default
links = [default]
cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu"
has_more = true
struct ModifySharedLinkSettingsArgs
url String
"URL of the shared link to change its settings."
settings SharedLinkSettings
"Set of settings for the shared link."
remove_expiration Boolean = false
"If set to true, removes the expiration of the shared link."
example default
url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0"
settings = default
struct PathLinkMetadata extends LinkMetadata
"Metadata for a path-based shared link."
path String
"Path in user's Dropbox."
example default
url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0"
path = "/Homework/Math/Prime_Numbers.txt"
expires = null
visibility = public
struct RevokeSharedLinkArg
url String
"URL of the shared link."
example default
url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0"
struct SharedLinkSettings
require_password Boolean?
"Boolean flag to enable or disable password protection."
link_password String?
"If :field:`require_password` is true, this is needed
to specify the password to access the link."
expires common.DropboxTimestamp?
"Expiration time of the shared link. By default the link won't expire."
audience LinkAudience?
"The new audience who can benefit from the access level specified by the link's access level
specified in the `link_access_level` field of `LinkPermissions`. This is used in conjunction
with team policies and shared folder policies to determine the final effective audience type
in the `effective_audience` field of `LinkPermissions."
access RequestedLinkAccessLevel?
"Requested access level you want the audience to gain from this link. Note, modifying access
level for an existing link is not supported."
requested_visibility RequestedVisibility?
@common.Deprecated
"Use :field:`audience` instead. The requested access for this shared link."
allow_download Boolean?
"Boolean flag to allow or not download capabilities for shared links."
example default
requested_visibility = public
audience = public
access = viewer
allow_download = true
struct TeamMemberInfo
"Information about a team member."
team_info TeamInfo
"Information about the member's team."
display_name String
"The display name of the user."
member_id String?
"ID of user as a member of a team. This field will only be present if the member is in the
same team as current user."
example default
team_info = default
display_name = "Roger Rabbit"
member_id = "dbmid:abcd1234"
struct VisibilityPolicy
policy RequestedVisibility
"This is the value to submit when saving the visibility setting."
resolved_policy AlphaResolvedVisibility
"This is what the effective policy would be, if you selected this option. The resolved
policy is obtained after considering external effects such as shared folder settings and
team policy. This value is guaranteed to be provided."
allowed Boolean
"Whether the user is permitted to set the visibility to this policy."
disallowed_reason VisibilityPolicyDisallowedReason?
"If :field:`allowed` is :val:`false`, this will provide the reason that the user is not
permitted to set the visibility to this policy."
example public
policy = public
resolved_policy = public
allowed = true
example public_team
policy = public
resolved_policy = team_only
allowed = false
disallowed_reason = restricted_by_team
example public_shared_folder
policy = public
resolved_policy = shared_folder_only
allowed = false
disallowed_reason = restricted_by_shared_folder
example password
policy = password
resolved_policy = password
allowed = true
example password_team
policy = password
resolved_policy = team_and_password
allowed = true
example password_shared_folder
policy = password
resolved_policy = shared_folder_only
allowed = false
disallowed_reason = restricted_by_shared_folder
example team_only
policy = team_only
resolved_policy = team_only
allowed = true
example team_shared_folder
policy = team_only
resolved_policy = shared_folder_only
allowed = false
disallowed_reason = restricted_by_shared_folder
union AccessLevel
"Defines the access levels for collaborators."
owner
"The collaborator is the owner of the shared folder. Owners can
view and edit the shared folder as well as set the folder's
policies using :route:`update_folder_policy`."
editor
"The collaborator can both view and edit the shared folder."
viewer
"The collaborator can only view the shared folder."
viewer_no_comment
"The collaborator can only view the shared folder and does
not have any access to comments."
traverse
"The collaborator can only view the shared folder that they have
access to."
no_access
"If there is a Righteous Link on the folder which grants access
and the user has visited such link, they are allowed to perform
certain action (i.e. add themselves to the folder) via the link
access even though the user themselves are not a member on the
shared folder yet."
struct InsufficientPlan
message String
"A message to tell the user to upgrade in order to support expected action."
upsell_url String?
"A URL to send the user to in order to obtain the account type they need, e.g. upgrading.
Absent if there is no action the user can take to upgrade."
union PermissionDeniedReason
"Possible reasons the user is denied a permission."
user_not_same_team_as_owner
"User is not on the same team as the folder owner."
user_not_allowed_by_owner
"User is prohibited by the owner from taking the action."
target_is_indirect_member
"Target is indirectly a member of the folder, for example by being part of a group."
target_is_owner
"Target is the owner of the folder."
target_is_self
"Target is the user itself."
target_not_active
"Target is not an active member of the team."
folder_is_limited_team_folder
"Folder is team folder for a limited team."
owner_not_on_team
"The content owner needs to be on a Dropbox team to perform this action."
permission_denied
"The user does not have permission to perform this action on the link."
restricted_by_team
"The user's team policy prevents performing this action on the link."
user_account_type
"The user's account type does not support this action."
user_not_on_team
"The user needs to be on a Dropbox team to perform this action."
folder_is_inside_shared_folder
"Folder is inside of another shared folder."
restricted_by_parent_folder
"Policy cannot be changed due to restrictions from parent folder."
insufficient_plan InsufficientPlan
route list_file_members/batch (ListFileMembersBatchArg, List(ListFileMembersBatchResult), SharingUserError)
"Get members of multiple files at once. The arguments
to this route are more limited, and the limit on query result size per file
is more strict. To customize the results more, use the individual file
endpoint.
Inherited users and groups are not included in the result, and permissions are not
returned for this endpoint."
attrs
auth = "user"
scope = "sharing.read"