Elastic API

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

All you have to do is use your username and password in order to login and get a token, then follow the instructions on the Elastic query API tutorial and get your logs and aggregations from anywhere. 

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

How to get the token from Coralogix authentication api: 

curl -H '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