SharedLink

public class SharedLink : BoxModel

Provides direct, read-only access to files or folder on Box using a URL

BoxModel

  • Declaration

    Swift

    public private(set) var rawData: [String : Any] { get }

Properties

  • url

    The URL to access the item on Box. If entered in a browser, this URL will display the item in Box’s preview UI. If a custom URL is set this field will return the custom URL, but the original URL will also continue to work.

    Declaration

    Swift

    public let url: URL?
  • The “direct Link” URL to download the item. If entered in a browser, this URL will trigger a download of the item. This URL includes the file extension so that the file will be saved with the right file type.

    Declaration

    Swift

    public let downloadURL: URL?
  • The “Custom URL” that can also be used to preview the item on Box. Custom URLs can only be created or modified in the Box Web application.

    Declaration

    Swift

    public let vanityURL: URL?
  • The custom name of a shared link, as used in the vanityURL field.

    Declaration

    Swift

    public let vanityName: String?
  • The effective access level for the shared link. This can be lower than the value in the access field if the enterprise settings restrict the allowed access levels.

    Declaration

    Swift

    public let effectiveAccess: String?
  • Actual permissions that are allowed by the shared link, taking into account enterprise and user settings.

    Declaration

    Swift

    public let effectivePermission: String?
  • Whether the shared link has a password set.

    Declaration

    Swift

    public let isPasswordEnabled: Bool?
  • The date-time that this link will become disabled. This field can only be set by users with paid accounts.

    Declaration

    Swift

    public let unsharedAt: Date?
  • The number of times the item has been downloaded.

    Declaration

    Swift

    public let downloadCount: Int?
  • The number of times the item has been previewed.

    Declaration

    Swift

    public let previewCount: Int?
  • The access level specified when the shared link was created.

    Declaration

    Swift

    public let access: SharedLinkAccess?
  • Permissions for download and preview of the item.

    Declaration

    Swift

    public let permissions: Permissions?
  • Initializer.

    Throws

    Decoding error.

    Declaration

    Swift

    public required init(json: [String : Any]) throws

    Parameters

    json

    JSON dictionary.