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.

  1. 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.
  2. Obtain the API Key or API token.
  3. Add Workfront Fusion’s HTTP > Make a Request module to your scenario.
  4. 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.
NOTE
This example connects to the Pushover notification service.

Create a new application and obtain the API token

NOTE
There are many different ways that web services create and distribute API keys or API tokens. For instructions on obtaining an API key and token for your desired web service, go to the service’s website and search for “API key” or “API token.”
We are including instructions for obtaining a Pushover API key only as an example of what you might find.
  1. Log in to your Pushover account.
  2. Click Create an Application/API Token at the bottom of the page.
  3. Fill in the Application Information and click Create an Application.
  4. 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.

  1. Add the HTTP > Make a Request module to your scenario.

  2. To push a message using Workfront Fusion, set up the HTTP module as follows.

    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.
    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.

    HeadersSome 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 StringSome 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 Map the JSON body using the JSON > Create JSON module in this article. Or you can enter the JSON content manually, as explained in Enter the JSON body manually in this article.

    See the web service's API documentation for the required parameters for that web service.