Updating a large file field for activity nodesSince 10/2014
Added by wiki wiki | Edited by Xiaofeng Zhang on May 9, 2016
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To update a file field that contains a large file for activity nodes, use the 2-Phase upload API. This API has been enabled since the Connections SC October 2014 release.

To update a file field that contains a large file for activity nodes, post the file content using the 2-Phase upload API. This will replace the file field with a new file.

The 2-Phase upload API is used for uploading large files. The API is based on existing API entry URLs, but it involves some special headers and request parameters. The generated response codes are the same codes that are found in previous APIs.


Phase 1

Initialize an upload session



Input format depends on the file content type that will be sent. The request should not put the file content in the request body.

Note: application/atom+xml and multipart are not supported.



A response that contains the header that is used in Phase 2.


Phase 2

Upload the file content.



Input format is file-in-body. The request body is the file content.




Method URI Description
PUT /activities/service/atom2/activitynode The URI for the 2-Phase request.
Name Type Optional Description
string No The UUID of the file field you will update. Value of fid attribute of the <snx:field> element of the file field.
Name Type Optional Description
string No This is required when performing both requests. It identifies the request you are making as a 2-Phase request.
string No Indicates the size of the file. This is required in the Phase 1 request.
string No The value is the token got in Phase 1. This is required in the Phase 2 request.
string Yes Specify the field name of the file, this is optional in the Phase 2 request.
Name Type Optional Description
string No This token is returned from Phase 1 request. It is needed in the Phase 2 request.
Code Description
Return from Phase 1 request to indicate the request was received successfully.
Return from Phase 2 request to indicate the file was updated successfully.
Bad Request.
Forbidden. The server refuses to fulfill a request, typically because the request was for an object that you don't have permission to access or the file uploaded contains virus or not permitted content.
Not Found.
Indicate the request body too large or the file size exceeded the limit.
Indicate the file type is not supported.