TeamRoutes

public class TeamRoutes : DropboxTransportClientOwning

Routes for the team namespace For Objective-C compatible routes see DBTeamRoutes

  • List all device sessions of a team’s member.

    • scope: sessions.list

    Declaration

    Swift

    @discardableResult
    public func devicesListMemberDevices(
        teamMemberId: String,
        includeWebSessions: Bool = true,
        includeDesktopClients: Bool = true,
        includeMobileClients: Bool = true
    ) -> RpcRequest<Team.ListMemberDevicesResultSerializer, Team.ListMemberDevicesErrorSerializer>

    Parameters

    teamMemberId

    The team’s member id.

    includeWebSessions

    Whether to list web sessions of the team’s member.

    includeDesktopClients

    Whether to list linked desktop devices of the team’s member.

    includeMobileClients

    Whether to list linked mobile devices of the team’s member.

    Return Value

    Through the response callback, the caller will receive a Team.ListMemberDevicesResult object on success or a Team.ListMemberDevicesError object on failure.

  • List all device sessions of a team. Permission : Team member file access.

    • scope: sessions.list

    Declaration

    Swift

    @discardableResult
    public func devicesListMembersDevices(
        cursor: String? = nil,
        includeWebSessions: Bool = true,
        includeDesktopClients: Bool = true,
        includeMobileClients: Bool = true
    ) -> RpcRequest<Team.ListMembersDevicesResultSerializer, Team.ListMembersDevicesErrorSerializer>

    Parameters

    cursor

    At the first call to the devicesListMembersDevices the cursor shouldn’t be passed. Then, if the result of the call includes a cursor, the following requests should include the received cursors in order to receive the next sub list of team devices.

    includeWebSessions

    Whether to list web sessions of the team members.

    includeDesktopClients

    Whether to list desktop clients of the team members.

    includeMobileClients

    Whether to list mobile clients of the team members.

    Return Value

    Through the response callback, the caller will receive a Team.ListMembersDevicesResult object on success or a Team.ListMembersDevicesError object on failure.

  • Revoke a device session of a team’s member.

    • scope: sessions.modify

    Declaration

    Swift

    @discardableResult
    public func devicesRevokeDeviceSession(
        revokeDeviceSessionArg: Team
            .RevokeDeviceSessionArg
    ) -> RpcRequest<VoidSerializer, Team.RevokeDeviceSessionErrorSerializer>

    Parameters

    revokeDeviceSessionArg

    The RevokeDeviceSessionArg union

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Team.RevokeDeviceSessionError object on failure.

  • Revoke a list of device sessions of team members.

    • scope: sessions.modify

    Declaration

    Swift

    @discardableResult
    public func devicesRevokeDeviceSessionBatch(revokeDevices: [Team.RevokeDeviceSessionArg])
        -> RpcRequest<Team.RevokeDeviceSessionBatchResultSerializer, Team.RevokeDeviceSessionBatchErrorSerializer>

    Return Value

    Through the response callback, the caller will receive a Team.RevokeDeviceSessionBatchResult object on success or a Team.RevokeDeviceSessionBatchError object on failure.

  • Get the values for one or more featues. This route allows you to check your account’s capability for what feature you can access or what value you have for certain features. Permission : Team information.

    • scope: team_info.read

    Declaration

    Swift

    @discardableResult
    public func featuresGetValues(features: [Team.Feature])
        -> RpcRequest<Team.FeaturesGetValuesBatchResultSerializer, Team.FeaturesGetValuesBatchErrorSerializer>

    Parameters

    features

    A list of features in Feature. If the list is empty, this route will return FeaturesGetValuesBatchError.

    Return Value

    Through the response callback, the caller will receive a Team.FeaturesGetValuesBatchResult object on success or a Team.FeaturesGetValuesBatchError object on failure.

  • Retrieves information about a team.

    • scope: team_info.read

    Declaration

    Swift

    @discardableResult
    public func getInfo() -> RpcRequest<Team.TeamGetInfoResultSerializer, VoidSerializer>

    Return Value

    Through the response callback, the caller will receive a Team.TeamGetInfoResult object on success or a Void object on failure.

  • Creates a new, empty group, with a requested name. Permission : Team member management.

    • scope: groups.write

    Declaration

    Swift

    @discardableResult
    public func groupsCreate(
        groupName: String,
        addCreatorAsOwner: Bool = false,
        groupExternalId: String? = nil,
        groupManagementType: TeamCommon.GroupManagementType? = nil
    ) -> RpcRequest<Team.GroupFullInfoSerializer, Team.GroupCreateErrorSerializer>

    Parameters

    groupName

    Group name.

    addCreatorAsOwner

    Automatically add the creator of the group.

    groupExternalId

    The creator of a team can associate an arbitrary external ID to the group.

    groupManagementType

    Whether the team can be managed by selected users, or only by team admins.

    Return Value

    Through the response callback, the caller will receive a Team.GroupFullInfo object on success or a Team.GroupCreateError object on failure.

  • Deletes a group. The group is deleted immediately. However the revoking of group-owned resources may take additional time. Use the groupsJobStatusGet to determine whether this process has completed. Permission : Team member management.

    • scope: groups.write

    Declaration

    Swift

    @discardableResult
    public func groupsDelete(
        groupSelector: Team
            .GroupSelector
    ) -> RpcRequest<Async.LaunchEmptyResultSerializer, Team.GroupDeleteErrorSerializer>

    Parameters

    groupSelector

    Argument for selecting a single group, either by group_id or by external group ID.

    Return Value

    Through the response callback, the caller will receive a Async.LaunchEmptyResult object on success or a Team.GroupDeleteError object on failure.

  • Retrieves information about one or more groups. Note that the optional field members in GroupFullInfo is not returned for system-managed groups. Permission : Team Information.

    • scope: groups.read

    Declaration

    Swift

    @discardableResult
    public func groupsGetInfo(
        groupsSelector: Team
            .GroupsSelector
    ) -> RpcRequest<ArraySerializer<Team.GroupsGetInfoItemSerializer>, Team.GroupsGetInfoErrorSerializer>

    Parameters

    groupsSelector

    Argument for selecting a list of groups, either by group_ids, or external group IDs.

    Return Value

    Through the response callback, the caller will receive a Array<Team.GroupsGetInfoItem> object on success or a Team.GroupsGetInfoError object on failure.

  • Once an async_job_id is returned from groupsDelete, groupsMembersAdd , or groupsMembersRemove use this method to poll the status of granting/revoking group members’ access to group-owned resources. Permission : Team member management.

    • scope: groups.write

    Declaration

    Swift

    @discardableResult
    public func groupsJobStatusGet(asyncJobId: String) -> RpcRequest<Async.PollEmptyResultSerializer, Team.GroupsPollErrorSerializer>

    Parameters

    asyncJobId

    Id of the asynchronous job. This is the value of a response returned from the method that launched the job.

    Return Value

    Through the response callback, the caller will receive a Async.PollEmptyResult object on success or a Team.GroupsPollError object on failure.

  • Lists groups on a team. Permission : Team Information.

    • scope: groups.read

    Declaration

    Swift

    @discardableResult
    public func groupsList(limit: UInt32 = 1_000) -> RpcRequest<Team.GroupsListResultSerializer, VoidSerializer>

    Parameters

    limit

    Number of results to return per call.

    Return Value

    Through the response callback, the caller will receive a Team.GroupsListResult object on success or a Void object on failure.

  • Once a cursor has been retrieved from groupsList, use this to paginate through all groups. Permission : Team Information.

    • scope: groups.read

    Declaration

    Swift

    @discardableResult
    public func groupsListContinue(cursor: String) -> RpcRequest<Team.GroupsListResultSerializer, Team.GroupsListContinueErrorSerializer>

    Parameters

    cursor

    Indicates from what point to get the next set of groups.

    Return Value

    Through the response callback, the caller will receive a Team.GroupsListResult object on success or a Team.GroupsListContinueError object on failure.

  • Adds members to a group. The members are added immediately. However the granting of group-owned resources may take additional time. Use the groupsJobStatusGet to determine whether this process has completed. Permission : Team member management.

    • scope: groups.write

    Declaration

    Swift

    @discardableResult
    public func groupsMembersAdd(
        group: Team.GroupSelector,
        members: [Team.MemberAccess],
        returnMembers: Bool = true
    ) -> RpcRequest<Team.GroupMembersChangeResultSerializer, Team.GroupMembersAddErrorSerializer>

    Parameters

    group

    Group to which users will be added.

    members

    List of users to be added to the group.

    Return Value

    Through the response callback, the caller will receive a Team.GroupMembersChangeResult object on success or a Team.GroupMembersAddError object on failure.

  • Lists members of a group. Permission : Team Information.

    • scope: groups.read

    Declaration

    Swift

    @discardableResult
    public func groupsMembersList(
        group: Team.GroupSelector,
        limit: UInt32 = 1_000
    ) -> RpcRequest<Team.GroupsMembersListResultSerializer, Team.GroupSelectorErrorSerializer>

    Parameters

    group

    The group whose members are to be listed.

    limit

    Number of results to return per call.

    Return Value

    Through the response callback, the caller will receive a Team.GroupsMembersListResult object on success or a Team.GroupSelectorError object on failure.

  • Once a cursor has been retrieved from groupsMembersList, use this to paginate through all members of the group. Permission : Team information.

    • scope: groups.read

    Declaration

    Swift

    @discardableResult
    public func groupsMembersListContinue(cursor: String)
        -> RpcRequest<Team.GroupsMembersListResultSerializer, Team.GroupsMembersListContinueErrorSerializer>

    Parameters

    cursor

    Indicates from what point to get the next set of groups.

    Return Value

    Through the response callback, the caller will receive a Team.GroupsMembersListResult object on success or a Team.GroupsMembersListContinueError object on failure.

  • Removes members from a group. The members are removed immediately. However the revoking of group-owned resources may take additional time. Use the groupsJobStatusGet to determine whether this process has completed. This method permits removing the only owner of a group, even in cases where this is not possible via the web client. Permission : Team member management.

    • scope: groups.write

    Declaration

    Swift

    @discardableResult
    public func groupsMembersRemove(
        group: Team.GroupSelector,
        users: [Team.UserSelectorArg],
        returnMembers: Bool = true
    ) -> RpcRequest<Team.GroupMembersChangeResultSerializer, Team.GroupMembersRemoveErrorSerializer>

    Parameters

    group

    Group from which users will be removed.

    users

    List of users to be removed from the group.

    Return Value

    Through the response callback, the caller will receive a Team.GroupMembersChangeResult object on success or a Team.GroupMembersRemoveError object on failure.

  • Sets a member’s access type in a group. Permission : Team member management.

    • scope: groups.write

    Declaration

    Swift

    @discardableResult
    public func groupsMembersSetAccessType(
        group: Team.GroupSelector,
        user: Team.UserSelectorArg,
        accessType: Team.GroupAccessType,
        returnMembers: Bool = true
    ) -> RpcRequest<ArraySerializer<Team.GroupsGetInfoItemSerializer>, Team.GroupMemberSetAccessTypeErrorSerializer>

    Parameters

    accessType

    New group access type the user will have.

    returnMembers

    Whether to return the list of members in the group. Note that the default value will cause all the group members to be returned in the response. This may take a long time for large groups.

    Return Value

    Through the response callback, the caller will receive a Array<Team.GroupsGetInfoItem> object on success or a Team.GroupMemberSetAccessTypeError object on failure.

  • Updates a group’s name and/or external ID. Permission : Team member management.

    • scope: groups.write

    Declaration

    Swift

    @discardableResult
    public func groupsUpdate(
        group: Team.GroupSelector,
        returnMembers: Bool = true,
        newGroupName: String? = nil,
        newGroupExternalId: String? = nil,
        newGroupManagementType: TeamCommon.GroupManagementType? = nil
    ) -> RpcRequest<Team.GroupFullInfoSerializer, Team.GroupUpdateErrorSerializer>

    Parameters

    group

    Specify a group.

    newGroupName

    Optional argument. Set group name to this if provided.

    newGroupExternalId

    Optional argument. New group external ID. If the argument is None, the group’s external_id won’t be updated. If the argument is empty string, the group’s external id will be cleared.

    newGroupManagementType

    Set new group management type, if provided.

    Return Value

    Through the response callback, the caller will receive a Team.GroupFullInfo object on success or a Team.GroupUpdateError object on failure.

  • Creates new legal hold policy. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access.

    • scope: team_data.governance.write

    Declaration

    Swift

    @discardableResult
    public func legalHoldsCreatePolicy(
        name: String,
        members: [String],
        description_: String? = nil,
        startDate: Date? = nil,
        endDate: Date? = nil
    ) -> RpcRequest<Team.LegalHoldPolicySerializer, Team.LegalHoldsPolicyCreateErrorSerializer>

    Parameters

    name

    Policy name.

    description_

    A description of the legal hold policy.

    members

    List of team member IDs added to the hold.

    startDate

    start date of the legal hold policy.

    endDate

    end date of the legal hold policy.

    Return Value

    Through the response callback, the caller will receive a Team.LegalHoldPolicy object on success or a Team.LegalHoldsPolicyCreateError object on failure.

  • Gets a legal hold by Id. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access.

    • scope: team_data.governance.write

    Declaration

    Swift

    @discardableResult
    public func legalHoldsGetPolicy(id: String) -> RpcRequest<Team.LegalHoldPolicySerializer, Team.LegalHoldsGetPolicyErrorSerializer>

    Parameters

    id

    The legal hold Id.

    Return Value

    Through the response callback, the caller will receive a Team.LegalHoldPolicy object on success or a Team.LegalHoldsGetPolicyError object on failure.

  • List the file metadata that’s under the hold. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access.

    • scope: team_data.governance.write

    Declaration

    Swift

    @discardableResult
    public func legalHoldsListHeldRevisions(id: String)
        -> RpcRequest<Team.LegalHoldsListHeldRevisionResultSerializer, Team.LegalHoldsListHeldRevisionsErrorSerializer>

    Parameters

    id

    The legal hold Id.

    Return Value

    Through the response callback, the caller will receive a Team.LegalHoldsListHeldRevisionResult object on success or a Team.LegalHoldsListHeldRevisionsError object on failure.

  • Continue listing the file metadata that’s under the hold. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access.

    • scope: team_data.governance.write

    Declaration

    Swift

    @discardableResult
    public func legalHoldsListHeldRevisionsContinue(
        id: String,
        cursor: String? = nil
    ) -> RpcRequest<Team.LegalHoldsListHeldRevisionResultSerializer, Team.LegalHoldsListHeldRevisionsErrorSerializer>

    Parameters

    id

    The legal hold Id.

    cursor

    The cursor idicates where to continue reading file metadata entries for the next API call. When there are no more entries, the cursor will return none.

    Return Value

    Through the response callback, the caller will receive a Team.LegalHoldsListHeldRevisionResult object on success or a Team.LegalHoldsListHeldRevisionsError object on failure.

  • Lists legal holds on a team. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access.

    • scope: team_data.governance.write

    Declaration

    Swift

    @discardableResult
    public func legalHoldsListPolicies(includeReleased: Bool = false)
        -> RpcRequest<Team.LegalHoldsListPoliciesResultSerializer, Team.LegalHoldsListPoliciesErrorSerializer>

    Parameters

    includeReleased

    Whether to return holds that were released.

    Return Value

    Through the response callback, the caller will receive a Team.LegalHoldsListPoliciesResult object on success or a Team.LegalHoldsListPoliciesError object on failure.

  • Releases a legal hold by Id. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access.

    • scope: team_data.governance.write

    Declaration

    Swift

    @discardableResult
    public func legalHoldsReleasePolicy(id: String) -> RpcRequest<VoidSerializer, Team.LegalHoldsPolicyReleaseErrorSerializer>

    Parameters

    id

    The legal hold Id.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Team.LegalHoldsPolicyReleaseError object on failure.

  • Updates a legal hold. Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access.

    • scope: team_data.governance.write

    Declaration

    Swift

    @discardableResult
    public func legalHoldsUpdatePolicy(
        id: String,
        name: String? = nil,
        description_: String? = nil,
        members: [String]? = nil
    ) -> RpcRequest<Team.LegalHoldPolicySerializer, Team.LegalHoldsPolicyUpdateErrorSerializer>

    Parameters

    id

    The legal hold Id.

    name

    Policy new name.

    description_

    Policy new description.

    members

    List of team member IDs to apply the policy on.

    Return Value

    Through the response callback, the caller will receive a Team.LegalHoldPolicy object on success or a Team.LegalHoldsPolicyUpdateError object on failure.

  • List all linked applications of the team member. Note, this endpoint does not list any team-linked applications.

    • scope: sessions.list

    Declaration

    Swift

    @discardableResult
    public func linkedAppsListMemberLinkedApps(teamMemberId: String)
        -> RpcRequest<Team.ListMemberAppsResultSerializer, Team.ListMemberAppsErrorSerializer>

    Parameters

    teamMemberId

    The team member id.

    Return Value

    Through the response callback, the caller will receive a Team.ListMemberAppsResult object on success or a Team.ListMemberAppsError object on failure.

  • List all applications linked to the team members’ accounts. Note, this endpoint does not list any team-linked applications.

    • scope: sessions.list

    Declaration

    Swift

    @discardableResult
    public func linkedAppsListMembersLinkedApps(cursor: String? = nil)
        -> RpcRequest<Team.ListMembersAppsResultSerializer, Team.ListMembersAppsErrorSerializer>

    Parameters

    cursor

    At the first call to the linkedAppsListMembersLinkedApps the cursor shouldn’t be passed. Then, if the result of the call includes a cursor, the following requests should include the received cursors in order to receive the next sub list of the team applications.

    Return Value

    Through the response callback, the caller will receive a Team.ListMembersAppsResult object on success or a Team.ListMembersAppsError object on failure.

  • Revoke a linked application of the team member.

    • scope: sessions.modify

    Declaration

    Swift

    @discardableResult
    public func linkedAppsRevokeLinkedApp(
        appId: String,
        teamMemberId: String,
        keepAppFolder: Bool = true
    ) -> RpcRequest<VoidSerializer, Team.RevokeLinkedAppErrorSerializer>

    Parameters

    appId

    The application’s unique id.

    teamMemberId

    The unique id of the member owning the device.

    keepAppFolder

    This flag is not longer supported, the application dedicated folder (in case the application uses one) will be kept.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Team.RevokeLinkedAppError object on failure.

  • Revoke a list of linked applications of the team members.

    • scope: sessions.modify

    Declaration

    Swift

    @discardableResult
    public func linkedAppsRevokeLinkedAppBatch(revokeLinkedApp: [Team.RevokeLinkedApiAppArg])
        -> RpcRequest<Team.RevokeLinkedAppBatchResultSerializer, Team.RevokeLinkedAppBatchErrorSerializer>

    Return Value

    Through the response callback, the caller will receive a Team.RevokeLinkedAppBatchResult object on success or a Team.RevokeLinkedAppBatchError object on failure.

  • Add users to member space limits excluded users list.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func memberSpaceLimitsExcludedUsersAdd(users: [Team.UserSelectorArg]? = nil)
        -> RpcRequest<Team.ExcludedUsersUpdateResultSerializer, Team.ExcludedUsersUpdateErrorSerializer>

    Parameters

    users

    List of users to be added/removed.

    Return Value

    Through the response callback, the caller will receive a Team.ExcludedUsersUpdateResult object on success or a Team.ExcludedUsersUpdateError object on failure.

  • List member space limits excluded users.

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func memberSpaceLimitsExcludedUsersList(limit: UInt32 = 1_000)
        -> RpcRequest<Team.ExcludedUsersListResultSerializer, Team.ExcludedUsersListErrorSerializer>

    Parameters

    limit

    Number of results to return per call.

    Return Value

    Through the response callback, the caller will receive a Team.ExcludedUsersListResult object on success or a Team.ExcludedUsersListError object on failure.

  • Continue listing member space limits excluded users.

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func memberSpaceLimitsExcludedUsersListContinue(cursor: String)
        -> RpcRequest<Team.ExcludedUsersListResultSerializer, Team.ExcludedUsersListContinueErrorSerializer>

    Parameters

    cursor

    Indicates from what point to get the next set of users.

    Return Value

    Through the response callback, the caller will receive a Team.ExcludedUsersListResult object on success or a Team.ExcludedUsersListContinueError object on failure.

  • Remove users from member space limits excluded users list.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func memberSpaceLimitsExcludedUsersRemove(users: [Team.UserSelectorArg]? = nil)
        -> RpcRequest<Team.ExcludedUsersUpdateResultSerializer, Team.ExcludedUsersUpdateErrorSerializer>

    Parameters

    users

    List of users to be added/removed.

    Return Value

    Through the response callback, the caller will receive a Team.ExcludedUsersUpdateResult object on success or a Team.ExcludedUsersUpdateError object on failure.

  • Get users custom quota. A maximum of 1000 members can be specified in a single call. Note: to apply a custom space limit, a team admin needs to set a member space limit for the team first. (the team admin can check the settings here: https://www.dropbox.com/team/admin/settings/space).

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func memberSpaceLimitsGetCustomQuota(users: [Team.UserSelectorArg])
        -> RpcRequest<ArraySerializer<Team.CustomQuotaResultSerializer>, Team.CustomQuotaErrorSerializer>

    Parameters

    users

    List of users.

    Return Value

    Through the response callback, the caller will receive a Array<Team.CustomQuotaResult> object on success or a Team.CustomQuotaError object on failure.

  • Remove users custom quota. A maximum of 1000 members can be specified in a single call. Note: to apply a custom space limit, a team admin needs to set a member space limit for the team first. (the team admin can check the settings here: https://www.dropbox.com/team/admin/settings/space).

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func memberSpaceLimitsRemoveCustomQuota(users: [Team.UserSelectorArg])
        -> RpcRequest<ArraySerializer<Team.RemoveCustomQuotaResultSerializer>, Team.CustomQuotaErrorSerializer>

    Parameters

    users

    List of users.

    Return Value

    Through the response callback, the caller will receive a Array<Team.RemoveCustomQuotaResult> object on success or a Team.CustomQuotaError object on failure.

  • Set users custom quota. Custom quota has to be at least 15GB. A maximum of 1000 members can be specified in a single call. Note: to apply a custom space limit, a team admin needs to set a member space limit for the team first. (the team admin can check the settings here: https://www.dropbox.com/team/admin/settings/space).

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func memberSpaceLimitsSetCustomQuota(usersAndQuotas: [Team.UserCustomQuotaArg])
        -> RpcRequest<ArraySerializer<Team.CustomQuotaResultSerializer>, Team.SetCustomQuotaErrorSerializer>

    Parameters

    usersAndQuotas

    List of users and their custom quotas.

    Return Value

    Through the response callback, the caller will receive a Array<Team.CustomQuotaResult> object on success or a Team.SetCustomQuotaError object on failure.

  • Adds members to a team. Permission : Team member management A maximum of 20 members can be specified in a single call. If no Dropbox account exists with the email address specified, a new Dropbox account will be created with the given email address, and that account will be invited to the team. If a personal Dropbox account exists with the email address specified in the call, this call will create a placeholder Dropbox account for the user on the team and send an email inviting the user to migrate their existing personal account onto the team. Team member management apps are required to set an initial given_name and surname for a user to use in the team invitation and for ‘Perform as team member’ actions taken on the user before they become ‘active’.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersAddV2(
        newMembers: [Team.MemberAddV2Arg],
        forceAsync: Bool = false
    ) -> RpcRequest<Team.MembersAddLaunchV2ResultSerializer, VoidSerializer>

    Parameters

    newMembers

    Details of new members to be added to the team.

    Return Value

    Through the response callback, the caller will receive a Team.MembersAddLaunchV2Result object on success or a Void object on failure.

  • Adds members to a team. Permission : Team member management A maximum of 20 members can be specified in a single call. If no Dropbox account exists with the email address specified, a new Dropbox account will be created with the given email address, and that account will be invited to the team. If a personal Dropbox account exists with the email address specified in the call, this call will create a placeholder Dropbox account for the user on the team and send an email inviting the user to migrate their existing personal account onto the team. Team member management apps are required to set an initial given_name and surname for a user to use in the team invitation and for ‘Perform as team member’ actions taken on the user before they become ‘active’.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersAdd(
        newMembers: [Team.MemberAddArg],
        forceAsync: Bool = false
    ) -> RpcRequest<Team.MembersAddLaunchSerializer, VoidSerializer>

    Parameters

    newMembers

    Details of new members to be added to the team.

    Return Value

    Through the response callback, the caller will receive a Team.MembersAddLaunch object on success or a Void object on failure.

  • Once an async_job_id is returned from membersAddV2 , use this to poll the status of the asynchronous request. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersAddJobStatusGetV2(asyncJobId: String)
        -> RpcRequest<Team.MembersAddJobStatusV2ResultSerializer, Async.PollErrorSerializer>

    Parameters

    asyncJobId

    Id of the asynchronous job. This is the value of a response returned from the method that launched the job.

    Return Value

    Through the response callback, the caller will receive a Team.MembersAddJobStatusV2Result object on success or a Async.PollError object on failure.

  • Once an async_job_id is returned from membersAdd , use this to poll the status of the asynchronous request. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersAddJobStatusGet(asyncJobId: String) -> RpcRequest<Team.MembersAddJobStatusSerializer, Async.PollErrorSerializer>

    Parameters

    asyncJobId

    Id of the asynchronous job. This is the value of a response returned from the method that launched the job.

    Return Value

    Through the response callback, the caller will receive a Team.MembersAddJobStatus object on success or a Async.PollError object on failure.

  • Deletes a team member’s profile photo. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersDeleteProfilePhotoV2(
        user: Team
            .UserSelectorArg
    ) -> RpcRequest<Team.TeamMemberInfoV2ResultSerializer, Team.MembersDeleteProfilePhotoErrorSerializer>

    Parameters

    user

    Identity of the user whose profile photo will be deleted.

    Return Value

    Through the response callback, the caller will receive a Team.TeamMemberInfoV2Result object on success or a Team.MembersDeleteProfilePhotoError object on failure.

  • Deletes a team member’s profile photo. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersDeleteProfilePhoto(
        user: Team
            .UserSelectorArg
    ) -> RpcRequest<Team.TeamMemberInfoSerializer, Team.MembersDeleteProfilePhotoErrorSerializer>

    Parameters

    user

    Identity of the user whose profile photo will be deleted.

    Return Value

    Through the response callback, the caller will receive a Team.TeamMemberInfo object on success or a Team.MembersDeleteProfilePhotoError object on failure.

  • Get available TeamMemberRoles for the connected team. To be used with membersSetAdminPermissionsV2. Permission : Team member management.

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func membersGetAvailableTeamMemberRoles() -> RpcRequest<Team.MembersGetAvailableTeamMemberRolesResultSerializer, VoidSerializer>

    Return Value

    Through the response callback, the caller will receive a Team.MembersGetAvailableTeamMemberRolesResult object on success or a Void object on failure.

  • Returns information about multiple team members. Permission : Team information This endpoint will return idNotFound in MembersGetInfoItem, for IDs (or emails) that cannot be matched to a valid team member.

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func membersGetInfoV2(members: [Team.UserSelectorArg])
        -> RpcRequest<Team.MembersGetInfoV2ResultSerializer, Team.MembersGetInfoErrorSerializer>

    Parameters

    members

    List of team members.

    Return Value

    Through the response callback, the caller will receive a Team.MembersGetInfoV2Result object on success or a Team.MembersGetInfoError object on failure.

  • Returns information about multiple team members. Permission : Team information This endpoint will return idNotFound in MembersGetInfoItem, for IDs (or emails) that cannot be matched to a valid team member.

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func membersGetInfo(members: [Team.UserSelectorArg])
        -> RpcRequest<ArraySerializer<Team.MembersGetInfoItemSerializer>, Team.MembersGetInfoErrorSerializer>

    Parameters

    members

    List of team members.

    Return Value

    Through the response callback, the caller will receive a Array<Team.MembersGetInfoItem> object on success or a Team.MembersGetInfoError object on failure.

  • Lists members of a team. Permission : Team information.

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func membersListV2(
        limit: UInt32 = 1_000,
        includeRemoved: Bool = false
    ) -> RpcRequest<Team.MembersListV2ResultSerializer, Team.MembersListErrorSerializer>

    Parameters

    limit

    Number of results to return per call.

    includeRemoved

    Whether to return removed members.

    Return Value

    Through the response callback, the caller will receive a Team.MembersListV2Result object on success or a Team.MembersListError object on failure.

  • Lists members of a team. Permission : Team information.

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func membersList(
        limit: UInt32 = 1_000,
        includeRemoved: Bool = false
    ) -> RpcRequest<Team.MembersListResultSerializer, Team.MembersListErrorSerializer>

    Parameters

    limit

    Number of results to return per call.

    includeRemoved

    Whether to return removed members.

    Return Value

    Through the response callback, the caller will receive a Team.MembersListResult object on success or a Team.MembersListError object on failure.

  • Once a cursor has been retrieved from membersListV2, use this to paginate through all team members. Permission : Team information.

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func membersListContinueV2(cursor: String)
        -> RpcRequest<Team.MembersListV2ResultSerializer, Team.MembersListContinueErrorSerializer>

    Parameters

    cursor

    Indicates from what point to get the next set of members.

    Return Value

    Through the response callback, the caller will receive a Team.MembersListV2Result object on success or a Team.MembersListContinueError object on failure.

  • Once a cursor has been retrieved from membersList, use this to paginate through all team members. Permission : Team information.

    • scope: members.read

    Declaration

    Swift

    @discardableResult
    public func membersListContinue(cursor: String)
        -> RpcRequest<Team.MembersListResultSerializer, Team.MembersListContinueErrorSerializer>

    Parameters

    cursor

    Indicates from what point to get the next set of members.

    Return Value

    Through the response callback, the caller will receive a Team.MembersListResult object on success or a Team.MembersListContinueError object on failure.

  • Moves removed member’s files to a different member. This endpoint initiates an asynchronous job. To obtain the final result of the job, the client should periodically poll membersMoveFormerMemberFilesJobStatusCheck. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersMoveFormerMemberFiles(
        user: Team.UserSelectorArg,
        transferDestId: Team.UserSelectorArg,
        transferAdminId: Team.UserSelectorArg
    ) -> RpcRequest<Async.LaunchEmptyResultSerializer, Team.MembersTransferFormerMembersFilesErrorSerializer>

    Parameters

    transferDestId

    Files from the deleted member account will be transferred to this user.

    transferAdminId

    Errors during the transfer process will be sent via email to this user.

    Return Value

    Through the response callback, the caller will receive a Async.LaunchEmptyResult object on success or a Team.MembersTransferFormerMembersFilesError object on failure.

  • Once an async_job_id is returned from membersMoveFormerMemberFiles , use this to poll the status of the asynchronous request. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersMoveFormerMemberFilesJobStatusCheck(asyncJobId: String)
        -> RpcRequest<Async.PollEmptyResultSerializer, Async.PollErrorSerializer>

    Parameters

    asyncJobId

    Id of the asynchronous job. This is the value of a response returned from the method that launched the job.

    Return Value

    Through the response callback, the caller will receive a Async.PollEmptyResult object on success or a Async.PollError object on failure.

  • Recover a deleted member. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account.

    • scope: members.delete

    Declaration

    Swift

    @discardableResult
    public func membersRecover(user: Team.UserSelectorArg) -> RpcRequest<VoidSerializer, Team.MembersRecoverErrorSerializer>

    Parameters

    user

    Identity of user to recover.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Team.MembersRecoverError object on failure.

  • Removes a member from a team. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account. Accounts can be recovered via membersRecover for a 7 day period or until the account has been permanently deleted or transferred to another account (whichever comes first). Calling membersAdd while a user is still recoverable on your team will return with userAlreadyOnTeam in MemberAddResult. Accounts can have their files transferred via the admin console for a limited time, based on the version history length associated with the team (180 days for most teams). This endpoint may initiate an asynchronous job. To obtain the final result of the job, the client should periodically poll membersRemoveJobStatusGet.

    • scope: members.delete

    Declaration

    Swift

    @discardableResult
    public func membersRemove(
        user: Team.UserSelectorArg,
        wipeData: Bool = true,
        transferDestId: Team.UserSelectorArg? = nil,
        transferAdminId: Team.UserSelectorArg? = nil,
        keepAccount: Bool = false,
        retainTeamShares: Bool = false
    ) -> RpcRequest<Async.LaunchEmptyResultSerializer, Team.MembersRemoveErrorSerializer>

    Parameters

    transferDestId

    If provided, files from the deleted member account will be transferred to this user.

    transferAdminId

    If provided, errors during the transfer process will be sent via email to this user. If the transfer_dest_id argument was provided, then this argument must be provided as well.

    keepAccount

    Downgrade the member to a Basic account. The user will retain the email address associated with their Dropbox account and data in their account that is not restricted to team members. In order to keep the account the argument wipeData should be set to false.

    retainTeamShares

    If provided, allows removed users to keep access to Dropbox folders (not Dropbox Paper folders) already explicitly shared with them (not via a group) when they are downgraded to a Basic account. Users will not retain access to folders that do not allow external sharing. In order to keep the sharing relationships, the arguments wipeData should be set to false and keepAccount should be set to true.

    Return Value

    Through the response callback, the caller will receive a Async.LaunchEmptyResult object on success or a Team.MembersRemoveError object on failure.

  • Once an async_job_id is returned from membersRemove , use this to poll the status of the asynchronous request. Permission : Team member management.

    • scope: members.delete

    Declaration

    Swift

    @discardableResult
    public func membersRemoveJobStatusGet(asyncJobId: String) -> RpcRequest<Async.PollEmptyResultSerializer, Async.PollErrorSerializer>

    Parameters

    asyncJobId

    Id of the asynchronous job. This is the value of a response returned from the method that launched the job.

    Return Value

    Through the response callback, the caller will receive a Async.PollEmptyResult object on success or a Async.PollError object on failure.

  • Add secondary emails to users. Permission : Team member management. Emails that are on verified domains will be verified automatically. For each email address not on a verified domain a verification email will be sent.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSecondaryEmailsAdd(newSecondaryEmails: [Team.UserSecondaryEmailsArg])
        -> RpcRequest<Team.AddSecondaryEmailsResultSerializer, Team.AddSecondaryEmailsErrorSerializer>

    Parameters

    newSecondaryEmails

    List of users and secondary emails to add.

    Return Value

    Through the response callback, the caller will receive a Team.AddSecondaryEmailsResult object on success or a Team.AddSecondaryEmailsError object on failure.

  • Delete secondary emails from users Permission : Team member management. Users will be notified of deletions of verified secondary emails at both the secondary email and their primary email.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSecondaryEmailsDelete(emailsToDelete: [Team.UserSecondaryEmailsArg])
        -> RpcRequest<Team.DeleteSecondaryEmailsResultSerializer, VoidSerializer>

    Parameters

    emailsToDelete

    List of users and their secondary emails to delete.

    Return Value

    Through the response callback, the caller will receive a Team.DeleteSecondaryEmailsResult object on success or a Void object on failure.

  • Resend secondary email verification emails. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSecondaryEmailsResendVerificationEmails(emailsToResend: [Team.UserSecondaryEmailsArg])
        -> RpcRequest<Team.ResendVerificationEmailResultSerializer, VoidSerializer>

    Parameters

    emailsToResend

    List of users and secondary emails to resend verification emails to.

    Return Value

    Through the response callback, the caller will receive a Team.ResendVerificationEmailResult object on success or a Void object on failure.

  • Sends welcome email to pending team member. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account. No-op if team member is not pending.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSendWelcomeEmail(
        userSelectorArg: Team
            .UserSelectorArg
    ) -> RpcRequest<VoidSerializer, Team.MembersSendWelcomeErrorSerializer>

    Parameters

    userSelectorArg

    Argument for selecting a single user, either by team_member_id, external_id or email.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Team.MembersSendWelcomeError object on failure.

  • Updates a team member’s permissions. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSetAdminPermissionsV2(
        user: Team.UserSelectorArg,
        newRoles: [String]? = nil
    ) -> RpcRequest<Team.MembersSetPermissions2ResultSerializer, Team.MembersSetPermissions2ErrorSerializer>

    Parameters

    user

    Identity of user whose role will be set.

    newRoles

    The new roles for the member. Send empty list to make user member only. For now, only up to one role is allowed.

    Return Value

    Through the response callback, the caller will receive a Team.MembersSetPermissions2Result object on success or a Team.MembersSetPermissions2Error object on failure.

  • Updates a team member’s permissions. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSetAdminPermissions(
        user: Team.UserSelectorArg,
        newRole: Team.AdminTier
    ) -> RpcRequest<Team.MembersSetPermissionsResultSerializer, Team.MembersSetPermissionsErrorSerializer>

    Parameters

    user

    Identity of user whose role will be set.

    newRole

    The new role of the member.

    Return Value

    Through the response callback, the caller will receive a Team.MembersSetPermissionsResult object on success or a Team.MembersSetPermissionsError object on failure.

  • Updates a team member’s profile. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSetProfileV2(
        user: Team.UserSelectorArg,
        newEmail: String? = nil,
        newExternalId: String? = nil,
        newGivenName: String? = nil,
        newSurname: String? = nil,
        newPersistentId: String? = nil,
        newIsDirectoryRestricted: Bool? = nil
    ) -> RpcRequest<Team.TeamMemberInfoV2ResultSerializer, Team.MembersSetProfileErrorSerializer>

    Parameters

    user

    Identity of user whose profile will be set.

    newEmail

    New email for member.

    newExternalId

    New external ID for member.

    newGivenName

    New given name for member.

    newSurname

    New surname for member.

    newPersistentId

    New persistent ID. This field only available to teams using persistent ID SAML configuration.

    newIsDirectoryRestricted

    New value for whether the user is a directory restricted user.

    Return Value

    Through the response callback, the caller will receive a Team.TeamMemberInfoV2Result object on success or a Team.MembersSetProfileError object on failure.

  • Updates a team member’s profile. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSetProfile(
        user: Team.UserSelectorArg,
        newEmail: String? = nil,
        newExternalId: String? = nil,
        newGivenName: String? = nil,
        newSurname: String? = nil,
        newPersistentId: String? = nil,
        newIsDirectoryRestricted: Bool? = nil
    ) -> RpcRequest<Team.TeamMemberInfoSerializer, Team.MembersSetProfileErrorSerializer>

    Parameters

    user

    Identity of user whose profile will be set.

    newEmail

    New email for member.

    newExternalId

    New external ID for member.

    newGivenName

    New given name for member.

    newSurname

    New surname for member.

    newPersistentId

    New persistent ID. This field only available to teams using persistent ID SAML configuration.

    newIsDirectoryRestricted

    New value for whether the user is a directory restricted user.

    Return Value

    Through the response callback, the caller will receive a Team.TeamMemberInfo object on success or a Team.MembersSetProfileError object on failure.

  • Updates a team member’s profile photo. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSetProfilePhotoV2(
        user: Team.UserSelectorArg,
        photo: Account.PhotoSourceArg
    ) -> RpcRequest<Team.TeamMemberInfoV2ResultSerializer, Team.MembersSetProfilePhotoErrorSerializer>

    Parameters

    user

    Identity of the user whose profile photo will be set.

    photo

    Image to set as the member’s new profile photo.

    Return Value

    Through the response callback, the caller will receive a Team.TeamMemberInfoV2Result object on success or a Team.MembersSetProfilePhotoError object on failure.

  • Updates a team member’s profile photo. Permission : Team member management.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSetProfilePhoto(
        user: Team.UserSelectorArg,
        photo: Account.PhotoSourceArg
    ) -> RpcRequest<Team.TeamMemberInfoSerializer, Team.MembersSetProfilePhotoErrorSerializer>

    Parameters

    user

    Identity of the user whose profile photo will be set.

    photo

    Image to set as the member’s new profile photo.

    Return Value

    Through the response callback, the caller will receive a Team.TeamMemberInfo object on success or a Team.MembersSetProfilePhotoError object on failure.

  • Suspend a member from a team. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersSuspend(
        user: Team.UserSelectorArg,
        wipeData: Bool = true
    ) -> RpcRequest<VoidSerializer, Team.MembersSuspendErrorSerializer>

    Parameters

    wipeData

    If provided, controls if the user’s data will be deleted on their linked devices.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Team.MembersSuspendError object on failure.

  • Unsuspend a member from a team. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account.

    • scope: members.write

    Declaration

    Swift

    @discardableResult
    public func membersUnsuspend(user: Team.UserSelectorArg) -> RpcRequest<VoidSerializer, Team.MembersUnsuspendErrorSerializer>

    Parameters

    user

    Identity of user to unsuspend.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Team.MembersUnsuspendError object on failure.

  • Returns a list of all team-accessible namespaces. This list includes team folders, shared folders containing team members, team members’ home namespaces, and team members’ app folders. Home namespaces and app folders are always owned by this team or members of the team, but shared folders may be owned by other users or other teams. Duplicates may occur in the list.

    • scope: team_data.member

    Declaration

    Swift

    @discardableResult
    public func namespacesList(limit: UInt32 = 1_000)
        -> RpcRequest<Team.TeamNamespacesListResultSerializer, Team.TeamNamespacesListErrorSerializer>

    Parameters

    limit

    Specifying a value here has no effect.

    Return Value

    Through the response callback, the caller will receive a Team.TeamNamespacesListResult object on success or a Team.TeamNamespacesListError object on failure.

  • Once a cursor has been retrieved from namespacesList, use this to paginate through all team-accessible namespaces. Duplicates may occur in the list.

    • scope: team_data.member

    Declaration

    Swift

    @discardableResult
    public func namespacesListContinue(cursor: String)
        -> RpcRequest<Team.TeamNamespacesListResultSerializer, Team.TeamNamespacesListContinueErrorSerializer>

    Parameters

    cursor

    Indicates from what point to get the next set of team-accessible namespaces.

    Return Value

    Through the response callback, the caller will receive a Team.TeamNamespacesListResult object on success or a Team.TeamNamespacesListContinueError object on failure.

  • Endpoint adds Approve List entries. Changes are effective immediately. Changes are committed in transaction. In case of single validation error - all entries are rejected. Valid domains (RFC-1034/5) and emails (RFC-5322/822) are accepted. Added entries cannot overflow limit of 10000 entries per team. Maximum 100 entries per call is allowed.

    • scope: team_info.write

    Declaration

    Swift

    @discardableResult
    public func sharingAllowlistAdd(
        domains: [String]? = nil,
        emails: [String]? = nil
    ) -> RpcRequest<Team.SharingAllowlistAddResponseSerializer, Team.SharingAllowlistAddErrorSerializer>

    Parameters

    domains

    List of domains represented by valid string representation (RFC-1034/5).

    emails

    List of emails represented by valid string representation (RFC-5322/822).

    Return Value

    Through the response callback, the caller will receive a Team.SharingAllowlistAddResponse object on success or a Team.SharingAllowlistAddError object on failure.

  • Lists Approve List entries for given team, from newest to oldest, returning up to limit entries at a time. If there are more than limit entries associated with the current team, more can be fetched by passing the returned cursor to sharingAllowlistListContinue.

    • scope: team_info.read

    Declaration

    Swift

    @discardableResult
    public func sharingAllowlistList(limit: UInt32 = 1_000)
        -> RpcRequest<Team.SharingAllowlistListResponseSerializer, Team.SharingAllowlistListErrorSerializer>

    Parameters

    limit

    The number of entries to fetch at one time.

    Return Value

    Through the response callback, the caller will receive a Team.SharingAllowlistListResponse object on success or a Team.SharingAllowlistListError object on failure.

  • Lists entries associated with given team, starting from a the cursor. See sharingAllowlistList.

    • scope: team_info.read

    Declaration

    Swift

    @discardableResult
    public func sharingAllowlistListContinue(cursor: String)
        -> RpcRequest<Team.SharingAllowlistListResponseSerializer, Team.SharingAllowlistListContinueErrorSerializer>

    Parameters

    cursor

    The cursor returned from a previous call to sharingAllowlistList or sharingAllowlistListContinue.

    Return Value

    Through the response callback, the caller will receive a Team.SharingAllowlistListResponse object on success or a Team.SharingAllowlistListContinueError object on failure.

  • Endpoint removes Approve List entries. Changes are effective immediately. Changes are committed in transaction. In case of single validation error - all entries are rejected. Valid domains (RFC-1034/5) and emails (RFC-5322/822) are accepted. Entries being removed have to be present on the list. Maximum 1000 entries per call is allowed.

    • scope: team_info.write

    Declaration

    Swift

    @discardableResult
    public func sharingAllowlistRemove(
        domains: [String]? = nil,
        emails: [String]? = nil
    ) -> RpcRequest<Team.SharingAllowlistRemoveResponseSerializer, Team.SharingAllowlistRemoveErrorSerializer>

    Parameters

    domains

    List of domains represented by valid string representation (RFC-1034/5).

    emails

    List of emails represented by valid string representation (RFC-5322/822).

    Return Value

    Through the response callback, the caller will receive a Team.SharingAllowlistRemoveResponse object on success or a Team.SharingAllowlistRemoveError object on failure.

  • Sets an archived team folder’s status to active. Permission : Team member file access.

    • scope: team_data.content.write

    Declaration

    Swift

    @discardableResult
    public func teamFolderActivate(teamFolderId: String)
        -> RpcRequest<Team.TeamFolderMetadataSerializer, Team.TeamFolderActivateErrorSerializer>

    Parameters

    teamFolderId

    The ID of the team folder.

    Return Value

    Through the response callback, the caller will receive a Team.TeamFolderMetadata object on success or a Team.TeamFolderActivateError object on failure.

  • Sets an active team folder’s status to archived and removes all folder and file members. This endpoint cannot be used for teams that have a shared team space. Permission : Team member file access.

    • scope: team_data.content.write

    Declaration

    Swift

    @discardableResult
    public func teamFolderArchive(
        teamFolderId: String,
        forceAsyncOff: Bool = false
    ) -> RpcRequest<Team.TeamFolderArchiveLaunchSerializer, Team.TeamFolderArchiveErrorSerializer>

    Parameters

    forceAsyncOff

    Whether to force the archive to happen synchronously.

    Return Value

    Through the response callback, the caller will receive a Team.TeamFolderArchiveLaunch object on success or a Team.TeamFolderArchiveError object on failure.

  • Returns the status of an asynchronous job for archiving a team folder. Permission : Team member file access.

    • scope: team_data.content.write

    Declaration

    Swift

    @discardableResult
    public func teamFolderArchiveCheck(asyncJobId: String)
        -> RpcRequest<Team.TeamFolderArchiveJobStatusSerializer, Async.PollErrorSerializer>

    Parameters

    asyncJobId

    Id of the asynchronous job. This is the value of a response returned from the method that launched the job.

    Return Value

    Through the response callback, the caller will receive a Team.TeamFolderArchiveJobStatus object on success or a Async.PollError object on failure.

  • Creates a new, active, team folder with no members. This endpoint can only be used for teams that do not already have a shared team space. Permission : Team member file access.

    • scope: team_data.content.write

    Declaration

    Swift

    @discardableResult
    public func teamFolderCreate(
        name: String,
        syncSetting: Files.SyncSettingArg? = nil
    ) -> RpcRequest<Team.TeamFolderMetadataSerializer, Team.TeamFolderCreateErrorSerializer>

    Parameters

    name

    Name for the new team folder.

    syncSetting

    The sync setting to apply to this team folder. Only permitted if the team has team selective sync enabled.

    Return Value

    Through the response callback, the caller will receive a Team.TeamFolderMetadata object on success or a Team.TeamFolderCreateError object on failure.

  • Retrieves metadata for team folders. Permission : Team member file access.

    • scope: team_data.content.read

    Declaration

    Swift

    @discardableResult
    public func teamFolderGetInfo(teamFolderIds: [String])
        -> RpcRequest<ArraySerializer<Team.TeamFolderGetInfoItemSerializer>, VoidSerializer>

    Parameters

    teamFolderIds

    The list of team folder IDs.

    Return Value

    Through the response callback, the caller will receive a Array<Team.TeamFolderGetInfoItem> object on success or a Void object on failure.

  • Lists all team folders. Permission : Team member file access.

    • scope: team_data.content.read

    Declaration

    Swift

    @discardableResult
    public func teamFolderList(limit: UInt32 = 1_000)
        -> RpcRequest<Team.TeamFolderListResultSerializer, Team.TeamFolderListErrorSerializer>

    Parameters

    limit

    The maximum number of results to return per request.

    Return Value

    Through the response callback, the caller will receive a Team.TeamFolderListResult object on success or a Team.TeamFolderListError object on failure.

  • Once a cursor has been retrieved from teamFolderList, use this to paginate through all team folders. Permission : Team member file access.

    • scope: team_data.content.read

    Declaration

    Swift

    @discardableResult
    public func teamFolderListContinue(cursor: String)
        -> RpcRequest<Team.TeamFolderListResultSerializer, Team.TeamFolderListContinueErrorSerializer>

    Parameters

    cursor

    Indicates from what point to get the next set of team folders.

    Return Value

    Through the response callback, the caller will receive a Team.TeamFolderListResult object on success or a Team.TeamFolderListContinueError object on failure.

  • Permanently deletes an archived team folder. This endpoint cannot be used for teams that have a shared team space. Permission : Team member file access.

    • scope: team_data.content.write

    Declaration

    Swift

    @discardableResult
    public func teamFolderPermanentlyDelete(teamFolderId: String)
        -> RpcRequest<VoidSerializer, Team.TeamFolderPermanentlyDeleteErrorSerializer>

    Parameters

    teamFolderId

    The ID of the team folder.

    Return Value

    Through the response callback, the caller will receive a Void object on success or a Team.TeamFolderPermanentlyDeleteError object on failure.

  • Changes an active team folder’s name. Permission : Team member file access.

    • scope: team_data.content.write

    Declaration

    Swift

    @discardableResult
    public func teamFolderRename(
        teamFolderId: String,
        name: String
    ) -> RpcRequest<Team.TeamFolderMetadataSerializer, Team.TeamFolderRenameErrorSerializer>

    Parameters

    name

    New team folder name.

    Return Value

    Through the response callback, the caller will receive a Team.TeamFolderMetadata object on success or a Team.TeamFolderRenameError object on failure.

  • Updates the sync settings on a team folder or its contents. Use of this endpoint requires that the team has team selective sync enabled.

    • scope: team_data.content.write

    Declaration

    Swift

    @discardableResult
    public func teamFolderUpdateSyncSettings(
        teamFolderId: String,
        syncSetting: Files.SyncSettingArg? = nil,
        contentSyncSettings: [Files.ContentSyncSettingArg]? = nil
    ) -> RpcRequest<Team.TeamFolderMetadataSerializer, Team.TeamFolderUpdateSyncSettingsErrorSerializer>

    Parameters

    syncSetting

    Sync setting to apply to the team folder itself. Only meaningful if the team folder is not a shared team root.

    contentSyncSettings

    Sync settings to apply to contents of this team folder.

    Return Value

    Through the response callback, the caller will receive a Team.TeamFolderMetadata object on success or a Team.TeamFolderUpdateSyncSettingsError object on failure.

  • Returns the member profile of the admin who generated the team access token used to make the call.

    • scope: team_info.read

    Declaration

    Swift

    @discardableResult
    public func tokenGetAuthenticatedAdmin()
        -> RpcRequest<Team.TokenGetAuthenticatedAdminResultSerializer, Team.TokenGetAuthenticatedAdminErrorSerializer>

    Return Value

    Through the response callback, the caller will receive a Team.TokenGetAuthenticatedAdminResult object on success or a Team.TokenGetAuthenticatedAdminError object on failure.