How to Upload a File to

Document created by Rabia_Sozkesen Employee on Jun 13, 2017Last modified by Adam Arrowsmith on Jan 9, 2018
Version 6Show Document
  • View in full screen mode

This article describes how to connect and upload files to using HTTP Client Connector with OAuth2.0 authentication.


As of September 2017, the Box connector is the recommended approach for integrating with Please see September 2017 Release Deep Dive: Box Connector.



Use Case

You want to upload an arbitrary file to



The approach will use the HTTP Client connector to interact with the REST API and upload a sample file to While doing so we will configure the necessary OAuth 2.0 settings in the same fashion with How to Connect to with OAuth 2.0 article.  


  1. Create HTTP Connection in boomi for upload operation.

  2. Define the file meta data and file content by using message shape.

  3. Format the HTTP request in accordance with API documentation

  4. Execute the process and validate the result



The following steps detail how to deploy a process using the AtomSphere HTTP Client Connector when connecting to’s REST API:


1) Follow How to Connect to with OAuth 2.0 in order to create HTTP connection. Please be aware that upload file for has a different base URL which is . 



2) Create a sample process that starts with No Data option then add a message shape. Message shape can be utilized to create and define the file description. For example:


Content-Disposition: form-data; name="metadata"

Content-Disposition: form-data; name="file"; filename="helloWorld.txt"
Content-Type: text/plain



Here the file name and parent folder id needs to be passed as a JSON object in metadata section as per API Upload operation:




 parent id=0 means that the file will be uploaded to the root folder. You should use the folder id as the parent id value if you're trying to upload the document to a specific folder. Folder id can be found in the URL. For example if you open a folder in the URL will look like below: 


Where "12345678901" is the folder/parent ID. 


3) Once the message shape is configured, add a Data Process shape in order to add a carriage return. This step might change or might not be needed depending on your file:

Search/Replace function

Text to Find: [\n] 

Replace With: [\r][\n]


4) Configure HTTP Client Connector Operation with below parameters: 


Content Type: multipart/form-data; boundary="simpleboundary"

Resource Path: files/content



A successful attempt would return application status code 201. Because Return HTTP Errors box is checked in the Operation, add a decision shape in order to check the returned Application Status Code document property. Here is how the Decision shape should be configured:


First Value: Document Property - Base - Application Status Code

Comparison: Equal To

Second Value: 201


Connect these shapes to each other like shown below: 


Execute your process. 


4) A successful post would result in a JSON response document in below format. The response should contain the new file's id:

"total_count": 1,
"entries": [
"type": "file",
"id": "185599578603",
"file_version": {
"type": "file_version",
"id": "196694744811",
"sha1": "4b68507f1746b0e5f3efe99b8ef42afef79da017"
"sequence_id": "0",
"etag": "0",
"sha1": "4b68507f1746b0e5f3efe99b8ef42afef79da017",
"name": "helloWorld.txt",
"description": "",
"size": 11,
"path_collection": {
"total_count": 1,
"entries": [
"type": "folder",



The complete JSON response can be found here


Login to and verify that your file has been uploaded. 


1 person found this helpful