Import and Authenticate Avianis API Requests in Postman

Import and Authenticate Avianis API Requests in Postman

Here’s a step-by-step guide to importing the Avianis OpenAPI URL and generating a call in Postman using Basic Authentication, as well as importing and modifying a cURL request.


Section 1: Import the Avianis OpenAPI URL into Postman

  1. Open Postman:

    • Launch Postman and open your Workspace
  2. Import OpenAPI Document:

    • Click on the Import button in the top-left corner of Postman.
    • Select Link in the Import pop-up.
  3. Enter the OpenAPI URL:

  4. Confirm Import:

    • Postman will recognize this as an OpenAPI document.
    • Click Import to add the API endpoints to your workspace.
  5. Select an Endpoint:

    • In the left sidebar, navigate to the newly imported API and expand it to see the available endpoints.
    • Select the endpoint you’d like to test (e.g., GET /connect/v1/flightleg).
  6. Set Up Basic Authentication:

    • Once on the endpoint page, go to the Authorization tab.
    • Set Type to Basic Auth.
    • Enter your Username and Password.
    • Postman will handle the base64 encoding of credentials automatically.
  7. Send the Request:

    • Click Send to execute the request.
    • View the response in the Response pane to confirm the API call was successful.

Section 2: Import cURL Request and Update Authentication

  1. Copy cURL Command:

    • Copy the cURL command below:
    1. --header 'Authorization: ••••••'

  1. Import cURL into Postman:

    • Open Postman and click the Import button.
    • In the Import pop-up, select Raw Text.
    • Paste the cURL command and click Continue.
  2. Review and Import Request:

    • Postman will recognize the cURL format and convert it into a Postman request.
    • Click Import to add it to your workspace.
  3. Update Authorization Header:

    • Go to the Authorization tab of the imported request.
    • Select Basic Auth from the Type dropdown.
    • Enter your Username and Password for authentication.
  4. Send the Request:

    • Click Send to execute the request and view the response.