Your First API Calls

Embarking on your journey with the Productboard API starts with creating an API token, as detailed previously. If you require a sandbox environment for testing and exploration, initiate a new trial here, active for two weeks. For trial extensions, please contact your account manager or reach out to [email protected].

Once equipped with an API token and workspace access, you can start sending requests to the Productboard API using tools like cURL or Postman. Alternatively, explore the API's capabilities directly through the UI documentation on different endpoints.

Beginning with cURL

cURL, a command-line utility for data transfer, is an excellent tool for API testing. It's straightforward to use, though it lacks a graphical interface like Postman. For comprehensive cURL documentation, visit here.

Installing cURL

  • MacOS: Typically comes with cURL pre-installed, but if needed, it can be obtained here.
  • Windows 10 and Newer: Installation can be done here.

Your First API Call with cURL

  1. Open your terminal or command line.
  2. Use the following cURL request template, replacing <insert API token here> with your actual API token:
curl --location --request GET '<https://api.productboard.com/products'>  
--header 'X-Version: 1'  
--header 'Authorization: Bearer <insert API token here>'
 

Execute it by pressing enter. A successful response will be structured like the following example:

{  
  "data": [  
    {  
      "id": "00000000-0000-0000-0000-000000000000",  
      "name": "Zlack Messaging App",  
      "description": "<p>Custom <s>branding</s> for the agent and user portals.</p>",  
      "owner": {  
        "email": "[email protected]"  
      },  
      "links": {  
        "self": "https://api.productboard.com/products/00000000-0000-0000-0000-000000000000",  
        "html": "https://space.productboard.com/feature-board/planning/features/00000000-0000-0000-0000-000000000000"  
      },  
      "createdAt": "2022-12-30T06:38:36.406002Z",  
      "updatedAt": "2022-12-30T06:38:36.406002Z"  
    }  
  ],  
  "links": {  
  "next": "<https://api.productboard.com/entity?pageLimit=100&pageOffset=100">  
  }  
}

Congratulations on making your first API call to Productboard! Modify the endpoint in the cURL request (e.g., https://api.productboard.com/features) to explore different components or features. To POST data, add a --data-raw line with your JSON payload after the final --header.

Postman

Postman is a comprehensive, user-friendly tool for building and testing APIs. It allows for saving and managing API requests efficiently.

Getting Started with Postman

  1. Sign up here.
  2. Postman can be used directly in your browser or downloaded from here.

Making Your First API Call in Postman

  1. After signing up and logging in, click here.
  2. Fork the Productboard API collection by clicking on Fork Collection, then modify the fork label and workspace name as desired.
  3. Add your API token in the variables section of the Collection under Current Value and save.

  1. Navigate to Productboard API Collection > Products > List all products and hit Send. The response will display your product details.

You've now successfully used Postman to call Productboard's API!

Path Variables and Query Parameters

Other API calls might require path variables or query parameters:

  • Path Variables: Used within the URL to specify entities (e.g., /features/{featureId}). In Postman, add curly braces {} in the URL for path variables and set their values in the "Params" tab.
  • Query Parameters: Appended to the URL to filter or modify the request (e.g., /features?status.name=Planned). These key-value pairs are separated by an ampersand (&).
    Both path variables and query parameters can be seamlessly integrated into your API usage across different applications or services, just as in Postman or cURL.