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
Open Postman:
- Launch Postman and open your Workspace
Import OpenAPI Document:
- Click on the Import button in the top-left corner of Postman.
- Select Link in the Import pop-up.
Enter the OpenAPI URL:
Confirm Import:
- Postman will recognize this as an OpenAPI document.
- Click Import to add the API endpoints to your workspace.
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).
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.
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
Copy cURL Command:
- Copy the cURL command below:
--header 'Authorization: ••••••'
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.
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.
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.
Send the Request:
- Click Send to execute the request and view the response.