get-ip-location-database.asciidoc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. [[get-ip-location-database-api]]
  2. === Get IP geolocation database configuration API
  3. ++++
  4. <titleabbrev>Get IP geolocation database configuration</titleabbrev>
  5. ++++
  6. .New API reference
  7. [sidebar]
  8. --
  9. For the most up-to-date API details, refer to {api-es}/group/endpoint-ingest[Ingest APIs].
  10. --
  11. Returns information about one or more IP geolocation database configurations.
  12. [source,console]
  13. ----
  14. GET /_ingest/ip_location/database/my-database-id
  15. ----
  16. // TEST[skip:we don't want to leak the enterprise-geoip-downloader task, which touching these APIs would cause. Therefore, skip this test.]
  17. [[get-ip-location-database-api-request]]
  18. ==== {api-request-title}
  19. `GET /_ingest/ip_location/database/<database>`
  20. `GET /_ingest/ip_location/database`
  21. [[get-ip-location-database-api-prereqs]]
  22. ==== {api-prereq-title}
  23. * If the {es} {security-features} are enabled, you must have the
  24. `manage` <<privileges-list-cluster,cluster privilege>> to use this API.
  25. [[get-ip-location-database-api-path-params]]
  26. ==== {api-path-parms-title}
  27. `<database>`::
  28. (Optional, string)
  29. Comma-separated list of database configuration IDs to retrieve. Wildcard (`*`) expressions are
  30. supported.
  31. +
  32. To get all database configurations, omit this parameter or use `*`.
  33. [[get-ip-location-database-api-query-params]]
  34. ==== {api-query-parms-title}
  35. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  36. [[get-ip-location-database-api-example]]
  37. ==== {api-examples-title}
  38. [[get-ip-location-database-api-specific-ex]]
  39. ===== Get information for a specific IP geolocation database configuration
  40. [source,console]
  41. ----
  42. GET /_ingest/ip_location/database/my-database-id
  43. ----
  44. // TEST[skip:we don't want to leak the enterprise-geoip-downloader task, which touching these APIs would cause. Therefore, skip this test.]
  45. The API returns the following response:
  46. [source,console-result]
  47. ----
  48. {
  49. "databases" : [
  50. {
  51. "id" : "my-database-id",
  52. "version" : 1,
  53. "modified_date_millis" : 1723040276114,
  54. "database" : {
  55. "name" : "GeoIP2-Domain",
  56. "maxmind" : {
  57. "account_id" : "1234567"
  58. }
  59. }
  60. }
  61. ]
  62. }
  63. ----
  64. // TEST[skip:we don't want to leak the enterprise-geoip-downloader task, which touching these APIs would cause. Therefore, skip this test.]