DBFILEPROPERTIESUserAuthRoutes
Objective-C
@interface DBFILEPROPERTIESUserAuthRoutes : NSObject
Swift
class DBFILEPROPERTIESUserAuthRoutes : NSObject
Routes for the FileProperties
namespace
-
An instance of the networking client that each route will use to submit a request.
Declaration
Objective-C
@property (nonatomic, readonly) id<DBTransportClient> _Nonnull client;
-
Initializes the
DBFILEPROPERTIESUserAuthRoutes
namespace container object with a networking client.Declaration
Objective-C
- (nonnull instancetype)init:(nonnull id<DBTransportClient>)client;
-
Add property groups to a Dropbox file. See
templatesAddForUser
ortemplatesAddForTeam
to create new templates.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESAddPropertiesError *> *) propertiesAdd:(nonnull NSString *)path propertyGroups: (nonnull NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups;
Swift
func propertiesAdd(_ path: String, propertyGroups: [DBFILEPROPERTIESPropertyGroup]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESAddPropertiesError>
Parameters
path
A unique identifier for the file or folder.
propertyGroups
The 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
void
object on success or aDBFILEPROPERTIESAddPropertiesError
object 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, whereaspropertiesUpdate
will only delete fields that are explicitly marked for deletion.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESInvalidPropertyGroupError *> *)propertiesOverwrite:(nonnull NSString *)path propertyGroups: (nonnull NSArray<DBFILEPROPERTIESPropertyGroup *> *) propertyGroups;
Swift
func propertiesOverwrite(_ path: String, propertyGroups: [DBFILEPROPERTIESPropertyGroup]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESInvalidPropertyGroupError>
Parameters
path
A unique identifier for the file or folder.
propertyGroups
The 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
void
object on success or aDBFILEPROPERTIESInvalidPropertyGroupError
object 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, seetemplatesUpdateForUser
ortemplatesUpdateForTeam
. To remove a template, seetemplatesRemoveForUser
ortemplatesRemoveForTeam
.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESRemovePropertiesError *> *) propertiesRemove:(nonnull NSString *)path propertyTemplateIds:(nonnull NSArray<NSString *> *)propertyTemplateIds;
Swift
func propertiesRemove(_ path: String, propertyTemplateIds: [String]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESRemovePropertiesError>
Parameters
path
A unique identifier for the file or folder.
propertyTemplateIds
A list of identifiers for a template created by
templatesAddForUser
ortemplatesAddForTeam
.Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILEPROPERTIESRemovePropertiesError
object on failure. -
Search across property templates for particular property field values.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult *, DBFILEPROPERTIESPropertiesSearchError *> *) propertiesSearch: (nonnull NSArray<DBFILEPROPERTIESPropertiesSearchQuery *> *)queries;
Swift
func propertiesSearch(_ queries: [DBFILEPROPERTIESPropertiesSearchQuery]) -> DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult, DBFILEPROPERTIESPropertiesSearchError>
Parameters
queries
Queries to search.
Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESPropertiesSearchResult
object on success or aDBFILEPROPERTIESPropertiesSearchError
object on failure. -
Search across property templates for particular property field values.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult *, DBFILEPROPERTIESPropertiesSearchError *> *) propertiesSearch: (nonnull NSArray<DBFILEPROPERTIESPropertiesSearchQuery *> *)queries templateFilter:(nullable DBFILEPROPERTIESTemplateFilter *)templateFilter;
Swift
func propertiesSearch(_ queries: [DBFILEPROPERTIESPropertiesSearchQuery], templateFilter: DBFILEPROPERTIESTemplateFilter?) -> DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult, DBFILEPROPERTIESPropertiesSearchError>
Parameters
queries
Queries to search.
templateFilter
Filter results to contain only properties associated with these template IDs.
Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESPropertiesSearchResult
object on success or aDBFILEPROPERTIESPropertiesSearchError
object on failure. -
Once a cursor has been retrieved from
propertiesSearch
, use this to paginate through all search results.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult *, DBFILEPROPERTIESPropertiesSearchContinueError *> *) propertiesSearchContinue:(nonnull NSString *)cursor;
Swift
func propertiesSearchContinue(_ cursor: String) -> DBRpcTask<DBFILEPROPERTIESPropertiesSearchResult, DBFILEPROPERTIESPropertiesSearchContinueError>
Parameters
cursor
The cursor returned by your last call to
propertiesSearch
orpropertiesSearchContinue
.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESPropertiesSearchResult
object on success or aDBFILEPROPERTIESPropertiesSearchContinueError
object 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, whereaspropertiesOverwrite
will delete any fields that are omitted from a property group.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESUpdatePropertiesError *> *) propertiesUpdate:(nonnull NSString *)path updatePropertyGroups: (nonnull NSArray<DBFILEPROPERTIESPropertyGroupUpdate *> *) updatePropertyGroups;
Swift
func propertiesUpdate(_ path: String, updatePropertyGroups: [DBFILEPROPERTIESPropertyGroupUpdate]) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESUpdatePropertiesError>
Parameters
path
A unique identifier for the file or folder.
updatePropertyGroups
The property groups “delta” updates to apply.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILEPROPERTIESUpdatePropertiesError
object 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.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESAddTemplateResult *, DBFILEPROPERTIESModifyTemplateError *> *) templatesAddForUser:(nonnull NSString *)name description_:(nonnull NSString *)description_ fields: (nonnull NSArray<DBFILEPROPERTIESPropertyFieldTemplate *> *)fields;
Swift
func templatesAdd(forUser name: String, description_: String, fields: [DBFILEPROPERTIESPropertyFieldTemplate]) -> DBRpcTask<DBFILEPROPERTIESAddTemplateResult, DBFILEPROPERTIESModifyTemplateError>
Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESAddTemplateResult
object on success or aDBFILEPROPERTIESModifyTemplateError
object on failure. -
Get the schema for a specified template. This endpoint can’t be called on a team member or admin’s behalf.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESGetTemplateResult *, DBFILEPROPERTIESTemplateError *> *)templatesGetForUser: (nonnull NSString *)templateId;
Swift
func templatesGet(forUser templateId: String) -> DBRpcTask<DBFILEPROPERTIESGetTemplateResult, DBFILEPROPERTIESTemplateError>
Parameters
templateId
An identifier for template added by route See
templatesAddForUser
ortemplatesAddForTeam
.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESGetTemplateResult
object on success or aDBFILEPROPERTIESTemplateError
object 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.Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESListTemplateResult *, DBFILEPROPERTIESTemplateError *> *)templatesListForUser;
Swift
func templatesListForUser() -> DBRpcTask<DBFILEPROPERTIESListTemplateResult, DBFILEPROPERTIESTemplateError>
Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESListTemplateResult
object on success or aDBFILEPROPERTIESTemplateError
object 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.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBFILEPROPERTIESTemplateError *> *) templatesRemoveForUser:(nonnull NSString *)templateId;
Swift
func templatesRemove(forUser templateId: String) -> DBRpcTask<DBNilObject, DBFILEPROPERTIESTemplateError>
Parameters
templateId
An identifier for a template created by
templatesAddForUser
ortemplatesAddForTeam
.Return Value
Through the response callback, the caller will receive a
void
object on success or aDBFILEPROPERTIESTemplateError
object 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.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult *, DBFILEPROPERTIESModifyTemplateError *> *) templatesUpdateForUser:(nonnull NSString *)templateId;
Swift
func templatesUpdate(forUser templateId: String) -> DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult, DBFILEPROPERTIESModifyTemplateError>
Parameters
templateId
An identifier for template added by See
templatesAddForUser
ortemplatesAddForTeam
.Return Value
Through the response callback, the caller will receive a
DBFILEPROPERTIESUpdateTemplateResult
object on success or aDBFILEPROPERTIESModifyTemplateError
object 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.
Declaration
Objective-C
- (nonnull DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult *, DBFILEPROPERTIESModifyTemplateError *> *) templatesUpdateForUser:(nonnull NSString *)templateId name:(nullable NSString *)name description_:(nullable NSString *)description_ addFields: (nullable NSArray<DBFILEPROPERTIESPropertyFieldTemplate *> *)addFields;
Swift
func templatesUpdate(forUser templateId: String, name: String?, description_: String?, addFields: [DBFILEPROPERTIESPropertyFieldTemplate]?) -> DBRpcTask<DBFILEPROPERTIESUpdateTemplateResult, DBFILEPROPERTIESModifyTemplateError>
Parameters
templateId
An identifier for template added by See
templatesAddForUser
ortemplatesAddForTeam
.name
A 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.
addFields
Property 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
DBFILEPROPERTIESUpdateTemplateResult
object on success or aDBFILEPROPERTIESModifyTemplateError
object on failure.