Back to DropboxSharing - Get File Metadata
Returns shared file metadata.
Input
type: object
properties:
data:
type: object
description: >
Arguments of :route:`get_file_metadata`.
file: The file to query.
actions: A list of `FileAction`s corresponding to `FilePermission`s that
should appear in the response's :field:`SharedFileMetadata.permissions`
field describing the actions the authenticated user can perform on the
file.
properties:
actions:
type: array
description: >-
A list of `FileAction`s corresponding to `FilePermission`s that should
appear in the response's :field:`SharedFileMetadata.permissions`
field describing the actions the authenticated user can perform on
the file.
items:
type: object
description: >
Sharing actions that may be taken on files.
disable_viewer_info: Disable viewer information on the file.
edit_contents: Change or edit contents of the file.
enable_viewer_info: Enable viewer information on the file.
invite_viewer: Add a member with view permissions.
invite_viewer_no_comment: Add a member with view permissions but no
comment permissions.
unshare: Stop sharing this file.
relinquish_membership: Relinquish one's own membership to the file.
share_link: Use create_link instead.
create_link: Create a shared link to the file.
other: None
properties:
.tag:
title: Choice of FileAction
type: string
enum:
- disable_viewer_info
- edit_contents
- enable_viewer_info
- invite_viewer
- invite_viewer_no_comment
- unshare
- relinquish_membership
- share_link
- create_link
- other
file:
type: string
description: The file to query.
title: Data
Output
type: object
description: >
Properties of the shared file.
id: The ID of the file.
name: The name of this file.
policy: Policies governing this shared file.
preview_url: URL for displaying a web preview of the shared file.
access_type: The current user's access level for this shared file.
expected_link_metadata: The expected metadata of the link associated for the
file when it is first shared. Absent if the link already exists. This is for
an unreleased feature so it may not be returned yet.
link_metadata: The metadata of the link associated for the file. This is for
an unreleased feature so it may not be returned yet.
owner_display_names: The display names of the users that own the file. If the
file is part of a team folder, the display names of the team admins are also
included. Absent if the owner display names cannot be fetched.
owner_team: The team that owns the file. This field is not present if the file
is not owned by a team.
parent_shared_folder_id: The ID of the parent shared folder. This field is
present only if the file is contained within a shared folder.
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. Absent for unmounted
files.
path_lower: The lower-case full path of this file. Absent for unmounted files.
permissions: The sharing permissions that requesting user has on this file.
This corresponds to the entries given in
:field:`GetFileMetadataBatchArg.actions` or
:field:`GetFileMetadataArg.actions`.
time_invited: Timestamp indicating when the current user was invited to this
shared file. If the user was not invited to the shared file, the timestamp
will indicate when the user was invited to the parent shared folder. This
value may be absent.
properties:
owner_team:
type: object
description: |
Information about a team.
id: The team's unique ID.
name: The name of the team.
properties:
id:
type: string
description: The team's unique ID.
name:
type: string
description: The name of the team.
parent_shared_folder_id:
type: string
description: >-
The ID of the parent shared folder. This field is present only if the file
is contained within a shared folder.
name:
type: string
description: The name of this file.
time_invited:
type: string
description: >-
Timestamp indicating when the current user was invited to this shared
file. If the user was not invited to the shared file, the timestamp will
indicate when the user was invited to the parent shared folder. This value
may be absent.
preview_url:
type: string
description: URL for displaying a web preview of the shared file.
access_type:
type: object
description: >
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.
other: None
properties:
.tag:
title: Choice of AccessLevel
type: string
enum:
- owner
- editor
- viewer
- viewer_no_comment
- other
owner_display_names:
type: array
description: >-
The display names of the users that own the file. If the file is part of a
team folder, the display names of the team admins are also included.
Absent if the owner display names cannot be fetched.
items:
type: string
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. Absent for unmounted
files.
expected_link_metadata:
type: object
description: >
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.
audience_options: 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.
current_audience: The current audience of the link.
link_permissions: A list of permissions for actions you can perform on the
link.
password_protected: Whether the link is protected by a password.
access_level: The access level on the link for this file.
audience_restricting_shared_folder: The shared folder that prevents the
link audience for this link from being more restrictive.
expiry: 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.
properties:
current_audience:
type: object
description: |
public: Link is accessible by anyone.
team: Link is accessible only by team members.
members: Link is accessible only by members of the content.
other: None
properties:
.tag:
title: Choice of LinkAudience
type: string
enum:
- public
- team
- members
- other
password_protected:
type: boolean
description: Whether the link is protected by a password.
expiry:
type: string
description: >-
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.
access_level:
type: object
description: >
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.
other: None
properties:
.tag:
title: Choice of AccessLevel
type: string
enum:
- owner
- editor
- viewer
- viewer_no_comment
- other
audience_restricting_shared_folder:
type: object
description: >
Information about the shared folder that prevents the link audience
for this link from being more restrictive.
shared_folder_id: The ID of the shared folder.
name: The name of the shared folder.
audience: The link audience of the shared folder.
properties:
shared_folder_id:
type: string
description: The ID of the shared folder.
audience:
type: object
description: |
public: Link is accessible by anyone.
team: Link is accessible only by team members.
members: Link is accessible only by members of the content.
other: None
properties:
.tag:
title: Choice of LinkAudience
type: string
enum:
- public
- team
- members
- other
name:
type: string
description: The name of the shared folder.
link_permissions:
type: array
description: A list of permissions for actions you can perform on the link.
items:
type: object
description: |
Permissions for actions that can be performed on a link.
action: None
allow: None
reason: None
properties:
action:
type: object
description: |
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.
other: None
properties:
.tag:
title: Choice of LinkAction
type: string
enum:
- change_access_level
- change_audience
- remove_expiry
- remove_password
- set_expiry
- set_password
- other
reason:
type: object
description: >
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: None
other: None
properties:
insufficient_plan:
type: object
description: >
message: A message to tell the user to upgrade in order to
support expected action.
upsell_url: 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.
properties:
message:
type: string
description: >-
A message to tell the user to upgrade in order to
support expected action.
upsell_url:
type: string
description: >-
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.
.tag:
title: Choice of PermissionDeniedReason
type: string
enum:
- user_not_same_team_as_owner
- user_not_allowed_by_owner
- target_is_indirect_member
- target_is_owner
- target_is_self
- target_not_active
- folder_is_limited_team_folder
- owner_not_on_team
- permission_denied
- restricted_by_team
- user_account_type
- user_not_on_team
- folder_is_inside_shared_folder
- restricted_by_parent_folder
- insufficient_plan
- other
allow:
type: boolean
audience_options:
type: array
description: >-
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.
items:
type: object
description: |
public: Link is accessible by anyone.
team: Link is accessible only by team members.
members: Link is accessible only by members of the content.
other: None
properties:
.tag:
title: Choice of LinkAudience
type: string
enum:
- public
- team
- members
- other
path_lower:
type: string
description: The lower-case full path of this file. Absent for unmounted files.
policy:
type: object
description: >
A set of policies governing membership and privileges for a shared folder.
acl_update_policy: Who can add and remove members from this shared folder.
shared_link_policy: Who links can be shared with.
member_policy: Who can be a member of this shared folder, as set on the
folder itself. The effective policy may differ from this value if the
team-wide policy is more restrictive. Present only if the folder is owned
by a team.
resolved_member_policy: Who can be a member of this shared folder, taking
into account both the folder and the team-wide policy. This value may
differ from that of member_policy if the team-wide policy is more
restrictive than the folder policy. Present only if the folder is owned by
a team.
viewer_info_policy: Who can enable/disable viewer info for this shared
folder.
properties:
viewer_info_policy:
type: object
description: |
enabled: Viewer information is available on this file.
disabled: Viewer information is disabled on this file.
other: None
properties:
.tag:
title: Choice of ViewerInfoPolicy
type: string
enum:
- enabled
- disabled
- other
resolved_member_policy:
type: object
description: >
Policy governing who can be a member of a shared folder. Only
applicable to folders owned by a user on a team.
team: Only a teammate can become a member.
anyone: Anyone can become a member.
other: None
properties:
.tag:
title: Choice of MemberPolicy
type: string
enum:
- team
- anyone
- other
acl_update_policy:
type: object
description: >
Who can change a shared folder's access control list (ACL). In other
words, who can add, remove, or change the privileges of members.
owner: Only the owner can update the ACL.
editors: Any editor can update the ACL. This may be further restricted
to editors on the same team.
other: None
properties:
.tag:
title: Choice of AclUpdatePolicy
type: string
enum:
- owner
- editors
- other
shared_link_policy:
type: object
description: |
Who can view shared links in this folder.
anyone: Links can be shared with anyone.
team: Links can be shared with anyone on the same team as the owner.
members: Links can only be shared among members of the shared folder.
other: None
properties:
.tag:
title: Choice of SharedLinkPolicy
type: string
enum:
- anyone
- team
- members
- other
member_policy:
type: object
description: >
Policy governing who can be a member of a shared folder. Only
applicable to folders owned by a user on a team.
team: Only a teammate can become a member.
anyone: Anyone can become a member.
other: None
properties:
.tag:
title: Choice of MemberPolicy
type: string
enum:
- team
- anyone
- other
permissions:
type: array
description: >-
The sharing permissions that requesting user has on this file. This
corresponds to the entries given in
:field:`GetFileMetadataBatchArg.actions` or
:field:`GetFileMetadataArg.actions`.
items:
type: object
description: >
Whether the user is allowed to take the sharing action on the file.
action: The action that the user may wish to take on the file.
allow: True if the user is allowed to take the action.
reason: The reason why the user is denied the permission. Not present if
the action is allowed.
properties:
action:
type: object
description: >
Sharing actions that may be taken on files.
disable_viewer_info: Disable viewer information on the file.
edit_contents: Change or edit contents of the file.
enable_viewer_info: Enable viewer information on the file.
invite_viewer: Add a member with view permissions.
invite_viewer_no_comment: Add a member with view permissions but no
comment permissions.
unshare: Stop sharing this file.
relinquish_membership: Relinquish one's own membership to the file.
share_link: Use create_link instead.
create_link: Create a shared link to the file.
other: None
properties:
.tag:
title: Choice of FileAction
type: string
enum:
- disable_viewer_info
- edit_contents
- enable_viewer_info
- invite_viewer
- invite_viewer_no_comment
- unshare
- relinquish_membership
- share_link
- create_link
- other
reason:
type: object
description: >
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: None
other: None
properties:
insufficient_plan:
type: object
description: >
message: A message to tell the user to upgrade in order to
support expected action.
upsell_url: 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.
properties:
message:
type: string
description: >-
A message to tell the user to upgrade in order to support
expected action.
upsell_url:
type: string
description: >-
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.
.tag:
title: Choice of PermissionDeniedReason
type: string
enum:
- user_not_same_team_as_owner
- user_not_allowed_by_owner
- target_is_indirect_member
- target_is_owner
- target_is_self
- target_not_active
- folder_is_limited_team_folder
- owner_not_on_team
- permission_denied
- restricted_by_team
- user_account_type
- user_not_on_team
- folder_is_inside_shared_folder
- restricted_by_parent_folder
- insufficient_plan
- other
allow:
type: boolean
description: True if the user is allowed to take the action.
id:
type: string
description: The ID of the file.
link_metadata:
type: object
description: >
Metadata of a shared link for a file or folder.
audience_options: 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.
current_audience: The current audience of the link.
link_permissions: A list of permissions for actions you can perform on the
link.
password_protected: Whether the link is protected by a password.
url: The URL of the link.
access_level: The access level on the link for this file.
audience_restricting_shared_folder: The shared folder that prevents the
link audience for this link from being more restrictive.
expiry: 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.
audience_exceptions: 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.
properties:
current_audience:
type: object
description: |
public: Link is accessible by anyone.
team: Link is accessible only by team members.
members: Link is accessible only by members of the content.
other: None
properties:
.tag:
title: Choice of LinkAudience
type: string
enum:
- public
- team
- members
- other
url:
type: string
description: The URL of the link.
password_protected:
type: boolean
description: Whether the link is protected by a password.
audience_exceptions:
type: object
description: >
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: None
exceptions: 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.
properties:
count:
type: number
exceptions:
type: array
description: >-
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.
items:
type: object
description: >
Information about the content that has a link audience different
than that of this folder.
name: The name of the content, which is either a file or a
folder.
properties:
name:
type: string
description: The name of the content, which is either a file or a folder.
expiry:
type: string
description: >-
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.
access_level:
type: object
description: >
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.
other: None
properties:
.tag:
title: Choice of AccessLevel
type: string
enum:
- owner
- editor
- viewer
- viewer_no_comment
- other
audience_restricting_shared_folder:
type: object
description: >
Information about the shared folder that prevents the link audience
for this link from being more restrictive.
shared_folder_id: The ID of the shared folder.
name: The name of the shared folder.
audience: The link audience of the shared folder.
properties:
shared_folder_id:
type: string
description: The ID of the shared folder.
audience:
type: object
description: |
public: Link is accessible by anyone.
team: Link is accessible only by team members.
members: Link is accessible only by members of the content.
other: None
properties:
.tag:
title: Choice of LinkAudience
type: string
enum:
- public
- team
- members
- other
name:
type: string
description: The name of the shared folder.
link_permissions:
type: array
description: A list of permissions for actions you can perform on the link.
items:
type: object
description: |
Permissions for actions that can be performed on a link.
action: None
allow: None
reason: None
properties:
action:
type: object
description: |
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.
other: None
properties:
.tag:
title: Choice of LinkAction
type: string
enum:
- change_access_level
- change_audience
- remove_expiry
- remove_password
- set_expiry
- set_password
- other
reason:
type: object
description: >
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: None
other: None
properties:
insufficient_plan:
type: object
description: >
message: A message to tell the user to upgrade in order to
support expected action.
upsell_url: 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.
properties:
message:
type: string
description: >-
A message to tell the user to upgrade in order to
support expected action.
upsell_url:
type: string
description: >-
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.
.tag:
title: Choice of PermissionDeniedReason
type: string
enum:
- user_not_same_team_as_owner
- user_not_allowed_by_owner
- target_is_indirect_member
- target_is_owner
- target_is_self
- target_not_active
- folder_is_limited_team_folder
- owner_not_on_team
- permission_denied
- restricted_by_team
- user_account_type
- user_not_on_team
- folder_is_inside_shared_folder
- restricted_by_parent_folder
- insufficient_plan
- other
allow:
type: boolean
audience_options:
type: array
description: >-
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.
items:
type: object
description: |
public: Link is accessible by anyone.
team: Link is accessible only by team members.
members: Link is accessible only by members of the content.
other: None
properties:
.tag:
title: Choice of LinkAudience
type: string
enum:
- public
- team
- members
- other