node
const fetch = require('node-fetch');

let url = 'https://api.coralogix.com/mgmt/openapi/v3/alert-defs/filter-option-counts';

let options = {method: 'GET', headers: {Authorization: 'Bearer <API_KEY>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "counts": {
    "enabledCounts": [
      {
        "count": 25,
        "enabled": true
      }
    ],
    "entityLabelCounts": [
      {
        "count": 28,
        "labelKey": "environment",
        "labelValue": "production"
      }
    ],
    "priorityCounts": [
      {
        "count": 15,
        "priority": "ALERT_DEF_PRIORITY_P1"
      }
    ],
    "statusCounts": [
      {
        "count": 15,
        "status": "ALERT_DEF_STATUS_ALERTING"
      }
    ],
    "typeCounts": [
      {
        "count": 42,
        "type": "ALERT_DEF_TYPE_LOGS_THRESHOLD"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Response

Response containing counts for different filter options