Skip to main content

Postman Collection

This document provides a guide on how to use the Postman Collection for the Investigate API. You can access the collection here:

Run In Postman

Although you can view the collection without an Investigate account, you'll need to set up your credentials in Postman to make API requests. This guide will walk you through that process.

Forking the Collection​

When you click on the "Run In Postman" button, it will automatically ask you to fork the collection. Forking allows you to have a copy of the collection in your own Postman workspace, where you can make changes and edits without affecting the original collection.

After forking, you can make any changes you want to the collection. If there are updates to the original collection, you can pull these changes into your forked collection. This allows you to keep your collection up-to-date with the original, while maintaining your own customizations.

To pull updates from the original collection:

  1. Open your forked collection in Postman.
  2. Click on the '...' (more actions) button at the top right of the collection.
  3. Select 'Pull changes'.
  4. If there are updates, you'll be able to pull them into your collection.

Remember, each time you pull updates, any changes in the original collection will be merged with your forked collection. So, you'll have the latest updates from the original, along with your own changes.

Setting up your environment​

You'll need to set up your environment in Postman to make requests to the Investigate API. This involves importing the API collection and setting up your credentials.

  1. Open your forked Investigate API collection in Postman.

  2. On the environments tab, click on the plus icon to create a new environment. An environment in Postman contains variables that you can use in your requests.

    You can also directly import the environment from: Postman Environment

  3. Add the following variables to the environment in the Current value column:

    • client_id: your-client-id
    • client_secret: your-client-secret
    • username: your-username
    • password: your-password

    Make sure you save the environment with the updated values.

  4. Make sure you select the environment you just created in the top right corner of Postman. This tells Postman to use the variables you just set up in your requests.

Making requests​

Once you've set up your environment, you can start making requests to the Investigate API. Here's how:

  1. Open Postman and go to the 'login' folder in the Investigate API collection. This folder contains three authentication endpoints: two for a mock server(Current and Next features) and another for a real server.
  2. Select one of the endpoints in the 'login' folder. This will open up the request details.
  3. Click the 'Send' button to make a request. If your environment is set up correctly, all other endpoints in the Investigate API collection will now be available for you to use.

Remember, each endpoint in the API may require different parameters or body content. Be sure to check the documentation for each endpoint to understand what is required.

tip

Use "Mock Next" login to access features still in development. This connects to https://mock-investigate-api.gbgplc.com/next which uses "next" swaggerhub version https://app.swaggerhub.com/apis/GBGPLC/Investigate/next.

Troubleshooting​

If you're having trouble making requests, here are a few things to check:

  • Environment Variables: Make sure your client_id, client_secret, username, and password are correct and saved in your Postman environment. They need to be in the Current value column.
  • Selected Environment: Ensure that the correct environment is selected in Postman.
  • Login Request: If other endpoints are not available, make sure you have successfully made a request to an endpoint in the 'login' folder. This will authenticate your session and make other endpoints available.