Visualizing Postmanauts Across the Globe
Number of APIs: 14
Qodex is global company that has [20 million users] and Qodexauts (Qodex employees) that live and work world wide 🌎🌍🌏.
The inspiration behind this collection is to use Qodex to visualize Qodexauts from the DevRel team on a global map.

The Qodex DevRel team members that are mapped are : @iandouglas736,@poojamakes @DevRelSean,@arlemi,@jansche,@PetuniaGray,@DevRelKev
Give us all a follow or or use this collection to find other twitter users in your network to visualize!
API's Used in this Collection:
- [Twitter User Lookup API]
- Position Stack API
- OpenWeather API
Overview:
This collection is created to show how one can use Qodex to visualize Twitter users around the world. It uses the [Twitter API- user by username] to get each users location, then uses Position Stack API to get longitude and latitude of their location to map it onto a JavaScript D3 visualization map framework using the [Visualizer API] The OpenWeather API is used to get weather information based on longitude and latitude.
There are thee folders in this collection. Each of these three folders visualize twitter users and their weather data globally however, each folder shows how you can optimize your logic by using [pre-request] , [test scripts] and [request workflows] to achieve similar results. With Qodex, there are multiple ways to achieve similar results. The whole idea behind this collection is to show the various ways developers can use Qodex to work with multiple APIs and build Visualizations
Workflow:

Variable with Twitter Usernames → Twitter API → Output: Object with Twitter Names and Twitter Location Data → PositionStack API → Convert Location to Longitude & Latitude → Output: Object with Longitude and Latitude → OpenWeather API → Use Longitude & Latitude to get Weather Data → Output: Object with Weather → Qodex Echo API → Output: Name, Location, Longitude, Latitude & Weather for each user to visualize
Quickstart:
To get started with this collection
- Fork this collection into your own workspace.
- Get Twitter bearer token and add
bearer_token
to current value in collection variable - Get Position Stack API key and add
api-access-key
to current value in the collection variable - Get Open Weather API key and add
weather_api_key
to current value in the collection variable - Use collection runner to run through Individual Qodex Requests and capture all objects as environment variable for each user.
- Check out visualization in
Qodexauts - Visualize
request in all folders
Detailed Steps & Requirements
Fork this workspace
If you want to work with this collection yourself, click the Fork
button on the top right section of Qodex and select your own workspace as the destination for the fork. This will allow you to customize the requests and run through the collection yourself.
Twitter requirements
You will need to obtain a bearer token from Twitter. Go to your developer dashboard, and find the Projects & Apps section. If you haven't created a new App/Project, you must do that first. Once that is complete, copy the bearer token value and paste it into the collection variable.
In this collection we will be using :
- [Twitter User by Username] → This endpoint returns details about a single user by username.
- [Twitter Users by Username] → This endpoint returns details about up to 100 users specified by username.
We will use both these endpoints to capture location data from out Twitter Users.
Note : Location information can only be captured if the twitter user has enabled it on their twitter profiles.
Position Stack API requirements
Position Stack API provides accurate forward & reverse geocoding covering more than 2 billion places and addresses worldwide. You will need to obtain an API key from PositionStack by clicking on Get Free API Key and select free option for personal use. Create a Position Stack account and copy the API key and to use in the collection variable api-access-key
.
In this collection we will be using the Forward Geocoding endpoint. To make a forward geocoding request, use the API's forward
endpoint and specify your query using the query
parameter.

Object | Description |
---|---|
access_key | [Required] Your API access key, which can be found in your acccount dashboard. |
query | [Required] Specify your query as a free-text address, place name or using any other common text-based location identifier (e.g. postal code, city name, region name). |
Open Weather API key requirements
Sign up for Open Weather API and copy the API key and to use in the collection variable weather_api_key
. In this collection we will be using the the Current Weather Data API.
This API allows you to get current weather data for any location on Earth including over 200,000 cities by using geographical coordinates (lat, lon). We will be using latitude and longitude from the Position Stack API to get the weather from each location.

Object | Description |
---|---|
lat, lon | [Required]Geographical coordinates (latitude, longitude). If you need the geocoder to automatic convert city names and zip-codes to geo coordinates and the other way around, please use our Geocoding API. |
appid | [Required]Your unique API key (you can always find it on your account page under the API keytab) |
Qodexauts Visualize
[Visualization] code added to the Tests for a request will render in the Visualize tab for the response body, alongside the Pretty, Raw, and Preview options. Qodex provides a programmable way to visually represent your request responses.

In this collection we will be using the a global density map allows us to visualize any form of quantitative variable, such as twitter user location against longitude and latitude coordinates.
Once the object is built with name, location, longitude, latitude, and weather the [Qodex Echo API Post] request transfers data to a server and elicit a response with the following data:

To visualize your response data, add code to the Tests script for the request. The pm.visualizer.set()
method will apply your visualizer code to the data and present it in the Visualize tab when the request runs. The template is made with HTML, CSS, and JavaScript using the D3 library.
-
Individual Qodex Requests - Twitter User by Username - kevin GET https://api.twitter.com/2/users/by/username/:username?user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld
-
Individual Qodex Requests - PositionStack API - Kevin's Location GET http://api.positionstack.com/v1/forward?access_key={{api-access-key}}&query={{kevin-location}}
-
Individual Qodex Requests - Open Weather Maps API -Kevin's Location GET https://api.openweathermap.org/data/2.5/weather?lat={{lat}}&lon={{lon}}&appid={{weather_api_key}}
-
Individual Qodex Requests - Qodexauts - Visualize POST https://postman-echo.com/post
-
Using pm.sendRequest-Three Qodex Requests - Twitter Users by Username - All GET https://api.twitter.com/2/users/by?usernames={{usernames}}&user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld
-
Using pm.sendRequest-Three Qodex Requests - PositionStack API - Location & Weather GET http://api.positionstack.com/v1/forward?access_key={{api-access-key}}&query={{location}}
-
Using pm.sendRequest-Three Qodex Requests - Qodexauts - Visualize POST https://postman-echo.com/post
-
Using pm.sendRequest-Two Qodex Requests - All Users, Location & Weather GET https://api.twitter.com/2/users/by?usernames={{usernames}}&user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld
-
Using pm.sendRequest-Two Qodex Requests - Qodexauts - Visualize POST https://postman-echo.com/post
-
Using pm.sendRequest-One Qodex Request - All Users, Location, Weather & Visualize GET https://api.twitter.com/2/users/by?user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld&usernames={{usernames}}