Create or update geoip database configuration API
editCreate or update geoip database configuration API
editCreates or updates an IP geolocation database configuration.
The Maxmind account_id
shown below requires a license key. Because the license key is sensitive information,
it is stored as a secure setting in Elasticsearch named ingest.geoip.downloader.maxmind.license_key
. Only
one Maxmind license key is currently allowed per Elasticsearch cluster. A valid license key must be in the secure settings in order
to download from Maxmind. The license key setting does not take effect until all nodes are restarted.
resp = client.perform_request( "PUT", "/_ingest/geoip/database/my-database-id", headers={"Content-Type": "application/json"}, body={ "name": "GeoIP2-Domain", "maxmind": { "account_id": "1025402" } }, ) print(resp)
const response = await client.transport.request({ method: "PUT", path: "/_ingest/geoip/database/my-database-id", body: { name: "GeoIP2-Domain", maxmind: { account_id: "1025402", }, }, }); console.log(response);
PUT _ingest/geoip/database/my-database-id { "name": "GeoIP2-Domain", "maxmind": { "account_id": "1025402" } }
Request
editPUT /_ingest/geoip/database/<database>
Prerequisites
edit-
If the Elasticsearch security features are enabled, you must have the
manage
cluster privilege to use this API.
Path parameters
edit-
<database>
-
__ (Required, string) ID of the database configuration to create or update.
Query parameters
edit-
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. -
timeout
-
(Optional, time units) Period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.
If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.
Defaults to
30s
. Can also be set to-1
to indicate that the request should never timeout.
Request body
edit-
name
- (Required, string) The provider-assigned name of the IP geolocation database to download.
-
<provider>
-
(Required, a provider object and its associated configuration) The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading.
At present, the only supported provider is
maxmind
, and the maxmind provider requires that anaccount_id
(string) is configured.
Licensing
editDownloading databases from third party providers is a commercial feature that requires an appropriate license. For more information, refer to https://www.elastic.co/subscriptions.