Using Postman to test the News API

About

If you are looking for a quick and straightforward way of testing the News API and familiarizing with its various endpoints and parameters, you may want to consider our Postman integration (in addition to our Interactive Documentation and our Query Builder).

Postman is a suite of tools for testing, building and documenting APIs which can be downloaded for free from here.

Once you've downloaded and installed Postman, follow the steps below to get up and running with the News API:

Step 1

Before starting, make sure you have created a News API account and have access to your App ID and Key. Click here to create a free account.

Step 2

Open Postman, and click on the Import button on the top left corner:

Opening the import dialog

Step 3

In the Import dialog, click on the Import From Link button and paste the following URL into the input box:

https://newsapi.aylien.com/swagger/spec/news-api.json
Importing the News API schema

Click on Import.

Step 4

Once the schema is imported, you should be able to see a new collection on the left hand side:

Selecting endpoints and adding headers

From here you can select an endpoint, for instance Stories > List Stories and start configuring your request.

Adding your API credentials

The first step is to add your App ID and Key by clicking on Headers. This will reveal two fields X-AYLIEN-NewsAPI-Application-ID and X-AYLIEN-NewsAPI-Application-Key where you can add your credentials.

Step 5

After you've added your credentials, you can configure your request and set its parameters by clicking on Params. Doing so reveals all the available parameters for any endpoint, allowing you to view or edit any of the parameters:

Configuring your request

Once you're finished, click on Send to submit the request and retrieve the results in JSON format in the box below.