Skip to main content
This document will explain how to visualize which cities requests come from on a map using the Kibana Maps feature for geolocation data used in Apinizer. You can use the geolocation feature in Apinizer with version 2025. To use the geolocation feature, you can check the relevant documentation on the Geolocation City-Based Access Control page.

1) Geolocation Data Provided by Apinizer

In Apinizer, the geographic location data of incoming requests is represented in Elasticsearch in JSON format as follows.
{
  "toClientBody": "[]",
  "loc": {
    "lat": 41.0,
    "lon": 28.0
  }
}
Lat (latitude) and lon (longitude) values are geographic coordinates used to determine the position of a point on Earth. For example:
  • Latitude: 41.0082° N, Longitude: 28.9784° E (Istanbul, Turkey)
  • Latitude: 40.7128° N, Longitude: 74.0060° W (New York, USA)

2) Transferring Data to Kibana

2.1) Creating Index Pattern

In the step of transferring data to Kibana, Kibana installation and integration must be provided. For Kibana installation, you can check the relevant documentation on the Kibana API Traffic Log Visualization page. After installation, in Kibana, on the Stack Management → Index Patterns page, a new index pattern can be created from the ‘Create Index Pattern’ section: Index Pattern Creation The steps are completed by selecting the data stream used in Elasticsearch and the creation process is performed: Data Stream Selection After the creation process is completed, you can see the relevant fields (fields) on the page below: Index Pattern Fields View

2.2) Checking Existing Index Pattern

If Kibana was previously installed and index pattern exists, refresh the index you added to Kibana from the Stack Management → Index Patterns page below. You should check that the relevant value exists by writing ‘loc’ in the search section. loc Field Check Kibana enables the visualization of incoming requests on a map using this ‘loc’ data (latitude and longitude).

3) Adding Map Panel with Kibana Maps and Visualization

Click on the “Maps” tab in the left menu on the Kibana main page. This is the application you will use to create map visualizations: Kibana Maps Menu Click the Add layer button. Prefer the Documents option: Add Layer Documents Selection After selecting the index pattern, the ‘loc’ field will be automatically selected. Then, click the ‘Add layer’ button to add the layer, name it and save it: Add Layer with loc Field

4) Result

In this document, after the IP information of requests coming to Apinizer is converted to geographic data and sent to Elasticsearch, it was explained step by step how to visualize which cities requests come from using Kibana Maps. Thanks to this structure, user accesses can be analyzed on a city basis. Incoming requests on the map will be shown with green markers: Kibana Maps Map Result