-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathfiles.stone
More file actions
3239 lines (2683 loc) · 122 KB
/
Copy pathfiles.stone
File metadata and controls
3239 lines (2683 loc) · 122 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 files
"This namespace contains endpoints and data types for basic file operations."
import async
import common
import file_properties
import users_common
route search:2 (SearchV2Arg, SearchV2Result, SearchError)
"Searches for files and folders.
Note: :route:`search:2` along with :route:`search/continue:2` can only be used to
retrieve a maximum of 10,000 matches.
Recent changes may not immediately be reflected in search results due to a short delay in indexing.
Duplicate results may be returned across pages. Some results may not be returned."
attrs
allow_app_folder_app = true
auth = "user"
scope = "files.metadata.read"
route search/continue:2 (SearchV2ContinueArg, SearchV2Result, SearchError)
"Fetches the next page of search results returned from :route:`search:2`.
Note: :route:`search:2` along with :route:`search/continue:2` can only be used to
retrieve a maximum of 10,000 matches.
Recent changes may not immediately be reflected in search results due to a short delay in indexing.
Duplicate results may be returned across pages. Some results may not be returned."
attrs
allow_app_folder_app = true
auth = "user"
scope = "files.metadata.read"
alias TagText = String(max_length=32, min_length=1, pattern="[\\w]+")
union Tag
"Tag that can be added in multiple ways."
user_generated_tag UserGeneratedTag
"Tag generated by the user."
example default
user_generated_tag = default
union BaseTagError
path LookupError
union AddTagError extends BaseTagError
too_many_tags
"The item already has the maximum supported number of tags."
union RemoveTagError extends BaseTagError
tag_not_present
"That tag doesn't exist at this path."
struct UserGeneratedTag
tag_text TagText
example default
tag_text = "my_tag"
struct AddTagArg
path Path
"Path to the item to be tagged."
tag_text TagText
"The value of the tag to add. Will be automatically converted to lowercase letters."
example default
path = "/Prime_Numbers.txt"
tag_text = "my_tag"
struct RemoveTagArg
path Path
"Path to the item to tag."
tag_text TagText
"The tag to remove. Will be automatically converted to lowercase letters."
example default
path = "/Prime_Numbers.txt"
tag_text = "my_tag"
struct GetTagsArg
paths List(Path)
"Path to the items."
example default
paths = ["/Prime_Numbers.txt"]
struct PathToTags
path Path
"Path of the item."
tags List(Tag)
"Tags assigned to this item."
example default
path = "/Prime_Numbers.txt"
tags = [default]
struct GetTagsResult
paths_to_tags List(PathToTags)
"List of paths and their corresponding tags."
example default
paths_to_tags = [default]
route tags/add (AddTagArg, Void, AddTagError)
"Add a tag to an item. A tag is a string. The strings are automatically converted to lowercase letters. No more than 20 tags can be added to a given item."
attrs
auth = "user"
is_preview = true
scope = "files.metadata.write"
route tags/remove (RemoveTagArg, Void, RemoveTagError)
"Remove a tag from an item."
attrs
auth = "user"
is_preview = true
scope = "files.metadata.write"
route tags/get (GetTagsArg, GetTagsResult, BaseTagError)
"Get list of tags assigned to items."
attrs
auth = "user"
is_preview = true
scope = "files.metadata.read"
alias CopyBatchArg = RelocationBatchArgBase
alias FileId = String(min_length=4, pattern="id:.+")
alias Id = String(min_length=1)
alias ListFolderCursor = String(min_length=1)
alias MalformedPathError = String?
alias PathOrId = String(pattern="/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/(.|[\\r\\n])*)?)")
alias PathR = String(pattern="(/(.|[\\r\\n])*)?|(ns:[0-9]+(/(.|[\\r\\n])*)?)")
alias PathROrId = String(pattern="(/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/(.|[\\r\\n])*)?)")
alias ReadPath = String(pattern="(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/(.|[\\r\\n])*)?)")
alias Rev = String(min_length=9, pattern="[0-9a-f]+")
alias SearchV2Cursor = String(min_length=1)
alias Sha256HexHash = String(max_length=64, min_length=64)
alias SharedLinkUrl = String
alias WritePath = String(pattern="(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)")
alias WritePathOrId = String(pattern="(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)")
union LookupError
malformed_path MalformedPathError
"The given path does not satisfy the required path format. Please refer to the :link:`Path formats documentation https://www.dropbox.com/developers/documentation/http/documentation#path-formats` for more information."
not_found
"There is nothing at the given path."
not_file
"We were expecting a file, but the given path refers to something that isn't a file."
not_folder
"We were expecting a folder, but the given path refers to something that isn't a folder."
restricted_content
"The file cannot be transferred because the content is restricted. For example, we might restrict a file due to legal requirements."
unsupported_content_type
"This operation is not supported for this content type."
locked
"The given path is locked."
union WriteConflictError
file
"There's a file in the way."
folder
"There's a folder in the way."
file_ancestor
"There's a file at an ancestor path, so we couldn't create the required parent folders."
union WriteError
malformed_path MalformedPathError
"The given path does not satisfy the required path format. Please refer to the :link:`Path formats documentation https://www.dropbox.com/developers/documentation/http/documentation#path-formats` for more information."
conflict WriteConflictError
"Couldn't write to the target path because there was something in the way."
no_write_permission
"The user doesn't have permissions to write to the target location."
insufficient_space
"The user doesn't have enough available space (bytes) to write more data."
disallowed_name
"Dropbox will not save the file or folder because of its name."
team_folder
"This endpoint cannot move or delete team folders."
operation_suppressed
"This file operation is not allowed at this path."
too_many_write_operations
"There are too many write operations in user's Dropbox. Please retry
this request."
access_restricted
"The user doesn't have permission to perform the action due to restrictions set by a team administrator"
union DeleteError
path_lookup LookupError
path_write WriteError
too_many_write_operations
"There are too many write operations in user's Dropbox. Please retry
this request."
too_many_files
"There are too many files in one request. Please retry with fewer files."
union_closed ThumbnailError
path LookupError
"An error occurs when downloading metadata for the image."
unsupported_extension
"The file extension doesn't allow conversion to a thumbnail."
unsupported_image
"The image cannot be converted to a thumbnail."
encrypted_content
"Encrypted content cannot be converted to a thumbnail."
conversion_error
"An error occurs during thumbnail conversion."
union ThumbnailV2Error
path LookupError
"An error occurred when downloading metadata for the image."
unsupported_extension
"The file extension doesn't allow conversion to a thumbnail."
unsupported_image
"The image cannot be converted to a thumbnail."
encrypted_content
"Encrypted content cannot be converted to a thumbnail."
conversion_error
"An error occurred during thumbnail conversion."
access_denied
"Access to this shared link is forbidden."
not_found
"The shared link does not exist."
struct UploadSessionOffsetError
correct_offset UInt64
"The offset up to which data has been collected."
union UploadSessionLookupError
not_found
"The upload session ID was not found or has expired. Upload sessions are
valid for 7 days."
incorrect_offset UploadSessionOffsetError
"The specified offset was incorrect. See the value for the
correct offset. This error may occur when a previous request
was received and processed successfully but the client did not
receive the response, e.g. due to a network error."
closed
"You are attempting to append data to an upload session that
has already been closed (i.e. committed)."
not_closed
"The session must be closed before calling upload_session/finish_batch."
too_large
"You can not append to the upload session because the size of a file should not exceed the
max file size limit (i.e. 2^41 - 2^22 or 2,199,019,061,248 bytes)."
concurrent_session_invalid_offset
"For concurrent upload sessions, offset needs to be multiple of 2^22 (4,194,304) bytes."
concurrent_session_invalid_data_size
"For concurrent upload sessions, only chunks with size multiple of 2^22 (4,194,304) bytes can be uploaded."
payload_too_large
"The request payload must be at most 150 MiB."
union UploadSessionFinishError
lookup_failed UploadSessionLookupError
"The session arguments are incorrect; the value explains the reason."
path WriteError
"Unable to save the uploaded contents to a file. Data has already been appended to the
upload
session. Please retry with empty data body and updated offset."
properties_error file_properties.InvalidPropertyGroupError
"The supplied property group is invalid. The file has uploaded without property groups."
too_many_shared_folder_targets
@common.Deprecated
"The batch request commits files into too many different shared folders.
Please limit your batch request to files contained in a single shared folder."
too_many_write_operations
"There are too many write operations happening in the user's Dropbox. You should
retry uploading this file."
concurrent_session_data_not_allowed
"Uploading data not allowed when finishing concurrent upload session."
concurrent_session_not_closed
"Concurrent upload sessions need to be closed before finishing."
concurrent_session_missing_data
"Not all pieces of data were uploaded before trying to finish the session."
payload_too_large
"The request payload must be at most 150 MiB."
content_hash_mismatch
"The content received by the Dropbox server in this call does not match the provided content hash."
encryption_not_supported
"The file is required to be encrypted, which is not supported in our public API."
union_closed ThumbnailFormat
jpeg
png
webp
union_closed ThumbnailMode
strict
"Scale down the image to fit within the given size."
bestfit
"Scale down the image to fit within the given size or its transpose."
fitone_bestfit
"Scale down the image to completely cover the given size or its transpose."
original
"Don't resize the image at all."
union_closed ThumbnailQuality
quality_80
"default thumbnail quality."
quality_90
"high thumbnail quality."
union_closed ThumbnailSize
w32h32
"32 by 32 px."
w64h64
"64 by 64 px."
w128h128
"128 by 128 px."
w256h256
"256 by 256 px."
w480h320
"480 by 320 px."
w640h480
"640 by 480 px."
w960h640
"960 by 640 px."
w1024h768
"1024 by 768 px."
w2048h1536
"2048 by 1536 px."
w3200h2400
"3200 by 2400 px."
union_closed SearchMatchType
"Indicates what type of match was found for a given item."
filename
"This item was matched on its file or folder name."
content
"This item was matched based on its file contents."
both
"This item was matched based on both its contents and its file name."
example default
content = null
union SyncSetting
default
"On first sync to members' computers, the specified folder will follow
its parent folder's setting or otherwise follow default sync behavior."
not_synced
"On first sync to members' computers, the specified folder will be set
to not sync with selective sync."
not_synced_inactive
"The specified folder's not_synced setting is inactive due to its
location or other configuration changes. It will follow its parent
folder's setting."
union SyncSettingArg
default
"On first sync to members' computers, the specified folder will follow its
parent folder's setting or otherwise follow default sync behavior."
not_synced
"On first sync to members' computers, the specified folder will be set
to not sync with selective sync."
example default
not_synced = null
struct SharedLinkFileInfo
url String
"The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link,
we use the path param to determine for which file in the folder the view is for."
path String?
"The path corresponding to a file in a shared link to a folder. Required for shared links to folders."
password String?
"Password for the shared link. Required for password-protected shared links to files
unless it can be read from a cookie."
example default
url = "https://dropbox.com/s/hash/filename.png"
struct SharedLink
url SharedLinkUrl
"Shared link url."
password String?
"Password for the shared link."
example default
url = "https://www.dropbox.com/s/2sn712vy1ovegw8?dl=0"
password = "password"
union PathOrLink
path ReadPath
link SharedLinkFileInfo
example default
path = "/a.docx"
struct DeleteBatchResultData
metadata Metadata
"Metadata of the deleted object."
example default
metadata = default
union_closed DeleteBatchResultEntry
success DeleteBatchResultData
failure DeleteError
example default
success = default
union_closed WriteMode
"Your intent when writing a file to some path. This is used to determine
what constitutes a conflict and what the autorename strategy is.
In some situations, the conflict behavior is identical:
(a) If the target path doesn't refer to anything, the file is always written;
no conflict.
(b) If the target path refers to a folder, it's always a conflict.
(c) If the target path refers to a file with identical contents, nothing gets
written; no conflict.
The conflict checking differs in the case where there's a file at the target
path with contents different from the contents you're trying to write."
add
"Do not overwrite an existing file if there is a conflict. The
autorename strategy is to append a number to the file name. For example,
\"document.txt\" might become \"document (2).txt\"."
overwrite
"Always overwrite the existing file. The autorename
strategy is the same as it is for :field:`add`."
update Rev
"Overwrite if the given \"rev\" matches the existing file's \"rev\".
The supplied value should be the latest known \"rev\" of the file, for example,
from :type:`FileMetadata`, from when the file was last downloaded by the app.
This will cause the file on the Dropbox servers to be overwritten if the given \"rev\"
matches the existing file's current \"rev\" on the Dropbox servers.
The autorename strategy is to append the string \"conflicted copy\"
to the file name. For example, \"document.txt\" might become
\"document (conflicted copy).txt\" or \"document (Panda's conflicted copy).txt\"."
example default
add = null
example overwriting
overwrite = null
example with_revision
update = "a1c10ce0dd78"
struct CommitInfo
path WritePathOrId
"Path in the user's Dropbox to save the file."
mode WriteMode = add
"Selects what to do if the file already exists."
autorename Boolean = false
"If there's a conflict, as determined by :field:`mode`, have the Dropbox
server try to autorename the file to avoid conflict."
client_modified common.DropboxTimestamp?
"The value to store as the :field:`client_modified` timestamp. Dropbox
automatically records the time at which the file was written to the
Dropbox servers. It can also record an additional timestamp, provided
by Dropbox desktop clients, mobile clients, and API apps of when the
file was actually created or modified."
mute Boolean = false
"Normally, users are made aware of any file modifications in their
Dropbox account via notifications in the client software. If
:val:`true`, this tells the clients that this modification shouldn't
result in a user notification."
property_groups List(file_properties.PropertyGroup)?
"List of custom properties to add to file."
strict_conflict Boolean = false
"Be more strict about how each :type:`WriteMode` detects conflict.
For example, always return a conflict error when :field:`mode`
= :field:`WriteMode.update` and the given \"rev\" doesn't match
the existing file's \"rev\", even if the existing file has been
deleted. This also forces a conflict even when the target path
refers to a file with identical contents."
example default
path = "/Homework/math/Matrices.txt"
autorename = true
example another
path = "/Homework/math/Vectors.txt"
autorename = true
example update
path = "/Homework/math/Matrices.txt"
mode = with_revision
autorename = false
property_groups = [default]
struct UploadSessionCursor
session_id String
"The upload session ID (returned by :route:`upload_session/start`)."
offset UInt64
"Offset in bytes at which data should be appended. We use this to make
sure upload data isn't lost or duplicated in the event of a network error."
example default
session_id = "pid_upload_session:h-NtwvAdw3XDqqHmb0J2t0XfIaSnQw2Eor59pfZI9D_ZGNJ4Ew"
offset = 0
example another
session_id = "pid_upload_session:6MvrpirpGzvgtxdyRkiYzL4bpnd_xOuqWBBCdYBUiM7uQe2fPw"
offset = 1073741824
struct UploadSessionFinishArg
cursor UploadSessionCursor
"Contains the upload session ID and the offset."
commit CommitInfo
"Contains the path and other optional modifiers for the commit."
content_hash Sha256HexHash?
"A hash of the file content uploaded in this call. If provided and the uploaded content
does not match this hash, an error will be returned. For more information see our
:link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page."
example default
cursor = default
commit = default
example another
cursor = another
commit = another
example update
cursor = default
commit = update
struct RelocationPath
from_path WritePathOrId
"Path in the user's Dropbox to be copied or moved."
to_path WritePathOrId
"Path in the user's Dropbox that is the destination."
example default
from_path = "/Homework/math"
to_path = "/Homework/algebra"
struct RelocationBatchArgBase
entries List(RelocationPath, max_items=1000, min_items=1)
"List of entries to be moved or copied. Each entry is :type:`RelocationPath`."
autorename Boolean = false
"If there's a conflict with any file, have the Dropbox server try to
autorename that file to avoid the conflict."
example default
entries = [default]
union FileLockContent
unlocked
"Empty type to indicate no lock."
single_user SingleUserLock
"A lock held by a single user."
example default
single_user = default
struct SingleUserLock
created common.DropboxTimestamp
"The time the lock was created."
lock_holder_account_id users_common.AccountId
"The account ID of the lock holder if known."
lock_holder_team_id String?
"The id of the team of the account holder if it exists."
example default
created = "2015-05-12T15:50:38Z"
lock_holder_account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc"
lock_holder_team_id = "dbtid:1234abcd"
struct FileLock
content FileLockContent
"The lock description."
example default
content = default
struct FileLockMetadata
is_lockholder Boolean?
"True if caller holds the file lock."
lockholder_name String?
"The display name of the lock holder."
lockholder_account_id users_common.AccountId?
"The account ID of the lock holder if known."
created common.DropboxTimestamp?
"The timestamp of the lock was created."
example default
is_lockholder = true
lockholder_name = "Imaginary User"
created = "2015-05-12T15:50:38Z"
struct LockConflictError
lock FileLock
"The lock that caused the conflict."
union LockFileError
path_lookup LookupError
"Could not find the specified resource."
too_many_write_operations
"There are too many write operations in user's Dropbox. Please retry this request."
too_many_files
"There are too many files in one request. Please retry with fewer files."
no_write_permission
"The user does not have permissions to change the lock state or access the file."
cannot_be_locked
"Item is a type that cannot be locked."
file_not_shared
"Requested file is not currently shared."
lock_conflict LockConflictError
"The user action conflicts with an existing lock on the file."
internal_error
"Something went wrong with the job on Dropbox's end. You'll need to
verify that the action you were taking succeeded, and if not, try
again. This should happen very rarely."
struct LockFileResult
metadata Metadata
"Metadata of the file."
lock FileLock
@common.Deprecated
"The file lock state after the operation."
example default
metadata = default
lock = default
struct SharingInfo
"Sharing info for a file or folder."
read_only Boolean
"True if the file or folder is inside a read-only shared folder."
example default
read_only = false
struct FileSharingInfo extends SharingInfo
"Sharing info for a file which is contained by a shared folder."
parent_shared_folder_id common.SharedFolderId
"ID of shared folder that holds this file."
modified_by users_common.AccountId?
"The last user who modified the file. This field will be null if
the user's account has been deleted."
example default
read_only = true
parent_shared_folder_id = "84528192421"
modified_by = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc"
struct FolderSharingInfo extends SharingInfo
"Sharing info for a folder which is contained in a shared folder or is a
shared folder mount point."
parent_shared_folder_id common.SharedFolderId?
"Set if the folder is contained by a shared folder."
shared_folder_id common.SharedFolderId?
"If this folder is a shared folder mount point, the ID of the shared
folder mounted at this location."
traverse_only Boolean = false
"Specifies that the folder can only be traversed and the user can only see
a limited subset of the contents of this folder because they don't have
read access to this folder. They do, however, have access to some sub folder."
no_access Boolean = false
"Specifies that the folder cannot be accessed by the user."
example default
read_only = false
parent_shared_folder_id = "84528192421"
example shared_folder
read_only = true
shared_folder_id = "84528192421"
struct SymlinkInfo
target String
"The target this symlink points to."
struct ExportInfo
"Export information for a file."
export_as String?
"Format to which the file can be exported to."
export_options List(String)?
"Additional formats to which the file can be exported. These values can be
specified as the export_format in /files/export."
example default
export_as = "xlsx"
struct Dimensions
"Dimensions for a photo or video."
height UInt64
"Height of the photo/video."
width UInt64
"Width of the photo/video."
example default
height = 768
width = 1024
struct GpsCoordinates
"GPS coordinates for a photo or video."
latitude Float64
"Latitude of the GPS coordinates."
longitude Float64
"Longitude of the GPS coordinates."
example default
latitude = 37.7833
longitude = 122.4167
struct MediaMetadata
"Metadata for a photo or video."
union_closed
photo PhotoMetadata
video VideoMetadata
dimensions Dimensions?
"Dimension of the photo/video."
location GpsCoordinates?
"The GPS coordinate of the photo/video."
time_taken common.DropboxTimestamp?
"The timestamp when the photo/video is taken."
struct PhotoMetadata extends MediaMetadata
"Metadata for a photo."
example default
dimensions = default
location = default
time_taken = "2015-05-12T15:50:38Z"
struct VideoMetadata extends MediaMetadata
"Metadata for a video."
duration UInt64?
"The duration of the video in milliseconds."
example default
dimensions = default
location = default
time_taken = "2015-05-12T15:50:38Z"
duration = 1000
union_closed MediaInfo
pending
"Indicate the photo/video is still under processing and metadata is
not available yet."
metadata MediaMetadata
"The metadata for the photo/video. Uses MediaMetadataAbstract to
preserve photo/video subtypes (e.g. VideoMetadata.duration)."
struct Metadata
"Metadata for a file or folder."
union_closed
file FileMetadata
folder FolderMetadata
deleted DeletedMetadata
name String
"The last component of the path (including extension).
This never contains a slash."
path_lower String?
"The lowercased full path in the user's Dropbox. This always starts with a slash.
This field will be null if the file or folder is not mounted."
path_display String?
"The cased path to be used for display purposes only. In rare instances the casing will not
correctly match the user's filesystem, but this behavior will match the path provided in
the Core API v1, and at least the last path component will have the correct casing. Changes
to only the casing of paths won't be returned by :route:`list_folder/continue`. This field
will be null if the file or folder is not mounted."
parent_shared_folder_id common.SharedFolderId?
@common.Deprecated
"Please use :field:`FileSharingInfo.parent_shared_folder_id`
or :field:`FolderSharingInfo.parent_shared_folder_id` instead."
preview_url String?
"The preview URL of the file."
example default
file = default
example folder_metadata
folder = default
example search_metadata
file = search_file_metadata
struct FileMetadata extends Metadata
id Id
"A unique identifier for the file."
client_modified common.DropboxTimestamp
"For files, this is 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."
media_info MediaInfo?
"Additional information if the file is a photo or video. This field will not be set on entries returned by :route:`list_folder`, :route:`list_folder/continue`, or :route:`get_thumbnail_batch`, starting December 2, 2019."
symlink_info SymlinkInfo?
"Set if this file is a symlink."
sharing_info FileSharingInfo?
"Set if this file is contained in a shared folder."
is_downloadable Boolean = true
"If true, file can be downloaded directly; else the file must be exported."
export_info ExportInfo?
"Information about format this file can be exported to. This filed must be set if :field:`is_downloadable`
is set to false."
property_groups List(file_properties.PropertyGroup)?
"Additional information if the file has custom properties with the
property template specified."
has_explicit_shared_members Boolean?
"This flag will only be present if include_has_explicit_shared_members
is true in :route:`list_folder` or :route:`get_metadata`. If this
flag is present, it will be true if this file has any explicit shared
members. This is different from sharing_info in that this could be true
in the case where a file has explicit members but is not contained within
a shared folder."
content_hash Sha256HexHash?
"A hash of the file content. This field can be used to verify data integrity. For more
information see our :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page."
file_lock_info FileLockMetadata?
"If present, the metadata associated with the file's current lock."
is_restorable Boolean?
"If present, indicates whether this file revision can be restored."
example default
id = "id:a4ayc_80_OEAAAAAAAAAXw"
name = "Prime_Numbers.txt"
path_lower = "/homework/math/prime_numbers.txt"
path_display = "/Homework/math/Prime_Numbers.txt"
sharing_info = default
client_modified = "2015-05-12T15:50:38Z"
server_modified = "2015-05-12T15:50:38Z"
rev = "a1c10ce0dd78"
size = 7212
is_downloadable = true
property_groups = [default]
has_explicit_shared_members = false
content_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
file_lock_info = default
example search_file_metadata
id = "id:a4ayc_80_OEAAAAAAAAAXw"
name = "Prime_Numbers.txt"
path_lower = "/homework/math/prime_numbers.txt"
path_display = "/Homework/math/Prime_Numbers.txt"
sharing_info = default
client_modified = "2015-05-12T15:50:38Z"
server_modified = "2015-05-12T15:50:38Z"
rev = "a1c10ce0dd78"
size = 7212
is_downloadable = true
has_explicit_shared_members = false
content_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
struct FolderMetadata extends Metadata
id Id
"A unique identifier for the folder."
shared_folder_id common.SharedFolderId?
@common.Deprecated
"Please use :field:`sharing_info` instead."
sharing_info FolderSharingInfo?
"Set if the folder is contained in a shared folder or is a shared folder mount point."
property_groups List(file_properties.PropertyGroup)?
"Additional information if the file has custom properties with the
property template specified. Note that only properties associated with
user-owned templates, not team-owned templates, can be attached to folders."
example default
id = "id:a4ayc_80_OEAAAAAAAAAXz"
path_lower = "/homework/math"
path_display = "/Homework/math"
name = "math"
sharing_info = default
property_groups = [default]
struct DeletedMetadata extends Metadata
"Indicates that there used to be a file or folder at this path, but it no longer exists."
is_restorable Boolean?
"If present, indicates whether this deleted entry can be restored."
example default
path_lower = "/homework/math/pi.txt"
path_display = "/Homework/math/pi.txt"
name = "pi.txt"
struct PreviewArg
path ReadPath
"The path of the file to preview."
rev Rev?
@common.Deprecated
"Please specify revision in :field:`path` instead."
example default
path = "/word.docx"
example id
path = "id:a4ayc_80_OEAAAAAAAAAYa"
example rev
path = "rev:a1c10ce0dd78"
alias Path = String(pattern="/(.|[\\r\\n])*")
struct HighlightSpan
highlight_str String
"String to be determined whether it should be highlighted or not."
is_highlighted Boolean
"The string should be highlighted or not."
example default
highlight_str = "test"
is_highlighted = false
union_closed AlphaGetMetadataError extends GetMetadataError
properties_error file_properties.LookUpPropertiesError
union CreateFolderBatchError
too_many_files
"The operation would involve too many files or folders."
union CreateFolderBatchJobStatus extends async.PollResultBase
complete CreateFolderBatchResult
"The batch create folder has finished."
failed CreateFolderBatchError
"The batch create folder has failed."
example default
complete = default
union CreateFolderBatchLaunch extends async.LaunchResultBase
"Result returned by :route:`create_folder_batch` that may either launch an
asynchronous job or complete synchronously."
complete CreateFolderBatchResult
example complete
complete = default
example async_job_id
async_job_id = "34g93hh34h04y384084"
union_closed CreateFolderBatchResultEntry
success CreateFolderEntryResult
failure CreateFolderEntryError
example default
success = default
union CreateFolderEntryError
path WriteError
union_closed CreateFolderError
path WriteError
union DeleteBatchError
too_many_write_operations
@common.Deprecated
"Use :field:`DeleteError.too_many_write_operations`. :route:`delete_batch` now
provides smaller granularity about which entry has failed because of this."
union DeleteBatchJobStatus extends async.PollResultBase
complete DeleteBatchResult
"The batch delete has finished."
failed DeleteBatchError
"The batch delete has failed."
example default
complete = default
union DeleteBatchLaunch extends async.LaunchResultBase
"Result returned by :route:`delete_batch` that may either launch an asynchronous job or complete
synchronously."
complete DeleteBatchResult
example complete
complete = default
example async_job_id
async_job_id = "34g93hh34h04y384084"
union DownloadError
path LookupError
unsupported_file
"This file type cannot be downloaded directly; use :route:`export` instead."
union DownloadZipError