This article describes how to create the connection component for the Workfront REST API using the HTTP Client connector. Workfront (formerly named AtTask) is a cloud-based Project Management application.
To make a RESTful call to Workfront, first you’ll need to obtain the Workfront API Key. More about the Workfront API Key can be found here: https://support.workfront.com/hc/en-us/articles/218484047-Managing-API-Keys-for-the-Workfront-System.
The Workfront API key will be used below in the HTTP Client Operation configuration to set an HTTP header value.
In this simple example, we will create a basic project in Workfront by specifying only the project name. In a real world scenario you will likely need to map to a project create request JSON document using a Map shape before sending to the Workfront. Be sure to familiarize yourself with How to Build a POST Request for a REST Endpoint with Replacement Variables for how to set HTTP Client operation replacement variables using dynamic document properties while also sending a document payload.
HTTP Client Connection
Next within AtomSphere you’ll need to create a new HTTP connection. The URL will depend on your Workfront tenant. Note the Authentication Type is set to None.
The connection information would look like this:
Our action is going to be a send on the HTTP connector.
HTTP Client Operation
Now we’ll go ahead and setup the operation. As a best practice, set the Return HTTP Errors and Return HTTP Responses options:
Create a Request Header named "apiKey" and configure it as a Replacement Variable. Set the Workfront API key obtained above as a process property and set it on the Connector shape's Parameter tab for the apiKey value. If you receive an error related to authorization, check to see that the API key is being correctly passed into the header.
Next we are going to configure the Resource Path to create a project. Remember that any parameters passed into the resource path need to be URL encoded to be transmitted correctly to Workfront:
When we save and close our connector, a successful test will return a JSON profile document from Workforce with the Project’s internal ID:
- Using the newer version of the WorkFront API should allow you to send formatted JSON to the API as Boomi documents. The format for that call is as follows: