Search allocators

POST /platform/infrastructure/allocators/_search

Retrieves the information for all the allocators in the platform that match a specified query.

Body

The optional search request to execute. If not supplied then all allocators are matched

  • from integer(int32)
  • size integer(int32)

    The maximum number of search results to return.

  • query object

    The container for all of the allowed Elasticsearch queries. Specify only one property each time.

    Additional properties are allowed.

    Hide query attributes Show query attributes object
    • match object
      Hide match attribute Show match attribute object
      • * object Additional properties

        Consumes and analyzes text, numbers, and dates, then constructs a query.

        Additional properties are allowed.

        Hide * attributes Show * attributes object
        • query string Required

          The text/numeric/date to query for.

        • operator string

          The operator flag can be set to or or and to control the boolean clauses (defaults to or).

        • minimum_should_match integer(int32)

          The minimum number of optional should clauses to match.

        • analyzer string

          The analyzer that will be used to perform the analysis process on the text. Defaults to the analyzer that was used to index the field.

    • A query that matches all documents.

      Additional properties are allowed.

    • A query that doesn't match any documents.

      Additional properties are allowed.

    • term object
      Hide term attribute Show term attribute object
      • * object Additional properties

        A query for documents that contain the specified term in the inverted index.

        Additional properties are allowed.

        Hide * attribute Show * attribute object
        • value string Required

          The exact value to query for.

    • bool object

      A query for documents that match boolean combinations of other queries.

      Additional properties are allowed.

      Hide bool attributes Show bool attributes object
      • must array[object]

        The container for all of the allowed Elasticsearch queries. Specify only one property each time.

        Additional properties are allowed.

      • should array[object]

        The container for all of the allowed Elasticsearch queries. Specify only one property each time.

        Additional properties are allowed.

      • must_not array[object]

        The container for all of the allowed Elasticsearch queries. Specify only one property each time.

        Additional properties are allowed.

      • filter array[object]

        The container for all of the allowed Elasticsearch queries. Specify only one property each time.

        Additional properties are allowed.

      • minimum_should_match integer(int32)

        The minimum number of optional should clauses to match.

    • A query that uses the strict query string syntax for parsing. Will return an error for invalid syntax.

      Additional properties are allowed.

      Hide query_string attributes Show query_string attributes object
      • query string Required

        The actual query to be parsed.

      • The default field for query terms if no prefix field is specified.

      • analyzer string

        The analyzer used to analyze each term of the query when creating composite queries.

      • The default operator used if no explicit operator is specified.

      • When set, * or ? are allowed as the first character. Defaults to false.

    • nested object

      A query that matches nested objects.

      Additional properties are allowed.

      Hide nested attributes Show nested attributes object
      • query object Required

        The container for all of the allowed Elasticsearch queries. Specify only one property each time.

        Additional properties are allowed.

      • path string Required

        The path to the nested object.

      • Allows to specify how inner children matching affects score of the parent. Refer to the Elasticsearch documentation for details.

        Values are avg, sum, min, max, or none.

    • prefix object
      Hide prefix attribute Show prefix attribute object
      • * object Additional properties

        The query that matches documents with fields that contain terms with a specified, not analyzed, prefix.

        Additional properties are allowed.

        Hide * attributes Show * attributes object
        • value string Required

          The prefix to search for.

        • boost number(float)

          An optional boost value to apply to the query.

    • exists object

      Matches documents that have at least one non-null value in the original field.

      Additional properties are allowed.

      Hide exists attribute Show exists attribute object
      • field string Required

        The field to check for non-null values in.

    • range object
      Hide range attribute Show range attribute object
      • * object Additional properties

        The query that matches documents with fields that contain terms within a specified range.

        Additional properties are allowed.

        Hide * attributes Show * attributes object
        • gt object

          Greater-than

          Additional properties are allowed.

        • gte object

          Greater-than or equal to

          Additional properties are allowed.

        • lt object

          Less-than

          Additional properties are allowed.

        • lte object

          Less-than or equal to.

          Additional properties are allowed.

        • boost number(float)

          An optional boost value to apply to the query.

        • format string

          Formatted dates will be parsed using the format specified on the date field by default, but it can be overridden by passing the format parameter.

        • Dates can be converted from another timezone to UTC either by specifying the time zone in the date value itself (if the format accepts it), or it can be specified as the time_zone parameter.

    • A query that uses simple query string syntax. Will ignore invalid syntax.

      Additional properties are allowed.

      Hide simple_query_string attributes Show simple_query_string attributes object
      • query string Required

        The query expressed in simple query string syntax.

      • fields array[string]

        Array of fields to search

      • The boolean operator used to combine the terms of the query. Valid values are OR (default) and AND.

      • If true, the query attempts to analyze wildcard terms. Defaults to false.

      • analyzer string

        The name of the analyzer to use to convert the query text into tokens.

      • If true, the parse creates a match_phrase uery for each multi-position token. Defaults to true.

      • flags string

        List of enabled operators for the simple query string syntax. Defaults to ALL.

      • fuzzy_max_expansions integer(int32)

        Maximum number of terms to which the query expands for fuzzy matching. Defaults to 50.

      • fuzzy_prefix_length integer(int32)

        Number of beginning characters left unchanged for fuzzy matching. Defaults to 0.

      • If true, edits for fuzzy matching include transpositions of two adjacent characters. Defaults to false.

      • lenient boolean

        If true, format-based errors, such as providing a text value for a numeric field are ignored. Defaults to false.

      • Minimum number of clauses that must match for a document to be returned.

      • Suffix appended to quoted text in the query string.

  • sort array[object]

    An array of fields to sort the search results by.

    Additional properties are allowed.

  • _source object

    Additional properties are allowed.

