Using Hiboo API with Postman

Set up Postman to efficiently test and explore the Hiboo API with automated authentication.

What You'll Achieve

By the end of this guide, you'll have:

  • A fully configured Postman collection with all Hiboo API endpoints

  • Automatic token management (no manual copy-paste)

  • Pre-configured environment variables

  • Working authentication flow

Alternative Tools: This guide focuses on Postman, but you can use similar tools like Insomnia or Hoppscotch with the same OpenAPI file.

Step 1: Download Required Files

  1. Download our OpenAPI specification: openapiv2.yml

  2. Install Postman: Download here or use the web version

Step 2: Import the API Collection

  1. Open Postman and click "Import"

    Import button in Postman
  2. Upload the OpenAPI file and select "Postman Collection"

    Choose Postman collection option
  3. Verify import - You should see "Hiboo API" collection in your sidebar

Step 3: Configure Authentication Variables

  1. Prepare your API Credentials, if you have no API credential, go to the Hiboo API, you will be able to define an apiName and an apiKey will be generated.

  2. Open collection settings by clicking on your collection name → Variables tab

  3. Create these three variables:

    Collection variables configuration
    Variable Name
    Initial Value
    Current Value
    Description

    x-access-token

    (leave empty)

    (leave empty)

    Auto-updated after login

    apiName

    (leave empty)

    your-api-name

    Your API account name generated in 1.

    apiKey

    (leave empty)

    your-api-key

    Your API key generated in 1.

    Security Note: Only set the "Current Value" for apiName and apiKey. Be careful before setting "Initial Value" for sensitive data (See Postman documentation for more details).

  4. Save your variables

Step 4: Set Up Collection-Level Authentication

  1. Go to Authorization tab in your collection settings

  2. Select "API Key" and configure:

    • Key: x-access-token

    • Value: {{x-access-token}}

    • Add to: Header

    Collection authentication setup

Step 5: Configure Automatic Login

  1. Find the /login endpoint in your collection

  2. Set up the request body with your variables:

    {
      "name": "{{apiName}}",
      "apiKey": "{{apiKey}}"
    }
    Login request body configuration
  3. Add the auto-token script in the Tests tab:

    // Auto-update token after successful login
    if (pm.response.code === 200) {
        const responseData = pm.response.json();
        pm.collectionVariables.set("x-access-token", responseData.token);
        console.log("Token updated successfully");
    } else {
        console.log("Login failed:", pm.response.text());
    }
    Login post-request script

Step 6: Test Your Setup

  1. Execute the login request by clicking Send

  2. Verify success - You should see a response like:

    {
      "id": 42,
      "email": "[email protected]",
      "admin": false,
      "firstName": "John",
      "lastName": "Doe",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
    }
  3. Check token was saved - Look in your collection variables; x-access-token should now have a value

  4. Test an authenticated endpoint:

    • Open /v2/fleet/equipments

    • Ensure Authorization is set to "Inherit auth from parent"

    • Click Send

    Inherit authentication setting
  5. Verify API response:

    Successful API request test

Last updated

Was this helpful?