Creating 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 create a file field that contains a large file for existing activity nodes, use the 2-Phase upload API. This API has been enabled since Connections SC Oct 2014 release.

To create a file field that contains a large file for an existing activities node, such as an entry or to-do item, post the file content by the 2-Phase upload API. The API only supports single file uploads. If you want to upload more than one file, you will have to go through the upload process for each file.

The 2-Phase upload API is used for large file uploading. 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
POST /activities/service/atom2/activity The URI for the 2-Phase request.
Name Type Optional Description
string No The UUID of the activity node in which you create a file field. Can be found in the <id> element of the activity node entry.
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 created 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.