CHAOSSEARCH API Overview

CHAOSSEARCH APIs give you interconnectivity to process your requests and access data.

API Overview

View our individual documentation for our APIs to see the methods used to process relevant requests. Examples are included to help you complete requests, along with sample requests and responses for added guidance.

6.3.1 is the current supported client module

MSearch API

CHAOSSEARCH primarily uses the _msearch ES API to support Kibana running on data in the CHAOSSEARCH platform. Here is an example way to get a few of your queries accomplished over _msearch:

Example Python Script

from elasticsearch import Elasticsearch, RequestsHttpConnection
from requests_aws4auth import AWS4Auth

awsauth = AWS4Auth("AWS_Access_Key", "AWS_Secret_Access_Key", "us-east-1", 's3')
es = Elasticsearch(
  hosts = [{'host': 'CHANGEME.chaossearch.io', 'port': 443, 'url_prefix': '/elastic', 'use_ssl': True}],
  http_auth=awsauth,
  connection_class=RequestsHttpConnection,
  verify_certs=False
)

#print(es.info())

request = """{
  "ignore_unavailable": true,
  "index": "Input-Index-Name",
  "preference": 1551893136901,
  "timeout": 30000
}
{
  "_source": {
    "excludes": []
  },
  "aggs": {
    "2": {
      "date_histogram": {
        "field": "root.timestamp",
        "interval": "30s",
        "min_doc_count": 1,
        "time_zone": "America/New_York"
      }
    }
  },
  "docvalue_fields": [
    "root.items.timestamp",
    "root.timestamp"
  ],
  "highlight": {
    "fields": {
      "*": {}
    },
    "fragment_size": 2147483647,
    "post_tags": [
      "@/kibana-highlighted-field@"
    ],
    "pre_tags": [
      "@kibana-highlighted-field@"
    ]
  },
  "query": {
    "bool": {
      "filter": [],
      "must": [
        {
          "query_string": {
            "analyze_wildcard": true,
            "default_field": "*",
            "query": "foobar"
          }
        },
        {
          "range": {
            "root.timestamp": {
              "format": "epoch_millis",
              "gte": 1551892245482,
              "lte": 1551893145483
            }
          }
        }
      ],
      "must_not": [],
      "should": []
    }
  },
  "script_fields": {},
  "size": 500,
  "sort": [
    {
      "root.timestamp": {
        "order": "desc",
        "unmapped_type": "boolean"
      }
    }
  ],
  "stored_fields": [
    "*"
  ],
  "version": true
}
"""

response = es.msearch(body = request)

print(request)
print(response)

CHAOSSEARCH API Overview


CHAOSSEARCH APIs give you interconnectivity to process your requests and access data.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.