Responses

  • An overview of allocators that matched the given search query

    Hide response attribute Show response attribute object
    • zones array[object] Required
      Hide zones attributes Show zones attributes object
      • zone_id string Required

        Identifier of the zone

      • allocators array[object] Required
        Hide allocators attributes Show allocators attributes object
        • status object Required

          The health status of the allocator.

          Additional properties are allowed.

          Hide status attributes Show status attributes object
          • connected boolean Required

            Whether the allocator is connected

          • healthy boolean Required

            Whether the allocator is healthy, meaning it is either connected or has no instances

          • Checks used to determine if an allocator is healthy or not

            Additional properties are allowed.

            Hide health_checks attributes Show health_checks attributes object
          • maintenance_mode boolean Required

            Whether the allocator is in maintenance mode (meaning that new workload won't be assigned to it)

          • Timestamp when allocator last entered or exited maintenance mode

        • allocator_id string Required

          Identifier for this allocator

        • zone_id string Required

          Identifier of the zone

        • host_ip string Required

          Host IP of this allocator

        • public_hostname string Required

          Public hostname of this allocator

        • capacity object Required

          The total and used capacity of the allocator.

          Additional properties are allowed.

          Hide capacity attributes Show capacity attributes object
          • memory object Required

            The available and used memory of the allocator.

            Additional properties are allowed.

            Hide memory attributes Show memory attributes object
            • total integer(int32) Required

              Total memory in MB capacity installed on this allocator

            • used integer(int32) Required

              Used memory in MB used by instances assigned to this allocator

          • storage object Required

            The storage capacity of the allocator.

            Additional properties are allowed.

            Hide storage attribute Show storage attribute object
            • total integer(int64) Required

              Total storage in MiB capacity installed on this allocator

          • available_cpus integer(int32)

            Total number of CPUs available on this allocator

          • Additional bonus CPU shares available to Elasticsearch master instances

        • settings object Required

          The settings for the allocator.

          Additional properties are allowed.

          Hide settings attribute Show settings attribute object
          • capacity integer(int32)

            A memory capacity (in MB) that overrides the capacity defined during installation - requires separate restart of Allocator services on each host to take full effect.

        • instances array[object] Required
          Hide instances attributes Show instances attributes object
          • cluster_type string Required

            Type of instance that is running

            Values are elasticsearch, kibana, apm, integrations_server, appsearch, or enterprise_search.

          • cluster_id string Required

            Identifier for the cluster this instance belongs

          • Name of cluster this instance belongs, if available

          • instance_name string Required

            Instance ID of the instance

          • node_memory integer(int32) Required

            Memory assigned to this instance

          • healthy boolean

            Indicates whether the instance is healthy

          • Indicates whether the cluster the instance belongs to is healthy

          • The instance configuration id of this instance

          • moving boolean

            Indicates whether the instance is vacating away from this allocator. Note that this is currently not populated when returned from the search endpoint.

          • The plans associated with the current instance. Note that this is currently not populated when returned from the search endpoint.

            Additional properties are allowed.

            Hide plans_info attributes Show plans_info attributes object
            • pending boolean Required

              Whether or not there is a pending plan.

            • version string

              The version of the current plan, falling back to that of the pending plan if it exists.

            • zone_count integer(int32)

              The number of zones in the current plan, falling back to that of the pending plan if it exists.

          • The id of the deployment this cluster belongs to.

        • metadata array[object] Required

          Arbitrary metadata associated with this allocator

          Hide metadata attributes Show metadata attributes object
          • key string Required

            The metadata field name

          • value string Required

            The metadata value

        • Build Info of the artifact

          Additional properties are allowed.

          Hide build_info attributes Show build_info attributes object
        • features array[string] Required

          List of features associated with this allocator. Note this is only present for backwards compatibility purposes and is scheduled for removal in the next major version release.

        • region string

          The region that this allocator belongs to. Only populated in SaaS or federated ECE.

POST /platform/infrastructure/allocators/_search
curl \
 -X POST https://{{hostname}}/api/v1/platform/infrastructure/allocators/_search \
 -d '{"from":42,"size":42,"query":{"match":{"additionalProperty1":{"query":"string","operator":"string","minimum_should_match":42,"analyzer":"string"},"additionalProperty2":{"query":"string","operator":"string","minimum_should_match":42,"analyzer":"string"}},"match_all":{},"match_none":{},"term":{"additionalProperty1":{"value":"string"},"additionalProperty2":{"value":"string"}},"bool":{"must":[{}],"should":[{}],"must_not":[{}],"filter":[{}],"minimum_should_match":42},"query_string":{"query":"string","default_field":"string","analyzer":"string","default_operator":"string","allow_leading_wildcard":true},"nested":{"query":{},"path":"string","score_mode":"avg"},"prefix":{"additionalProperty1":{"value":"string","boost":42.0},"additionalProperty2":{"value":"string","boost":42.0}},"exists":{"field":"string"},"range":{"additionalProperty1":{"gt":{},"gte":{},"lt":{},"lte":{},"boost":42.0,"format":"string","time_zone":"string"},"additionalProperty2":{"gt":{},"gte":{},"lt":{},"lte":{},"boost":42.0,"format":"string","time_zone":"string"}},"simple_query_string":{"query":"string","fields":["string"],"default_operator":"string","analyze_wildcard":true,"analyzer":"string","auto_generate_synonyms_phrase_query":true,"flags":"string","fuzzy_max_expansions":42,"fuzzy_prefix_length":42,"fuzzy_transpositions":true,"lenient":true,"minimum_should_match":"string","quote_field_suffix":"string"}},"sort":[{}],"_source":{}}'
Request examples
{
  "from": 42,
  "size": 42,
  "query": {
    "match": {
      "additionalProperty1": {
        "query": "string",
        "operator": "string",
        "minimum_should_match": 42,
        "analyzer": "string"
      },
      "additionalProperty2": {
        "query": "string",
        "operator": "string",
        "minimum_should_match": 42,
        "analyzer": "string"
      }
    },
    "match_all": {},
    "match_none": {},
    "term": {
      "additionalProperty1": {
        "value": "string"
      },
      "additionalProperty2": {
        "value": "string"
      }
    },
    "bool": {
      "must": [
        {}
      ],
      "should": [
        {}
      ],
      "must_not": [
        {}
      ],
      "filter": [
        {}
      ],
      "minimum_should_match": 42
    },
    "query_string": {
      "query": "string",
      "default_field": "string",
      "analyzer": "string",
      "default_operator": "string",
      "allow_leading_wildcard": true
    },
    "nested": {
      "query": {},
      "path": "string",
      "score_mode": "avg"
    },
    "prefix": {
      "additionalProperty1": {
        "value": "string",
        "boost": 42.0
      },
      "additionalProperty2": {
        "value": "string",
        "boost": 42.0
      }
    },
    "exists": {
      "field": "string"
    },
    "range": {
      "additionalProperty1": {
        "gt": {},
        "gte": {},
        "lt": {},
        "lte": {},
        "boost": 42.0,
        "format": "string",
        "time_zone": "string"
      },
      "additionalProperty2": {
        "gt": {},
        "gte": {},
        "lt": {},
        "lte": {},
        "boost": 42.0,
        "format": "string",
        "time_zone": "string"
      }
    },
    "simple_query_string": {
      "query": "string",
      "fields": [
        "string"
      ],
      "default_operator": "string",
      "analyze_wildcard": true,
      "analyzer": "string",
      "auto_generate_synonyms_phrase_query": true,
      "flags": "string",
      "fuzzy_max_expansions": 42,
      "fuzzy_prefix_length": 42,
      "fuzzy_transpositions": true,
      "lenient": true,
      "minimum_should_match": "string",
      "quote_field_suffix": "string"
    }
  },
  "sort": [
    {}
  ],
  "_source": {}
}
Response examples (200)
{
  "zones": [
    {
      "zone_id": "string",
      "allocators": [
        {
          "status": {
            "connected": true,
            "healthy": true,
            "health_checks": {
              "is_docker_healthy": true,
              "is_connected_to_zk": true,
              "has_instances": true
            },
            "maintenance_mode": true,
            "maintenance_mode_timestamp": "2024-05-04T09:42:00+00:00"
          },
          "allocator_id": "string",
          "zone_id": "string",
          "host_ip": "string",
          "public_hostname": "string",
          "capacity": {
            "memory": {
              "total": 42,
              "used": 42
            },
            "storage": {
              "total": 42
            },
            "available_cpus": 42,
            "additional_master_bonus": 42.0
          },
          "settings": {
            "capacity": 42
          },
          "instances": [
            {
              "cluster_type": "elasticsearch",
              "cluster_id": "string",
              "cluster_name": "string",
              "instance_name": "string",
              "node_memory": 42,
              "healthy": true,
              "cluster_healthy": true,
              "instance_configuration_id": "string",
              "moving": true,
              "plans_info": {
                "pending": true,
                "version": "string",
                "zone_count": 42
              },
              "deployment_id": "string"
            }
          ],
          "metadata": [
            {
              "key": "string",
              "value": "string"
            }
          ],
          "build_info": {
            "commit_hash": "string",
            "version": "string"
          },
          "features": [
            "string"
          ],
          "external_links": [
            {
              "id": "string",
              "label": "string",
              "uri": "string"
            }
          ],
          "region": "string"
        }
      ]
    }
  ]
}