Post new task.

Task definition: execution of Dynamo application template (DAP) with parameters.

URI

POST: /v1/task

Success response

If post response code is 202 it means that the post has been accepted for processing, but the processing has not been completed.

Post using DAP file from Salesforce

Salesforce integration using template parameter (Salesforce Content Document ID of DAP file).

Parameters can be defined using key value pairs within params object.

{ 
  "template": "contentDocumentID", 
  "params": {
    "id": "recordID"
  },
  "integration": { 
    "type": "Salesforce", 
    "sessionID": "sessionID", 
    "serverURL": "serverURL"
  }  
}

Post using embedded DAP

If DAP is passed within the post request, a multi part request must be posted.

POST /v1/task HTTP/1.1
Host: dynamo-api.documill.com
Content-Type: multipart/form-data;boundary="boundary"

--boundary
Content-Disposition: form-data; name="template"; filename="example.dap"
Content-Type: application/octet-stream

-- binary data --
--boundary
Content-Disposition: form-data; name="data";
Content-Type: application/json

{
  "params": {
    "id": "recordID"
  },
  "integration": { 
    "type": "Salesforce", 
    "sessionID": "sessionID", 
    "serverURL": "serverURL"
  } 
}
--boundary--

Posting additional JSON part

It is possible to post additional parameters as separate JSON parts in the multipart request. JSON part’s Content-Disposition name value must specify the parameter name “param.paramName“.

--boundary
Content-Disposition: form-data; name="param.additionalData";
Content-Type: application/json

{
  "data1": "abc",
  "data2": {
    "data3": "xyz"
  }
}
--boundary--

Success Response

Response includes task id and informative message.

{ 
  "taskID": "t-223e5458ec7f9a57802e3e31deba48cb", 
  "message": "Success" 
}