Calling A Workfront API Using Postman

Introduction

This article shows how to call a Workfront API using Postman.

Postman lets you quickly test the API without building a Fusion scenario, so you can check the response and data easily.

If another application needs data from Workfront, it’s a good idea to test the API in Postman first before sharing the URL and credentials.

Steps

1.       Create an API key in Workfront:

·       Login to Workfront and navigate to Setup à Customer Info

·       After creation, API keys expire in” can be set to “None

·       Click on “Generate API key” to create a new key.

·       Save the key securely. It will be required for configuration in Postman

A screenshot of a computer

Description automatically generated

2.       Constructing the API URL:

·       We can get the Base URL using the scenario debugger, which we will cover in a separate KB document. For now, let's use the Base URL shown below.

o   Base URL: https://r100kazi29.testdrive.workfront.com/attask/api/v21.0/

·       We can get the resource path from API explorer: https://developer.adobe.com/workfront/api-explorer/

·       Let's retrieve the details of a project using its ID. Please refer to the screenshot: we've filtered by project, and under the "Fields" tab, we can see the relevant fields. Note that the object code is "PROJ"A screenshot of a computer

Description automatically generated

·       Now let’s construct the resource path of the API. Since we want to pull out all fields, we will use the first query parameter as “?fields = *”. Additionally, we need to search the project by ID and hence let us add the second query parameter as “ID=66f8f7b6001c98e378293ecdb6c00541”. This is the ID of the project that we are querying.

·       The final resource path will look like this. Note that the object code is followed by “search,” followed by the query parameters: “proj/search?fields=*&ID=66f8f7b6001c98e378293ecdb6c00541”

·       The final API URL will be a concatenation of Base URL and the Resource path:

https://r100kazi29.testdrive.workfront.com/attask/api/v21.0/proj/search?fields=*&ID=66f8f7b6001c98e378293ecdb6c00541

·       Now that we have constructed the API URL let us test it in Postman

·      Note: Always use the latest version of Workfront API. For example in this case we have use v21.0.

3.       Post man configuration:

·       Open Postman.

·       Click on the + icon to open a new untitled request tab.

A screenshot of a computer

Description automatically generated

·       Copy and paste the constructed API URL into the “Enter URL or paste” text box.

A screenshot of a computer

Description automatically generated

·       Open the Authorization tab and select the Auth Type as API Key. For the Key Type, type apiKey, and enter your API key value in the Value field. Under Add to, select Header.

A screenshot of a computer

Description automatically generated

·       Click on Send

·       You will find the API response under the Body tab.

A screenshot of a computer program

Description automatically generated

Comments

Popular posts from this blog

REST API Calls with Query Parameters in BizTalk: A Step-by-Step Guide

Error: Number of included segments do not match

Updating BizTalk SSO DB using BTDF and a simple BTDF deployment