Add large file version
OVERVIEW
Method to create a new version of a large file. Please refer to Add large file API method to understand the purpose of provide a large file upload method in addition to a file upload API method.
Step 1 :
Purpose
API method to obtain a progress key.
Request URL
GET /sites/{siteid}/documentprogresskey/
Sample request URL : https://domain.com/instancename/api/1/sites/2/documentprogresskey
rsxSEFlmFB_1423555822871
Step 2 :
Purpose
Call to add a version to an existing file
Resource(API) EndPoint | Query Params | Form Params | HTTP Method | Request XML |
Response XML |
Response Code |
---|---|---|---|---|---|---|
/files/{fileid}/content |
sourceclient={sourceclient} (optional) progressiveoperkey={documentprogresskey} (optional) |
filename={a string value}
|
POST | Response XML | Response Code |
Sample request URL : https://domain.com/instancename/api/1/files/122/content?progressiveoperkey=rsxSEFlmFB_1423555822871
Assumptions :
The API method supports an optional form data parameter called "notification" which is used for "notification" preference.
1 = Respect user preference
2 = Force email notification
3 = Suppress all notifications
The default value of notification parameter is 3
<file>
<fileid>122</fileid>
<status>INPROGRESS</status>
<documentKey>rsxSEFlmFB_1423555822871</documentKey>
</file>
Response Code
Code | Meaning |
---|---|
201 | Document's version uploaded successfully |
401 | Unauthorized |
403 | Validation failed/ Forbidden |
405 | Method not allowed (calling api with wrong method) |
500 | Internal error occurred while uploading document |
Step 3 :
Purpose
Once the file upload has been started using step 2, the following method is to be called to determine the status of the document being uploaded.
Resource(API) EndPoint | Query Params | Form Params | HTTP Method | Request XML |
Response XML |
Response Code |
---|---|---|---|---|---|---|
/sites/{siteid}/documentstatus/{documentkey} |
|
|
POST | Response XML |
Sample request URL : https://domain.com/instancename/api/1/sites/2/documentstatus/rsxSEFlmFB_1423555822871
<documentID>122</documentID>
<status>INPROGRESS</status>
<documentKey>rsxSEFlmFB_1423555822871</documentKey>
</ProgressiveDocResponse>
Once the upload has completed the following response will confirm the upload.
<ProgressiveDocResponse>
<documentID>122</documentID>
<status>Done</status>
</ProgressiveDocResponse>
Comments
0 Comments