CollaborationWhitelistModule
public class CollaborationWhitelistModule
Provides Collaborations management.
-
Returns the list of Whitelist entries for the current Enterprise. Each entry lists type, id, domain, and direction. You can specify more by using the fields parameter.
Declaration
Swift
public func listEntries( fields: [String]? = nil, marker: String? = nil, limit: Int? = nil, completion: @escaping Callback<PagingIterator<CollaborationWhitelistEntry>> )
Parameters
fields
Comma-separated list of fields to include in the response.
marker
The position marker at which to begin the response. See marker-based paging for details.
limit
The maximum number of items to return. The default is 100 and the maximum is 1,000.
-
Get Collaboration Whitelist Entry by ID.
Declaration
Swift
public func get( id: String, fields: [String]? = nil, completion: @escaping Callback<CollaborationWhitelistEntry> )
Parameters
id
The ID of the collaboration whitelist entry to get details
fields
Comma-separated list of fields to include in the response.
completion
The collaboration whitelist entry object is returned or an error
-
Create Collaboration Whitelist Entry.
Declaration
Swift
public func create( domain: String, direction: CollaborationDirection, fields: [String]? = nil, completion: @escaping Callback<CollaborationWhitelistEntry> )
Parameters
domain
Domain to add to whitelist (e.g. box.com).
direction
inbound, outbound, or both.
fields
Comma-separated list of fields to include in the response.
completion
The collaboration whitelist entry object is returned or an error
-
Remove a single item from the Enterprise’s Collaboration Whitelist by id. If there are no longer any entries in the whitelist table, the Collaboration Whitelist feature will be turned off.
Declaration
Swift
public func delete( id: String, completion: @escaping Callback<Void> )
Parameters
id
The ID of the collaboration whitelist entry to remove.
completion
An empty response will be returned upon successful deletion. An error is thrown if the collaboration whitelist cannot be deleted.
-
Returns an interator for listing of Exempt User entries for the current Enterprise. By default, each will return type, id, and user, but you can specify more by using the fields parameter.
Declaration
Swift
public func listExemptTargets( marker: String? = nil, limit: Int? = nil, fields: [String]? = nil, completion: @escaping Callback<PagingIterator<CollaborationWhitelistExemptTarget>> )
Parameters
marker
The position marker at which to begin the response. See marker-based paging for details.
limit
The maximum number of items to return. The default is 100 and the maximum is 1,000.
fields
Comma-separated list of fields to include in the response.
-
Returns a specific exempt target for the passed in ID.
Declaration
Swift
public func getExemptTarget( id: String, fields: [String]? = nil, completion: @escaping Callback<CollaborationWhitelistExemptTarget> )
Parameters
id
The ID of the collaboration whitelist entry to get details
fields
Comma-separated list of fields to include in the response.
completion
The exempt target entry, object is returned or an error
-
Creates the Exempt Target entry.
Declaration
Swift
public func exemptUser( userId: String, fields: [String]? = nil, completion: @escaping Callback<CollaborationWhitelistExemptTarget> )
Parameters
userId
The ID of user to add to exempt target list.
fields
Comma-separated list of fields to include in the response.
completion
The collaboration whitelist entry object is returned or an error
-
Remove a single user from the exempt target list.
Declaration
Swift
public func deleteExemptTarget( id: String, completion: @escaping Callback<Void> )
Parameters
id
The ID of the collaboration whitelist exempt target to remove.
completion
An empty response will be returned upon successful deletion. An error is thrown if the exempt target cannot be deleted.