dropbox
Module dropbox
API
Definitions
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_dropbox_1.4.0.png)
ballerinax/dropbox Ballerina library
Overview
This is a generated connector for Dropbox API v2 OpenAPI specification.
Dropbox is a modern workspace designed to reduce busywork-so you can focus on the things that matter. Sign in and put your creative energy to work.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a Dropbox account.
- Obtain tokens by following this guide.
Quickstart
To use the Dropbox connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
First, import the ballerinax/dropbox
module into the Ballerina project.
import ballerinax/dropbox;
Step 2: Create a new connector instance
Create a dropbox:ClientConfig
with the <ACCESS_TOKEN>
obtained, and initialize the connector with it.
dropbox:ClientConfig clientConfig = { auth : { token: `<ACCESS_TOKEN>` } }; dropbox:Client baseClient = check new Client(clientConfig);
Step 3: Invoke connector operation
-
Now you can use the operations available within the connector. Note that they are in the form of remote operations.
Following is an example to copy files or folders using the connector.
public function main() { dropbox:RelocationArg payload = { from_path: "/root/Homework/math/math.json", to_path: "/root/Homework1/math", autorename: true }; dropbox:RelocationResult|error result = baseClient->copyFileOrFolder(payload); if (result is dropbox:RelocationResult) { log:printInfo(result.toString()); } else { log:printError(result.toString()); } }
-
Use
bal run
command to compile and run the Ballerina program.
Clients![](/images/permalink.svg)
dropbox: Client![](/images/permalink.svg)
This is a generated connector for Dropbox API v2 OpenAPI specification. Dropbox is a modern workspace designed to reduce busywork-so you can focus on the things that matter. Sign in and put your creative energy to work.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create an Dropbox account and obtain tokens by following this guide.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string - URL of the target service
copyFileOrFolder![](/images/permalink.svg)
function copyFileOrFolder(RelocationArg payload, string? dropboxApiSelectAdmin) returns RelocationResult|error
Copy a file or folder to a different location in the user's Dropbox.
Parameters
- payload RelocationArg - Arguments for relocation.
- dropboxApiSelectAdmin string? (default ()) - The specified
team_member_id
which refer to a team administrator.
Return Type
- RelocationResult|error - Success
createFolder![](/images/permalink.svg)
function createFolder(CreateFolderArg payload, string? dropboxApiSelectAdmin) returns CreateFolderResult|error
Create a folder at a given path.
Parameters
- payload CreateFolderArg - Arguments for folder creation.
- dropboxApiSelectAdmin string? (default ()) - The specified
team_member_id
which refer to a team administrator.
Return Type
- CreateFolderResult|error - Success
deleteFileOrFolder![](/images/permalink.svg)
function deleteFileOrFolder(DeleteArg payload, string? dropboxApiSelectAdmin) returns DeleteResult|error
Delete the file or folder at a given path.
Parameters
- payload DeleteArg - Arguments for deletion.
- dropboxApiSelectAdmin string? (default ()) - The specified
team_member_id
which refer to a team administrator.
Return Type
- DeleteResult|error - Success
moveFileOrFolder![](/images/permalink.svg)
function moveFileOrFolder(RelocationArg payload, string? dropboxApiSelectAdmin) returns RelocationResult|error
Move a file or folder to a different location in the user's Dropbox.
Parameters
- payload RelocationArg - Arguments for move.
- dropboxApiSelectAdmin string? (default ()) - The specified
team_member_id
which refer to a team administrator.
Return Type
- RelocationResult|error - Success
restoreFiles![](/images/permalink.svg)
function restoreFiles(RestoreArg payload, string? dropboxApiSelectAdmin) returns FileMetadata|error
Restore a file to a specific revision.
Parameters
- payload RestoreArg - Arguments for restore.
- dropboxApiSelectAdmin string? (default ()) - The specified
team_member_id
which refer to a team administrator.
Return Type
- FileMetadata|error - Success
createSharedLinkWithSettings![](/images/permalink.svg)
function createSharedLinkWithSettings(CreateSharedLinkWithSettingsArg payload, string? dropboxApiSelectAdmin) returns SharedLinkMetadata|error
Create Shared Link With Settings
Parameters
- payload CreateSharedLinkWithSettingsArg - Arguments for create a Dropbox link.
- dropboxApiSelectAdmin string? (default ()) - The specified
team_member_id
which refer to a team administrator.
Return Type
- SharedLinkMetadata|error - Success
getTemporaryLink![](/images/permalink.svg)
function getTemporaryLink(GetTemporaryLinkArg payload) returns GetTemporaryLinkResult|error
Get a temporary link to stream content of a file.
Parameters
- payload GetTemporaryLinkArg - Arguments to get temporary link.
Return Type
- GetTemporaryLinkResult|error - Success
getFileOrFolderMetadata![](/images/permalink.svg)
function getFileOrFolderMetadata(GetMetadataArg payload, string? dropboxApiSelectUser) returns FileMetadata|error
Returns the metadata for a file or folder.
Parameters
- payload GetMetadataArg - Arguments to get metadata.
- dropboxApiSelectUser string? (default ()) - The specified
team_member_id
.
Return Type
- FileMetadata|error - Success
listRevisions![](/images/permalink.svg)
function listRevisions(ListRevisionsArg payload, string? dropboxApiSelectUser) returns ListRevisionsResult|error
Returns revisions for files based on a file path or a file id.
Parameters
- payload ListRevisionsArg - Arguments to list revisions.
- dropboxApiSelectUser string? (default ()) - The specified
team_member_id
.
Return Type
- ListRevisionsResult|error - Success
searchFiles![](/images/permalink.svg)
function searchFiles(SearchArg payload) returns SearchResult|error
Searches for files and folders.
Parameters
- payload SearchArg - Arguments to search.
Return Type
- SearchResult|error - Success
downloadFiles![](/images/permalink.svg)
function downloadFiles(record {} dropboxApiArg, string? dropboxApiSelectUser) returns FileMetadata|error
Download a file from a user's Dropbox.
Parameters
- dropboxApiArg record {} - Download arguments.
- dropboxApiSelectUser string? (default ()) - The specified
team_member_id
.
Return Type
- FileMetadata|error - Success
Records![](/images/permalink.svg)
dropbox: AlphaResolvedVisibility![](/images/permalink.svg)
Fields
- '\.tag string? - 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.
dropbox: ClientHttp1Settings![](/images/permalink.svg)
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
dropbox: CommitInfoWithProperties![](/images/permalink.svg)
Commit information.
Fields
- autorename boolean? - If there's a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict. The default for this field is False.
- mute boolean? - If true, this tells the clients that this modification shouldn't result in a user notification. Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. The default for this field is False.
- client_modified string? - The value to store as the 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. This field is optional.
- mode WriteMode? - Selects what to do if the file already exists. The default for this union is add.
- path string? - Path in the user's Dropbox to save the file.
- property_groups PropertyGroup[]? - List of custom properties to add to file.
- strict_conflict boolean? - Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = 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. The default for this field is False.
dropbox: ConnectionConfig![](/images/permalink.svg)
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
dropbox: CreateFolderArg![](/images/permalink.svg)
Arguments to create a folder.
Fields
- path string? - Path in the user's Dropbox to create.
- autorename boolean? - If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.
dropbox: CreateFolderResult![](/images/permalink.svg)
Metadata of the created folder.
Fields
- metadata FolderMetadata? - Metadata for a folder.
dropbox: CreateSharedLinkWithSettingsArg![](/images/permalink.svg)
Shared links with errors arguments.
Fields
- path string? - The path to be shared by the shared link.
- settings SharedLinkSettings? - The requested settings for the newly created shared link. This field is optional.
dropbox: DeleteArg![](/images/permalink.svg)
Delete arguments.
Fields
- path string? - Path in the user's Dropbox to delete.
- parent_rev string? - Perform delete if given "rev" matches the existing file's latest "rev". This field is optional. This field does not support deleting a folder.
dropbox: DeletedMetadata![](/images/permalink.svg)
Indicates that there used to be a file or folder at this path, but it no longer exists.
Fields
- 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. This field is optional.
- path_display string? - The cased path to be used for display purposes only. This field is optional. 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 list_folder/continue. This field will be null if the file or folder is not mounted.
- id string? - A unique identifier for the file or folder.
dropbox: DeleteResult![](/images/permalink.svg)
Delete result.
Fields
- metadata DeletedMetadata? - Indicates that there used to be a file or folder at this path, but it no longer exists.
dropbox: Dimensions![](/images/permalink.svg)
Dimensions for a photo or video.
Fields
- width int? - Width of the photo/video.
- height int? - Height of the photo/video.
dropbox: DownloadArg![](/images/permalink.svg)
Download arguments.
Fields
- path string? - The path of the file to download.
dropbox: ExportMetadata![](/images/permalink.svg)
Export information for a file.
Fields
- export_as string? - Format to which the file can be exported to. This field is optional
- export_options string[]? - Additional formats to which the file can be exported. This field is optional. These values can be specified as the export_format in /files/export.
dropbox: FileLinkMetadata![](/images/permalink.svg)
File link metadata.
Fields
- Fields Included from *FolderLinkMetadata
- name string
- url string
- expires string
- path_lower string
- content_owner_team_info Team
- link_permissions LinkPermissions
- team_member_info TeamMemberInfo
- id string
- anydata...
- client_modified string? - 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 string? - The last time the file was modified on Dropbox.
- rev string? - 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 int? - The file size in bytes.
dropbox: FileLockMetadata![](/images/permalink.svg)
If present, the metadata associated with the file's current lock. This field is optional.
Fields
- is_lockholder boolean? - True if caller holds the file lock. This field is optional.
- lockholder_name string? - The display name of the lock holder. This field is optional.
- lockholder_account_id string? - The account ID of the lock holder if known. This field is optional.
- created string? - The timestamp of the lock was created. This field is optional.
dropbox: FileMetadata![](/images/permalink.svg)
Metadata for a file.
Fields
- name string? - The last component of the path (including extension). This never contains a slash.
- property_groups PropertyGroup[]? - Additional information if the file has custom properties with the property template specified.
- rev string? - 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.
- client_modified string? - 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.
- symlink_info SymlinkInfo? - Set if this file is a symlink. This field is optional.
- 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.
- 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.
- 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.
- server_modified string? - The last time the file was modified on Dropbox.
- sharing_info FileSharingInfo? - Sharing info for a file which is contained by a shared folder.
- media_info MediaInfo? - Additional information if the file is a photo or video. This field is optional. This field will not be set on entries returned by list_folder, list_folder/continue, or get_thumbnail_batch, starting December 2, 2019.
- content_hash string? - A hash of the file content. This field can be used to verify data integrity.
For more information see our :link:
Content hash /developers/reference/content-hash
page.
- id string? - A unique identifier for the file.
- size int? - The file size in bytes.
- is_downloadable boolean? - If true, file can be downloaded directly; else the file must be exported.
The default for this field is
true
- export_info ExportMetadata? - Export information for a file.
- file_lock_info FileLockMetadata? - If present, the metadata associated with the file's current lock. This field is optional.
dropbox: FileSharingInfo![](/images/permalink.svg)
Sharing info for a file which is contained by a shared folder.
Fields
- read_only boolean? - True if the file or folder is inside a read-only shared folder.
- parent_shared_folder_id string? - ID of shared folder that holds this file.
- modified_by string? - The last user who modified the file. This field will be null if the user's account has been deleted.
dropbox: FolderLinkMetadata![](/images/permalink.svg)
Folder link metadata.
Fields
- name string? - The linked file name (including extension). This never contains a slash.
- url string? - URL of the shared link.
- expires string? - Expiration time, if set. By default the link won't expire. This field is optional.
- path_lower string? - The lowercased full path in the user's Dropbox. This always starts with a slash. This field is optional. This field will only be present only if the linked file is in the authenticated user's dropbox.
- content_owner_team_info Team? - Information about a team.
- link_permissions LinkPermissions? - The link's access permissions.
- team_member_info TeamMemberInfo? - Information about a team member.
- id string? - A unique identifier for the linked file.
dropbox: FolderMetadata![](/images/permalink.svg)
Metadata for a folder.
Fields
- name string? - The last component of the path (including extension). This never contains a slash.
- 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.
- 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.
- sharing_info FolderSharingInfo? - Sharing info for a folder which is contained in a shared folder or is a shared folder mount point.
- property_groups PropertyGroup[]? - Additional information if the file has custom properties with the property template specified. Note: Only properties associated with user-owned templates, not team-owned templates, can be attached to folders.
- id string? - A unique identifier for the folder.
dropbox: FolderSharingInfo![](/images/permalink.svg)
Sharing info for a folder which is contained in a shared folder or is a shared folder mount point.
Fields
- read_only boolean? - True if the file or folder is inside a read-only shared folder.
- parent_shared_folder_id string? - Set if the folder is contained by a shared folder.
- traverse_only boolean? - Specifies that the folder can only be traversed. 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 string? - If this folder is a shared folder mount point, the ID of the shared folder mounted at this location.
- no_access boolean? - Specifies that the folder cannot be accessed by the user.
dropbox: GetMetadataArg![](/images/permalink.svg)
Metadata arguments.
Fields
- include_property_groups TemplateFilterBase? - If set to a valid list of template IDs, FileMetadata.property_groups is set if there exists property data associated with the file and each of the listed templates. This field is optional.
- include_has_explicit_shared_members boolean? - If true, the results will include a flag for each file indicating whether or not that file has any explicit members. The default for this field is False.
- include_deleted boolean? - If true, DeletedMetadata will be returned for deleted file or folder, otherwise LookupError.not_found will be returned. The default for this field is False.
- include_media_info boolean? - If true, FileMetadata.media_info is set for photo and video. The default for this field is False.
- path string? - The path of a file or folder on Dropbox.
dropbox: GetTemporaryLinkArg![](/images/permalink.svg)
Themporary link arguments.
Fields
- path string? - The path to the file you want a temporary link to.
dropbox: GetTemporaryLinkResult![](/images/permalink.svg)
Temporary link result.
Fields
- link string? - The temporary link which can be used to stream content the file.
- metadata FileMetadata? - Metadata for a file.
dropbox: GpsCoordinates![](/images/permalink.svg)
GPS coordinates for a photo or video.
Fields
- latitude int? - Latitude of the GPS coordinates.
- longitude int? - Longitude of the GPS coordinates.
dropbox: HighlightSpan![](/images/permalink.svg)
he list of HighlightSpan determines which parts of the file title should be highlighted.
Fields
- highlight_str string? - String to be determined whether it should be highlighted or not.
- is_highlighted boolean? - The string should be highlighted or not
dropbox: LinkAccessLevel![](/images/permalink.svg)
The access level that the link will grant to its users. This field is optional.
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.
Fields
- '\.tag string? - Type of LinkAudience
dropbox: LinkAudience![](/images/permalink.svg)
The type of audience who can benefit from the access level specified by the link_access_level
field. This field is optional.
Fields
- '\.tag string? - Type of LinkAudience
dropbox: LinkAudienceDisallowedReason![](/images/permalink.svg)
If allowed is false, this will provide the reason that the user is not permitted to set the visibility to this policy. This field is optional.
Fields
- '\.tag string? - Type of LinkAudience
dropbox: LinkAudienceOption![](/images/permalink.svg)
Link audience options the user might be able to set as the new audience.
Fields
- audience LinkAudience? - The type of audience who can benefit from the access level specified by the
link_access_level
field. This field is optional.
- allowed boolean? - Whether the user calling this API can select this audience option
- disallowed_reason LinkAudienceDisallowedReason? - If allowed is false, this will provide the reason that the user is not permitted to set the visibility to this policy. This field is optional.
dropbox: LinkPermissions![](/images/permalink.svg)
The link's access permissions.
Fields
- requested_visibility RequestedVisibility? - The shared link's requested visibility. This field is optional. This can be overridden by the team and shared folder policies. The final visibility, after considering these policies, can be found in resolved_visibility. This is shown only if the caller is the link's owner and resolved_visibility is returned instead of effective_audience.
- 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 optional. 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.
- 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 can_revoke is false. This field is optional.
- visibility_policies 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.
- effective_audience LinkAudience? - The type of audience who can benefit from the access level specified by the
link_access_level
field. This field is optional.
- link_access_level LinkAccessLevel? - The access level that the link will grant to its users. This field is optional.
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 toeditor
, then they will gain editor privileges. Thelink_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.
- audience_options LinkAudienceOption[]? - A list of link audience options the user might be able to set as the new audience. This field is optional.
- can_set_password boolean? - Whether the user can set a password for the link. This field is optional.
- can_remove_password boolean? - Whether the user can remove the password of the link. This field is optional.
- require_password boolean? - Whether the user is required to provide a password to view the link. This field is optional.
- can_use_extended_sharing_controls boolean? - Whether the user can use extended sharing controls, based on their account type. This field is optional.
dropbox: ListRevisionsArg![](/images/permalink.svg)
Revision arguments.
Fields
- path string? - The path to the file you want to see the revisions of.
- 'limit int? - The maximum number of revision entries returned. The default for this field is 10.
- mode ListRevisionsMode? - Determines the behavior of the API in listing the revisions for a given file path or id. The default for this union is path.
dropbox: ListRevisionsMode![](/images/permalink.svg)
Determines the behavior of the API in listing the revisions for a given file path or id. The default for this union is path.
Fields
- '\.tag string? - Type of ListRevisionsMode
dropbox: ListRevisionsResult![](/images/permalink.svg)
List revision result.
Fields
- is_deleted boolean? - If the file identified by the latest revision in the response is either deleted or moved.
- server_deleted string? - The time of deletion if the file was deleted. This field is optional.
- entries FileMetadata[]? - The revisions for the file. Only revisions that are not deleted will show up here.
dropbox: MediaInfo![](/images/permalink.svg)
Additional information if the file is a photo or video. This field is optional.
This field will not be set on entries returned by list_folder, list_folder/continue, or get_thumbnail_batch, starting December 2, 2019.
Fields
- '\.tag string? - Type of MediaInfo
- metadata PhotoVedioMetadata? - Vedio metadata.
dropbox: MetadataV2![](/images/permalink.svg)
The metadata for the matched file or folder.
Fields
- metadata FileMetadata? - Metadata for a file.
dropbox: PhotoMetadata![](/images/permalink.svg)
Photo metadata.
Fields
- dimensions Dimensions? - Dimensions for a photo or video.
- location GpsCoordinates? - GPS coordinates for a photo or video.
- time_taken string? - The timestamp when the photo/video is taken.
dropbox: PhotoVedioMetadata![](/images/permalink.svg)
Vedio metadata.
Fields
- dimensions Dimensions? - Dimensions for a photo or video.
- location GpsCoordinates? - GPS coordinates for a photo or video.
- time_taken string? - The timestamp when the photo/video is taken.
- duration int? - The duration of the video in milliseconds. This field is optional.
dropbox: PropertyField![](/images/permalink.svg)
Raw key/value data to be associated with a Dropbox file.
Property fields are added to Dropbox files as a PropertyGroup. This datatype comes from an imported namespace originally defined in the file_properties namespace.
Fields
- name string? - Key of the property field associated with a file and template. Keys can be up to 256 bytes.
- value string? - Value of the property field associated with a file and template. Values can be up to 1024 bytes.
dropbox: PropertyGroup![](/images/permalink.svg)
A subset of the property fields described by the corresponding PropertyGroupTemplate
.
Properties are always added to a Dropbox file as a PropertyGroup.
The possible key names and value types in this group are defined by the corresponding PropertyGroupTemplate
.
This datatype comes from an imported namespace originally defined in the file_properties namespace.
Fields
- fields PropertyField[]? - The actual properties associated with the template. There can be up to 32 property types per template.
- template_id string? - A unique identifier for the associated template.
dropbox: ProxyConfig![](/images/permalink.svg)
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
dropbox: RelocationArg![](/images/permalink.svg)
Relocation arguments.
Fields
- from_path string? - Path in the user's Dropbox to be copied or moved.
- to_path string? - Path in the user's Dropbox that is the destination.
- allow_ownership_transfer boolean? - Allow moves by owner even if it would result in an ownership transfer for the content being moved. This does not apply to copies.
- autorename boolean? - If there's a conflict, have the Dropbox server try to autorename the file to avoid the conflict.
dropbox: RelocationResult![](/images/permalink.svg)
Metadata of the relocated object.
Fields
- metadata FileMetadata? - Metadata for a file.
dropbox: RequestedVisibility![](/images/permalink.svg)
The shared link's requested visibility. This field is optional.
This can be overridden by the team and shared folder policies. The final visibility, after considering these policies, can be found in resolved_visibility. This is shown only if the caller is the link's owner and resolved_visibility is returned instead of effective_audience.
Fields
- '\.tag string? - Type of RequestedVisibility
dropbox: ResolvedVisibility![](/images/permalink.svg)
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 optional.
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.
Fields
- '\.tag string? - Type of ResolvedVisibility
dropbox: RestoreArg![](/images/permalink.svg)
Restore arguments.
Fields
- path string? - The path to the file you want to restore.
- rev string? - The revision to restore for the file.
dropbox: SearchArg![](/images/permalink.svg)
Search arguments.
Fields
- options SearchOptions? - Options for more targeted search results.
- match_field_options SearchMatchFieldOptions? - Options for search results match fields.
- query string - The string to search for. May match across multiple fields based on the request arguments.
dropbox: SearchMatch![](/images/permalink.svg)
The matches for the search query.
Fields
- match_type SearchMatchType? - Indicates what type of match was found for a given item.
- metadata MetadataV2? - The metadata for the matched file or folder.
- highlight_spans HighlightSpan[]? - The list of HighlightSpan determines which parts of the file title should be highlighted. This field is optional.
dropbox: SearchMatchFieldOptions![](/images/permalink.svg)
Options for search results match fields.
Fields
- include_highlights boolean? - Whether to include highlight span from file title. The default for this field is False.
dropbox: SearchMatchType![](/images/permalink.svg)
Indicates what type of match was found for a given item.
Fields
- '\.tag string? - Type of search match.
dropbox: SearchOptions![](/images/permalink.svg)
Options for more targeted search results.
Fields
- path string? - Scopes the search to a path in the user's Dropbox. Searches the entire Dropbox if not specified. This field is optional.
- max_results int? - The string to search for. May match across multiple fields based on the request arguments.
- order_by SearchOrderBy? - Specified property of the order of search results. By default, results are sorted by relevance.
- file_status FileStatus? - Restricts search to the given file status. The default for this union is active.
- filename_only boolean? - Restricts search to only match on filenames. The default for this field is False.
- file_extensions string[]? - Restricts search to only the extensions specified. Only supported for active file search. This field is optional.
- file_categories FileCategory[]? - Restricts search to only the file categories specified. Only supported for active file search. This field is optional.
dropbox: SearchResult![](/images/permalink.svg)
Search result.
Fields
- matches SearchMatch[]? - A list (possibly empty) of matches for the query.
- cursor int? - Pass the cursor into
search/continue:2
to fetch the next page of results. This field is optional.
- has_more boolean? - Used for paging. If true, indicates there is another page of results available that can be fetched by calling
search/continue:2
with the cursor.
dropbox: SharedLinkAccessFailureReason![](/images/permalink.svg)
The failure reason for revoking the link. This field will only be present if the can_revoke is false. This field is optional.
Fields
- '\.tag string? - Type of SharedLinkAccessFailureReason
dropbox: SharedLinkSettings![](/images/permalink.svg)
The requested settings for the newly created shared link. This field is optional.
Fields
- require_password boolean? - Boolean flag to enable or disable password protection. This field is optional.
- link_password string? - If require_password is true, this is needed to specify the password to access the link. This field is optional.
- expires string? - Expiration time of the shared link. By default the link won't expire.
- audience string? - The new audience who can benefit from the access level specified by the link's access level specified in the
link_access_level
field ofLinkPermissions
. This field is optional. This is used in conjunction with team policies and shared folder policies to determine the final effective audience type in theeffective_audience
field ofLinkPermissions
.
- access string? - Requested access level you want the audience to gain from this link. Note modifying access level for an existing link is not supported. This field is optional.
- allow_download boolean? - Boolean flag to allow or not download capabilities for shared links. This field is optional.
dropbox: SymlinkInfo![](/images/permalink.svg)
Set if this file is a symlink. This field is optional.
Fields
- target string? - The target this symlink points to.
dropbox: Team![](/images/permalink.svg)
Information about a team.
Fields
- id string? - The team's unique ID.
- name string? - The name of the team.
dropbox: TeamMemberInfo![](/images/permalink.svg)
Information about a team member.
Fields
- 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.
- display_name string? - The display name of the user.
- team_info Team? - Information about a team.
dropbox: TemplateFilterBase![](/images/permalink.svg)
If set to a valid list of template IDs, FileMetadata.property_groups is set if there exists property data associated with the file and each of the listed templates. This field is optional.
Fields
- filter_some string[]? - Only templates with an ID in the supplied list will be returned (a subset of templates will be returned).
dropbox: VisibilityPolicy![](/images/permalink.svg)
Fields
- policy RequestedVisibility? - The shared link's requested visibility. This field is optional. This can be overridden by the team and shared folder policies. The final visibility, after considering these policies, can be found in resolved_visibility. This is shown only if the caller is the link's owner and resolved_visibility is returned instead of effective_audience.
- resolved_policy AlphaResolvedVisibility? -
- allowed boolean? - Whether the user is permitted to set the visibility to this policy.
- disallowed_reason VisibilityPolicyDisallowedReason? -
dropbox: VisibilityPolicyDisallowedReason![](/images/permalink.svg)
Fields
- '\.tag string? - If allowed is false, this will provide the reason that the user is not permitted to set the visibility to this policy. This field is optional.
dropbox: WriteMode![](/images/permalink.svg)
Selects what to do if the file already exists. The default for this union is add.
Fields
- '\.tag string? - Type of WriteMode
- update string? - Overwrite if the given "rev" matches the existing file's "rev". 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".
Union types![](/images/permalink.svg)
dropbox: SharedLinkMetadata![](/images/permalink.svg)
SharedLinkMetadata
The metadata of a shared link.
String types![](/images/permalink.svg)
dropbox: FileCategory![](/images/permalink.svg)
FileCategory
Restricts search to only the file categories specified. Only supported for active file search.
dropbox: FileStatus![](/images/permalink.svg)
FileStatus
Restricts search to the given file status. The default for this union is active.
dropbox: SearchOrderBy![](/images/permalink.svg)
SearchOrderBy
Specified property of the order of search results. By default, results are sorted by relevance.
Import
import ballerinax/dropbox;
Metadata
Released date: almost 2 years ago
Version: 1.4.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.2.1
GraalVM compatible: Yes
Pull count
Total: 1
Current verison: 1
Weekly downloads
Keywords
Content & Files/File Management & Storage
Cost/Free
Contributors
Dependencies