Endpoint
https://\{instance}.salesforce.com/services/apexrest/cg/SDrive/files
...
POST
Request Body Parameters
objectId : Id of the parent object this file will be uploaded to
Type: string
multipartUpload : Do multipart Upload, used for big files(currently unavailable)
Type : Boolean
fileType : File Object the new files will be uploaded as.
Type: string
fileProperties : JSON array of file metadata of the uploaded files.
Type: fileProperty[]
policyMap : Key value pairs that represent the additional policy parameters used during upload
Type: string[]
Response Body Parameters
uploadRequestInfo : JSON object that details how to upload a file to Amazon S3
Type: uploadRequestInfo[]
Status Codes
201 - Object properly created
403 - Wrong input formatting
404 - False objectId
406 - Invalid input
412 - Missing input fields
422 - Wrong input semantics
Usage
Use POST to initiate an upload. Creates File Object records on S-Drive. Follow it by uploading the files using the data in uplodRequestInfo to Amazon S3 then finish with the PUT methodPUT
Request Body Parameters
wipIds : JSON array of Salesforce ids that have completed their uploads to Amazon S3.
Type: string[]versionIds(Optional) : JSON array of AWS S3 version ids ids that have completed their uploads to Amazon S3.
Type: string[]
Response Body Parameters
resultObjects : JSON object that details the status of each file's upload request.
Type: resultObject[]
Status Codes
200 - Upload complete
403 - Wrong input formatting
404 - False wipIds
422 - Wrong input semantics
Usage
Done after the POST method and uploading files to the correct location in Amazon S3.DELETE
Request Query Parameters
objectId : Id of the parent object.
wipId : Salesforce id of the object that will be deleted from S-Drive and Amazon S3.
Response Body Parameters
resultObjects : JSON object that details the status of each file's delete request.
Type: ResultObject[]
Status Codes
200 - Object deleted
403 - Wrong input formatting
404 - False objectIds
422 - Wrong input semantics
Usage
Deletes the File from Amazon S3 then removes the file record from Salesforce