Popular APIs



    Index a document with a random ID

    1. {
    2. "title": "Your Name",
    3. "year": "2016"
    4. }

    Index a document with a specific ID

    1. PUT my-logs/_doc/1
    2. {
    3. "title": "Weathering with You",
    4. "year": "2019"
    5. }

    Index several documents at once

    1. POST _bulk
    2. { "index": { "_index": "my-logs", "_id": "2" } }
    3. { "title": "The Garden of Words", "year": 2013 }
    4. { "title": "5 Centimeters Per Second", "year": 2007 }

    List all indices

    1. GET _cat/indices?v&expand_wildcards=all

    Open or close all indices that match a pattern

    1. POST my-logs*/_open
    2. POST my-logs*/_close

    Create an index alias

    1. PUT my-logs-2019-11-13/_alias/my-logs-today

    List all aliases

      Search an index or all indices that match a pattern

      1. GET my-logs/_search?q=test
      2. GET my-logs*/_search?q=test

      Get cluster settings, including defaults

      1. GET _cluster/settings?include_defaults=true

      Change disk watermarks (or other cluster settings)

      1. PUT _cluster/settings
      2. {
      3. "cluster.routing.allocation.disk.watermark.low": "80%",
      4. "cluster.routing.allocation.disk.watermark.high": "85%"
      5. }
      6. }

      List nodes in the cluster

      1. GET _cat/nodes?v

      Get node statistics

      1. GET _nodes/stats

      Get snapshots in a repository

      1. GET _snapshot/my-repository/_all

      Take a snapshot

      1. PUT _snapshot/my-repository/my-snapshot

      Restore a snapshot

      1. POST _snapshot/my-repository/my-snapshot/_restore
      2. {
      3. "indices": "-.opendistro_security",
      4. "include_global_state": false