FilePropertiesRoutes
public class FilePropertiesRoutes : DropboxTransportClientOwning
Routes for the file_properties namespace For Objective-C compatible routes see DBFilePropertiesRoutes
-
Add property groups to a Dropbox file. See templatesAddForUser or templatesAddForTeam to create new templates.
scope: files.metadata.write
Declaration
Swift
@discardableResult public func propertiesAdd( path: String, propertyGroups: [FileProperties.PropertyGroup] ) -> RpcRequest<VoidSerializer, FileProperties.AddPropertiesErrorSerializer>Parameters
pathA unique identifier for the file or folder.
propertyGroupsThe property groups which are to be added to a Dropbox file. No two groups in the input should refer to the same template.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aFileProperties.AddPropertiesErrorobject on failure. -
Overwrite property groups associated with a file. This endpoint should be used instead of propertiesUpdate when property groups are being updated via a “snapshot” instead of via a “delta”. In other words, this endpoint will delete all omitted fields from a property group, whereas propertiesUpdate will only delete fields that are explicitly marked for deletion.
scope: files.metadata.write
Declaration
Swift
@discardableResult public func propertiesOverwrite( path: String, propertyGroups: [FileProperties.PropertyGroup] ) -> RpcRequest<VoidSerializer, FileProperties.InvalidPropertyGroupErrorSerializer>Parameters
pathA unique identifier for the file or folder.
propertyGroupsThe property groups “snapshot” updates to force apply. No two groups in the input should refer to the same template.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aFileProperties.InvalidPropertyGroupErrorobject on failure. -
Permanently removes the specified property group from the file. To remove specific property field key value pairs, see propertiesUpdate. To update a template, see templatesUpdateForUser or templatesUpdateForTeam. To remove a template, see templatesRemoveForUser or templatesRemoveForTeam.
scope: files.metadata.write
Declaration
Swift
@discardableResult public func propertiesRemove( path: String, propertyTemplateIds: [String] ) -> RpcRequest<VoidSerializer, FileProperties.RemovePropertiesErrorSerializer>Parameters
pathA unique identifier for the file or folder.
propertyTemplateIdsA list of identifiers for a template created by templatesAddForUser or templatesAddForTeam.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aFileProperties.RemovePropertiesErrorobject on failure. -
Search across property templates for particular property field values.
scope: files.metadata.read
Declaration
Swift
@discardableResult public func propertiesSearch( queries: [FileProperties.PropertiesSearchQuery], templateFilter: FileProperties .TemplateFilter = .filterNone ) -> RpcRequest<FileProperties.PropertiesSearchResultSerializer, FileProperties.PropertiesSearchErrorSerializer>Parameters
queriesQueries to search.
templateFilterFilter results to contain only properties associated with these template IDs.
Return Value
Through the response callback, the caller will receive a
FileProperties.PropertiesSearchResultobject on success or aFileProperties.PropertiesSearchErrorobject on failure. -
Once a cursor has been retrieved from propertiesSearch, use this to paginate through all search results.
scope: files.metadata.read
Declaration
Swift
@discardableResult public func propertiesSearchContinue(cursor: String) -> RpcRequest<FileProperties.PropertiesSearchResultSerializer, FileProperties.PropertiesSearchContinueErrorSerializer>Parameters
cursorThe cursor returned by your last call to propertiesSearch or propertiesSearchContinue.
Return Value
Through the response callback, the caller will receive a
FileProperties.PropertiesSearchResultobject on success or aFileProperties.PropertiesSearchContinueErrorobject on failure. -
Add, update or remove properties associated with the supplied file and templates. This endpoint should be used instead of propertiesOverwrite when property groups are being updated via a “delta” instead of via a “snapshot” . In other words, this endpoint will not delete any omitted fields from a property group, whereas propertiesOverwrite will delete any fields that are omitted from a property group.
scope: files.metadata.write
Declaration
Swift
@discardableResult public func propertiesUpdate( path: String, updatePropertyGroups: [FileProperties.PropertyGroupUpdate] ) -> RpcRequest<VoidSerializer, FileProperties.UpdatePropertiesErrorSerializer>Parameters
pathA unique identifier for the file or folder.
updatePropertyGroupsThe property groups “delta” updates to apply.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aFileProperties.UpdatePropertiesErrorobject on failure. -
Add a template associated with a team. See propertiesAdd to add properties to a file or folder. Note: this endpoint will create team-owned templates.
scope: files.team_metadata.write
Declaration
Swift
@discardableResult public func templatesAddForTeam( name: String, description_: String, fields: [FileProperties.PropertyFieldTemplate] ) -> RpcRequest<FileProperties.AddTemplateResultSerializer, FileProperties.ModifyTemplateErrorSerializer>Return Value
Through the response callback, the caller will receive a
FileProperties.AddTemplateResultobject on success or aFileProperties.ModifyTemplateErrorobject on failure. -
Add a template associated with a user. See propertiesAdd to add properties to a file. This endpoint can’t be called on a team member or admin’s behalf.
scope: files.metadata.write
Declaration
Swift
@discardableResult public func templatesAddForUser( name: String, description_: String, fields: [FileProperties.PropertyFieldTemplate] ) -> RpcRequest<FileProperties.AddTemplateResultSerializer, FileProperties.ModifyTemplateErrorSerializer>Return Value
Through the response callback, the caller will receive a
FileProperties.AddTemplateResultobject on success or aFileProperties.ModifyTemplateErrorobject on failure. -
Get the schema for a specified template.
scope: files.team_metadata.write
Declaration
Swift
@discardableResult public func templatesGetForTeam(templateId: String) -> RpcRequest<FileProperties.GetTemplateResultSerializer, FileProperties.TemplateErrorSerializer>Parameters
templateIdAn identifier for template added by route See templatesAddForUser or templatesAddForTeam.
Return Value
Through the response callback, the caller will receive a
FileProperties.GetTemplateResultobject on success or aFileProperties.TemplateErrorobject on failure. -
Get the schema for a specified template. This endpoint can’t be called on a team member or admin’s behalf.
scope: files.metadata.read
Declaration
Swift
@discardableResult public func templatesGetForUser(templateId: String) -> RpcRequest<FileProperties.GetTemplateResultSerializer, FileProperties.TemplateErrorSerializer>Parameters
templateIdAn identifier for template added by route See templatesAddForUser or templatesAddForTeam.
Return Value
Through the response callback, the caller will receive a
FileProperties.GetTemplateResultobject on success or aFileProperties.TemplateErrorobject on failure. -
Get the template identifiers for a team. To get the schema of each template use templatesGetForTeam.
scope: files.team_metadata.write
Declaration
Swift
@discardableResult public func templatesListForTeam() -> RpcRequest<FileProperties.ListTemplateResultSerializer, FileProperties.TemplateErrorSerializer>Return Value
Through the response callback, the caller will receive a
FileProperties.ListTemplateResultobject on success or aFileProperties.TemplateErrorobject on failure. -
Get the template identifiers for a team. To get the schema of each template use templatesGetForUser. This endpoint can’t be called on a team member or admin’s behalf.
scope: files.metadata.read
Declaration
Swift
@discardableResult public func templatesListForUser() -> RpcRequest<FileProperties.ListTemplateResultSerializer, FileProperties.TemplateErrorSerializer>Return Value
Through the response callback, the caller will receive a
FileProperties.ListTemplateResultobject on success or aFileProperties.TemplateErrorobject on failure. -
Permanently removes the specified template created from templatesAddForUser. All properties associated with the template will also be removed. This action cannot be undone.
scope: files.team_metadata.write
Declaration
Swift
@discardableResult public func templatesRemoveForTeam(templateId: String) -> RpcRequest<VoidSerializer, FileProperties.TemplateErrorSerializer>Parameters
templateIdAn identifier for a template created by templatesAddForUser or templatesAddForTeam.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aFileProperties.TemplateErrorobject on failure. -
Permanently removes the specified template created from templatesAddForUser. All properties associated with the template will also be removed. This action cannot be undone.
scope: files.metadata.write
Declaration
Swift
@discardableResult public func templatesRemoveForUser(templateId: String) -> RpcRequest<VoidSerializer, FileProperties.TemplateErrorSerializer>Parameters
templateIdAn identifier for a template created by templatesAddForUser or templatesAddForTeam.
Return Value
Through the response callback, the caller will receive a
Voidobject on success or aFileProperties.TemplateErrorobject on failure. -
Update a template associated with a team. This route can update the template name, the template description and add optional properties to templates.
scope: files.team_metadata.write
Declaration
Swift
@discardableResult public func templatesUpdateForTeam( templateId: String, name: String? = nil, description_: String? = nil, addFields: [FileProperties.PropertyFieldTemplate]? = nil ) -> RpcRequest<FileProperties.UpdateTemplateResultSerializer, FileProperties.ModifyTemplateErrorSerializer>Parameters
templateIdAn identifier for template added by See templatesAddForUser or templatesAddForTeam.
nameA display name for the template. template names can be up to 256 bytes.
description_Description for the new template. Template descriptions can be up to 1024 bytes.
addFieldsProperty field templates to be added to the group template. There can be up to 32 properties in a single template.
Return Value
Through the response callback, the caller will receive a
FileProperties.UpdateTemplateResultobject on success or aFileProperties.ModifyTemplateErrorobject on failure. -
Update a template associated with a user. This route can update the template name, the template description and add optional properties to templates. This endpoint can’t be called on a team member or admin’s behalf.
scope: files.metadata.write
Declaration
Swift
@discardableResult public func templatesUpdateForUser( templateId: String, name: String? = nil, description_: String? = nil, addFields: [FileProperties.PropertyFieldTemplate]? = nil ) -> RpcRequest<FileProperties.UpdateTemplateResultSerializer, FileProperties.ModifyTemplateErrorSerializer>Parameters
templateIdAn identifier for template added by See templatesAddForUser or templatesAddForTeam.
nameA display name for the template. template names can be up to 256 bytes.
description_Description for the new template. Template descriptions can be up to 1024 bytes.
addFieldsProperty field templates to be added to the group template. There can be up to 32 properties in a single template.
Return Value
Through the response callback, the caller will receive a
FileProperties.UpdateTemplateResultobject on success or aFileProperties.ModifyTemplateErrorobject on failure.
View on GitHub
FilePropertiesRoutes Class Reference