Spec-Zone.ru › Elasticsearch 8
›Elasticsearch Guide [8.17] ›REST APIs ›Ingest APIs

Get IP geolocation database configuration API

New API reference

For the most up-to-date API details, refer to Ingest APIs.

Returns information about one or more IP geolocation database configurations.

resp = client.ingest.get_ip_location_database(
    id="my-database-id",
)
print(resp)
const response = await client.transport.request({
  method: "GET",
  path: "/_ingest/ip_location/database/my-database-id",
});
console.log(response);
GET /_ingest/ip_location/database/my-database-id

Request

GET /_ingest/ip_location/database/<database>

GET /_ingest/ip_location/database

Prerequisites

  • If the Elasticsearch security features are enabled, you must have the manage cluster privilege to use this API.

Path parameters

<database>

(Optional, string) Comma-separated list of database configuration IDs to retrieve. Wildcard (*) expressions are supported.

To get all database configurations, omit this parameter or use *.

Query parameters

master_timeout
(Optional, time units) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to 30s. Can also be set to -1 to indicate that the request should never timeout.

Examples

Get information for a specific IP geolocation database configuration

resp = client.ingest.get_ip_location_database(
    id="my-database-id",
)
print(resp)
const response = await client.transport.request({
  method: "GET",
  path: "/_ingest/ip_location/database/my-database-id",
});
console.log(response);
GET /_ingest/ip_location/database/my-database-id

The API returns the following response:

{
  "databases" : [
    {
      "id" : "my-database-id",
      "version" : 1,
      "modified_date_millis" : 1723040276114,
      "database" : {
        "name" : "GeoIP2-Domain",
        "maxmind" : {
          "account_id" : "1234567"
        }
      }
    }
  ]
}

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-ip-location-database-api.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API