Make an API call

Tags: Flow

Use this article to understand the process to make your first API request with a REST client, like Postman. You access the Customer API through this client, then pass in or specify your parameters. Here, we’ll use a simple example of requesting a subset of user records.

Note: Depending which client you use to make your API call, your steps may look slightly different, but the process is the same.

First, let's make sure you have the necessary prerequisites:

  • Make sure you've imported at least one repo that contains data. As a test, see if you can access any of the Flow reports. If you cannot see the reports, your ability to access meaningful data via the API will be limited.
  • Make sure you have permissions to access the API. To verify, log into Flow, click Settings then Users. Locate and click your user. Click the Access tab then make sure at least one of the APIs listed in the API Access section has a check next to it. Learn more about API permissions.
  • Make sure you have an API key. Learn more about authentication and managing API key access.

Let's start with your first API call.

  • In Postman or another client, enter your API URL. In this example we’ll use:
    • This will call the Users API, which lists Flow users.

    • We added the limit parameter and set the limit to three so only the first three user records are called.

  • Click Send.
  • This should return the first three users from Flow.
    • You should receive a 200 OK status along with your response. This indicates the request was successful.
    • If you don't receive the expected result or receive a status other than 200 OK, confirm your URL, permissions, and API key, then try again.

That’s it. You've made your first API call.

This is a very simple example of a request you can make in the Flow API. Advanced features, such as traversing objects and aggregating data that allow you to customize your results, are also available.

back to top

If you need help, please contact Pluralsight Support.