Dropbox

Links

    Dropbox API

    Getting access, Developing, Testing

    Back to Dropbox

    Files - Create Folder Batch

    Create multiple folders at once. This route is asynchronous for large batches, which returns a job ID immediately and runs the create folder batch asynchronously. Otherwise, creates the folders and returns the result synchronously for smaller inputs. You can force asynchronous behaviour by using the :field:CreateFolderBatchArg.force_async flag. Use :route:create_folder_batch/check to check the job status.

    Input

    type: object properties: data: type: object description: > paths: List of paths to be created in the user's Dropbox. Duplicate path arguments in the batch are considered only once. autorename: If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. force_async: Whether to force the create to happen asynchronously. properties: paths: type: array description: >- List of paths to be created in the user's Dropbox. Duplicate path arguments in the batch are considered only once. items: type: string force_async: type: boolean description: Whether to force the create to happen asynchronously. autorename: type: boolean description: >- If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict. title: Data

    Output

    type: object description: > Result returned by :route:`create_folder_batch` that may either launch an asynchronous job or complete synchronously. async_job_id: This response indicates that the processing is asynchronous. The string is an id that can be used to obtain the status of the asynchronous job. complete: None other: None properties: .tag: title: Choice of CreateFolderBatchLaunch type: string enum: - async_job_id - complete - other async_job_id: type: string description: >- This response indicates that the processing is asynchronous. The string is an id that can be used to obtain the status of the asynchronous job. complete: type: object description: | entries: None properties: entries: type: array items: type: object description: | success: None failure: None properties: failure: type: object description: | path: None other: None properties: path: type: object description: > malformed_path: None conflict: 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. too_many_write_operations: There are too many write operations in user's Dropbox. Please retry this request. other: None properties: malformed_path: type: string .tag: title: Choice of WriteError type: string enum: - malformed_path - conflict - no_write_permission - insufficient_space - disallowed_name - team_folder - too_many_write_operations - other conflict: type: object description: > 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. other: None properties: .tag: title: Choice of WriteConflictError type: string enum: - file - folder - file_ancestor - other .tag: title: Choice of CreateFolderEntryError type: string enum: - path - other .tag: title: Choice of CreateFolderBatchResultEntry type: string enum: - success - failure success: type: object description: | metadata: Metadata of the created folder. properties: metadata: type: object description: > name: The last component of the path (including extension). This never contains a slash. id: A unique identifier for the folder. path_lower: 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: 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: Please use :field:`FileSharingInfo.parent_shared_folder_id` or :field:`FolderSharingInfo.parent_shared_folder_id` instead. shared_folder_id: Please use :field:`sharing_info` instead. sharing_info: Set if the folder is contained in a shared folder or is a shared folder mount point. property_groups: 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. properties: parent_shared_folder_id: type: string description: >- Please use :field:`FileSharingInfo.parent_shared_folder_id` or :field:`FolderSharingInfo.parent_shared_folder_id` instead. name: type: string description: >- The last component of the path (including extension). This never contains a slash. path_display: type: string description: >- 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. shared_folder_id: type: string description: Please use :field:`sharing_info` instead. path_lower: type: string description: >- 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. sharing_info: type: object description: > Sharing info for a folder which is contained in a shared folder or is a shared folder mount point. read_only: True if the file or folder is inside a read-only shared folder. parent_shared_folder_id: Set if the folder is contained by a shared folder. shared_folder_id: If this folder is a shared folder mount point, the ID of the shared folder mounted at this location. traverse_only: 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: Specifies that the folder cannot be accessed by the user. properties: read_only: type: boolean description: >- True if the file or folder is inside a read-only shared folder. parent_shared_folder_id: type: string description: Set if the folder is contained by a shared folder. traverse_only: type: boolean description: >- 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. shared_folder_id: type: string description: >- If this folder is a shared folder mount point, the ID of the shared folder mounted at this location. no_access: type: boolean description: >- Specifies that the folder cannot be accessed by the user. property_groups: type: array description: >- 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. items: type: object description: > A subset of the property fields described by the corresponding :type:`PropertyGroupTemplate`. Properties are always added to a Dropbox file as a :type:`PropertyGroup`. The possible key names and value types in this group are defined by the corresponding :type:`PropertyGroupTemplate`. template_id: A unique identifier for the associated template. fields: The actual properties associated with the template. There can be up to 32 property types per template. properties: fields: type: array description: >- The actual properties associated with the template. There can be up to 32 property types per template. items: type: object description: > Raw key/value data to be associated with a Dropbox file. Property fields are added to Dropbox files as a :type:`PropertyGroup`. name: Key of the property field associated with a file and template. Keys can be up to 256 bytes. value: Value of the property field associated with a file and template. Values can be up to 1024 bytes. properties: name: type: string description: >- Key of the property field associated with a file and template. Keys can be up to 256 bytes. value: type: string description: >- Value of the property field associated with a file and template. Values can be up to 1024 bytes. template_id: type: string description: A unique identifier for the associated template. id: type: string description: A unique identifier for the folder.