Elastic API

Coralogix provides an Elastic API which allows you to query your hosted Elasticsearch instances securely and with ease. 

In order to use ElasticSearch api you must add Coralogix token with each HTTP call.

How to query your Coralogix elastic api: 

curl -H 'token:YOUR COMPANY PRIVATE KEY' -H "Content-type: application/json" -d '{
    "query": {
        "bool": {
            "must":
            [
                {
                    "term": {
                        "metadata.applicationName": "PROD"
                    }
                },
                {
                    "range": {
                        "timestamp": {
                            "gte": "now-15m",
                            "lt": "now"
                        }
                    }
                }
            ]
        }
    },
    "aggs": {
        "severities": {
            "terms": {
                "field": "metadata.severity"
            }
        }
    }
}' 'https://coralogix-esapi.coralogix.com:9443/*/_search'

 Elastic API query tutorials: 

1) Search API tutorial

2) Aggregations API tutorial 

Signup to Coralogix
WordPress Lightbox