CollaborationAllowlistModule
public class CollaborationAllowlistModule
Provides Collaborations management.
-
Returns the list of Allowlist 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 ) -> PagingIterator<CollaborationAllowlistEntry>
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 Allowlist Entry by ID.
Declaration
Swift
public func get( id: String, fields: [String]? = nil, completion: @escaping Callback<CollaborationAllowlistEntry> )
Parameters
id
The ID of the collaboration allowlist entry to get details
fields
Comma-separated list of fields to include in the response.
completion
The collaboration allowlist entry object is returned or an error
-
Create Collaboration Allowlist Entry.
Declaration
Swift
public func create( domain: String, direction: CollaborationDirection, fields: [String]? = nil, completion: @escaping Callback<CollaborationAllowlistEntry> )
Parameters
domain
Domain to add to allowlist (e.g. box.com).
direction
inbound, outbound, or both.
fields
Comma-separated list of fields to include in the response.
completion
The collaboration allowlist entry object is returned or an error
-
Remove a single item from the Enterprise’s Collaboration Allowlist by id. If there are no longer any entries in the allowlist table, the Collaboration Allowlist feature will be turned off.
Declaration
Swift
public func delete( id: String, completion: @escaping Callback<Void> )
Parameters
id
The ID of the collaboration allowlist entry to remove.
completion
An empty response will be returned upon successful deletion. An error is thrown if the collaboration allowlist 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 ) -> PagingIterator<CollaborationAllowlistExemptTarget>
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<CollaborationAllowlistExemptTarget> )
Parameters
id
The ID of the collaboration allowlist 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<CollaborationAllowlistExemptTarget> )
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 allowlist 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 allowlist 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.