Connect ۶Ƶ Workfront Fusion to a web service that uses API token authorization
Some services do not allow integration solutions such as ۶Ƶ Workfront Fusion to create an app that you can easily use in your scenario.
There is a workaround to this situation. You can connect the desired service (app) to Workfront Fusion using Workfront Fusion’s HTTP module.
This article explains how to connect almost any web service to Workfront Fusion using an API Key/API token.
Access requirements
You must have the following access to use the functionality in this article:
To find out what plan, license type, or access you have, contact your Workfront administrator.
For information on ۶Ƶ Workfront Fusion licenses, see ۶Ƶ Workfront Fusion licenses.
Connect to a web service that uses an API token
The procedure of connecting the service via an API token is similar for most web services.
- Create an application on the web service’s website, as explained in the section Create a new application and obtain the API token in this article.
- Obtain the API Key or API token.
- Add Workfront Fusion’s HTTP > Make a Request module to your scenario.
- Set up the module according to the web service’s API documentation and running the scenario, as explained in the section Set up the HTTP module in this article.
Create a new application and obtain the API token
- Log in to your Pushover account.
- Click Create an Application/API Token at the bottom of the page.
- Fill in the Application Information and click Create an Application.
- Store the provided API token in a safe place. You will need it for the Workfront Fusion HTTP >Make a Request module to connect to the desired web service (Pushover, in this case).
Set up the HTTP module
To connect a web service to your Workfront Fusion scenario, you need to use the HTTP >Make a request module in the scenario and set up the module according to the web service’s API documentation.
-
Add the HTTP >Make a Request module to your scenario.
-
To push a message using Workfront Fusion, set up the HTTP module as follows.
note note NOTE These module settings correspond to the Pushover web service API documentation. Settings may be different for other web services. For example, the API token may be inserted to the Header and not to the Body field. table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 layout-auto html-authored no-header URL https://api.pushover.net/1/messages.json
The URL field contains the endpoint that you can find in the web service's API documentation.
Method POST
The used method depends on the corresponding endpoint. The Pushover endpoint for pushing messages uses the POST method.
Headers Some web services may use Headers to specify the API token authentication or other parameters. This is not the case in our example as the Pushover's endpoint for pushing messages uses Body (see below) for all request types. Query String Some web services may use a Query String to specify other parameters. This is not the case in our example as the Pushover web service uses Body (see below) for all request types. Body Type Raw
This setting allows you to select the JSON content type in the Content Type field below.
Content Type JSON (application/json)
JSON is the required content type by the Pushover app. This may differ from other web services.
Request Content Enter the Body request content in the JSON format. You can use the JSON > Create JSON module as explained in JSON Body Mapped Using the JSON > Create JSON module in this article. Or you can enter the JSON content manually, as explained in JSON Body Entered Manually in this article.
See the web service's API documentation for the required parameters for that web service.
JSON Body Entered Manually
Specify parameters and values in the JSON format.
code language-none |
---|
|
JSON Body Mapped Using the JSON >Create JSON module
The Create JSON module makes the specifying JSON easier. It also gives you the possibility to define values dynamically.
For more information about the JSON modules, see JSON modules.
-
Enter or map the values you want to create JSON from.
-
Connect the JSON > Create JSON module to the HTTP > Make a Request module.
-
Map the JSON string from the Create JSON module to the Request content field in the HTTP >Make a Request module.
Now when you run the scenario, the push notification is sent to the device that has been registered in your Pushover account.