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:
https://flow.pluralsight.com/v3/customer/core/users/?limit=3
-
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.
- You should receive a
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. Also take advantage of advanced features, such as traversing objects, filtering requests, and aggregating data that allow you to customize your results.