A singleton class that is used to interface to the Vault server and the methods here help to issue requests and process responses.
More...
Inherits NSObject.
A singleton class that is used to interface to the Vault server and the methods here help to issue requests and process responses.
VEVVaultAPI provides both convenience methods that closely correspond to the Vault REST API Documents module as well as more general methods that can be used to access any arbitrary Vault REST API endpoint.
Background Uploads
Some of the VEVVaultAPI methods wrap Vault's document upload endpoints. These methods fully support iOS background uploading as described in URL Session Programming Guide. In order to enable this in your application you must implement UIApplicationDelegate:application:handleEventsForBackgroundURLSession:completionHandler: and forward all parameters to application:handleEventsForBackgroundURLSession:completionHandler: (VEVSDKApplicationDelegate).
- See also
- - application:handleEventsForBackgroundURLSession:completionHandler: (VEVSDKApplicationDelegate)
-
UIApplicationDelegate:application:handleEventsForBackgroundURLSession:completionHandler:
-
URL Session Programming Guide.
-
https://developer.veevavault.com/docs/#rest-api
◆ requestVaultEndpoint:vault:method:parameters:parameterEncoding:completionHandler:()
Sends a request to a specific Vault endpoint. This method can be used to invoke any REST endpoint generically. If no other wrapper or helper method exists for a specific REST endpoint, this method can be used.
- Parameters
-
endpoint | The Vault endpoint to send the request to. The endpoint must only include the portion of the endpoint URL that identifies the endpoint itself, e.g., objects/documents rather than https://myvault.com/api/v18.2/objects/documents . |
vault | The specific Vault to send the request to. |
method | The HTTP request method used in the request. |
params | The parameters to be encoded and included with the request. Must either be an NSDictionary or an NSArray . |
encoding | The encoding used for params. |
completionHandler | The callback that is invoked after completing the request. |
- See also
- VEVVaultAuth
◆ requestVaultMultipartFormEndpoint:vault:fileURL:isEncrypted:method:parameters:progressHandler:completionHandler:()
Issues a request with a file to a specific Vault endpoint.
- Parameters
-
endpoint | The Vault endpoint to send the request to. |
vault | The specific Vault to send the request to. |
fileURL | The absolute file path of the local file to upload represented as a file URL. The maximum file size that can be uploaded is 256 MB. |
isEncrypted | Pass in YES if the local file has been encrypted with createEncryptedFileAtPath:contents:attributes:error: (VEVVaultCrypt), otherwise NO . |
method | The HTTP request method used in the request. |
params | The parameters to be encoded and included with the request. Must either be an NSDictionary or an NSArray . |
progressHandler | The callback that is invoked each time a chunk of data is uploaded to the Vault server. |
completionHandler | The callback that is invoked after completing the request. |
- See also
- VEVVaultAuth
-
VEVVaultCrypt
◆ requestVaultDownloadFileEndpoint:vault:fileURL:encrypt:parameters:progressHandler:completionHandler:()
Issues a request to a Vault file download endpoint, e.g., objects/documents/2468/renditions/viewable_rendition__v.
- Parameters
-
endpoint | The Vault endpoint to send the request to. |
vault | The specific Vault to send the request to. |
fileURL | The absolute file path of the local file location to down to. |
encrypt | Pass in YES in order to encrypt the the downloaded file with createEncryptedFileAtPath:contents:attributes:error: (VEVVaultCrypt), otherwise NO . |
params | The parameters to be encoded and included with the request. Must either be an NSDictionary or an NSArray . |
progressHandler | The callback that is invoked each time a chunk of data is downloaded from the Vault server. Currently this is unsupported but is reserved for future use. |
completionHandler | The callback that is invoked after completing the request. |
- See also
- VEVVaultAuth
-
VEVVaultCrypt
◆ setBackgroundUploadResultHandler:()
Sets the background callback to be invoked in the event an upload completes following a crash and subsequent restart by iOS.
- See also
- VEVSDKApplicationDelegate::application:handleEventsForBackgroundURLSession:completeHandler and NSURLSession Programming Guide.
◆ setBackgroundDownloadResultHandler:()
Sets the background callback to be invoked in the event a download completes following a crash and subsequent restart by iOS.
- See also
- VEVSDKApplicationDelegate::application:handleEventsForBackgroundURLSession:completeHandler and NSURLSession Programming Guide.
◆ createDocumentWithFields:vault:completeHandler:()
Creates a Vault document without any associated content file, e.g., a placeholder document.
- Parameters
-
fields | The dictionary of field value pairs that specify the field values for the newly created Vault document object. See Create Single Document for details about what may be specified in fields . |
vault | The Vault to create the document object on. |
cHandler | The callback that is invoked after the document object is successfully created or fails. It is always invoked on the main thread. |
- See also
- VEVVaultAuth
◆ createDocumentWithFields:vault:fileURL:fileIsEncrypted:progressHandler:completeHandler:()
Uploads a locally stored file to a new Vault document object.
- Parameters
-
fields | The dictionary of field value pairs that specify the field values for the new Vault document object. See Create Single Document for details about what may be specified in fields . |
vault | The Vault to create the document object on. |
fileURL | The absolute file path of the local file to upload represented as a file URL. |
isEncrypted | Pass in YES if the local file has been encrypted with createEncryptedFileAtPath:contents:attributes:error: (VEVVaultCrypt), otherwise NO . |
pHandler | The callback that is invoked each time a chunk of data is uploaded to the Vault server. It is always invoked on the main thread. |
cHandler | The callback that is invoked after the document object is successfully created or fails. It is always invoked on the main thread. |
- See also
- VEVVaultAuth
-
VEVVaultCrypt
◆ updateDocument:fields:vault:completeHandler:()
Updates a Vault document.
- Parameters
-
documentId | The Vault document ID of the document. |
fields | The dictionary of field value pairs that specify the updated field values for the Vault document object. |
vault | The Vault on which the document resides. |
cHandler | The callback that is invoked after the document object is successfully updated or fails. It is always invoked on the main thread. |
- See also
- VEVVaultAuth
◆ updateDocument:fields:vault:fileURL:fileIsEncrypted:progressHandler:completeHandler:()
Uploads a locally stored file to an existing Vault document object, e.g., a placeholder document.
- Parameters
-
documentId | The Vault document ID of the document. |
fields | The dictionary of field value pairs that specify the updated field values for the Vault document object. |
vault | The Vault on which the document resides. |
fileURL | The absolute file path of the local file to upload represented as a file URL. |
isEncrypted | Pass in YES if the local file has been encrypted with createEncryptedFileAtPath:contents:attributes:error: (VEVVaultCrypt), otherwise NO . |
pHandler | The callback that is invoked each time a chunk of data is uploaded to the Vault server. It is always invoked on the main thread. |
cHandler | The callback that is invoked after the document object is successfully updated or fails. It is always invoked on the main thread. |
- See also
- VEVVaultAuth
-
VEVVaultCrypt
◆ getDocument:vault:completeHandler:()
Retrieves document metadata for the specified document on Vault.
- Parameters
-
documentId | The Vault document ID of the document. |
vault | The Vault where the document exists. |
cHandler | The callback that is invoked after retrieving the document information from Vault. |
- See also
- VEVVaultAuth
◆ getDocumentType:vault:completeHandler:()
Retrieves document metadata for the specified document type.
- Parameters
-
name | The name of the document type on Vault. name must be one of the top-level of the document type/subtype/classification hierarchy. See Retrieve Document Type. |
vault | The Vault where the document type exists. |
cHandler | The callback that is invoked after retrieving the document type metadata from Vault. |
- See also
- VEVVaultAuth
-
◆ getDocumentProperties:vault:completeHandler:()
Retrieves document properties for the specified document on Vault.
- Parameters
-
documentId | The Vault document ID of the document. |
vault | The Vault where the document exists. |
cHandler | The callback that is invoked after retrieving the document properties from Vault. |
- See also
- VEVVaultAuth
◆ query:completeHandler:()
Executes a VEVVaultServerQuery on a Vault.
- Parameters
-
request | The request to execute. |
cHandler | The callback that is invoked after executing the query. |
- See also
- VEVVaultAuth
The documentation for this class was generated from the following file: