Skip to main content
Create Slo
curl --request POST \
  --url https://api.coralogix.com/mgmt/openapi/5/slo/slos/v1 \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "requestBasedMetricSli": {
    "goodEvents": {
      "query": "sum(rate(http_requests_total{status=\"200\"}[5m]))"
    },
    "totalEvents": {
      "query": "sum(rate(http_requests_total{status=\"200\"}[5m]))"
    }
  },
  "apmSliMetadata": {
    "latencyConfig": {
      "quantile": {
        "percentile": 0.95
      },
      "threshold": 500,
      "timeWindow": "WINDOW_SLO_WINDOW_UNSPECIFIED"
    },
    "filters": [
      {
        "key": "environment",
        "value": "production",
        "values": [
          "500"
        ]
      }
    ],
    "groupingKeys": [
      "environment",
      "region"
    ],
    "services": [
      "my-service",
      "payment-service"
    ]
  },
  "createTime": "2023-11-07T05:31:56Z",
  "creator": "test@domain.com",
  "description": "A brief description of my SLO",
  "grouping": {
    "labels": [
      "<string>"
    ]
  },
  "id": "b11919d5-ef85-4bb1-8655-02640dbe94d9",
  "labels": {},
  "name": "Example Slo Name",
  "ownershipTags": {
    "environment": {
      "labelKeys": [
        "deployment_environment",
        "k8s_namespace"
      ],
      "staticValues": [
        "checkout-api"
      ]
    },
    "service": {
      "labelKeys": [
        "deployment_environment",
        "k8s_namespace"
      ],
      "staticValues": [
        "checkout-api"
      ]
    },
    "team": {
      "labelKeys": [
        "deployment_environment",
        "k8s_namespace"
      ],
      "staticValues": [
        "checkout-api"
      ]
    }
  },
  "productType": "SLO_PRODUCT_TYPE_UNSPECIFIED",
  "revision": {
    "revision": 1,
    "updateTime": "2023-11-07T05:31:56Z"
  },
  "sloTimeFrame": "SLO_TIME_FRAME_UNSPECIFIED",
  "sloType": "SLO_TYPE_REQUEST",
  "targetThresholdPercentage": 99.999,
  "type": "request",
  "updateTime": "2023-11-07T05:31:56Z"
}
'
{
  "slo": {
    "requestBasedMetricSli": {
      "goodEvents": {
        "query": "sum(rate(http_requests_total{status=\"200\"}[5m]))"
      },
      "totalEvents": {
        "query": "sum(rate(http_requests_total{status=\"200\"}[5m]))"
      }
    },
    "apmSliMetadata": {
      "latencyConfig": {
        "quantile": {
          "percentile": 0.95
        },
        "threshold": 500,
        "timeWindow": "WINDOW_SLO_WINDOW_UNSPECIFIED"
      },
      "filters": [
        {
          "key": "environment",
          "value": "production",
          "values": [
            "500"
          ]
        }
      ],
      "groupingKeys": [
        "environment",
        "region"
      ],
      "services": [
        "my-service",
        "payment-service"
      ]
    },
    "createTime": "2023-11-07T05:31:56Z",
    "creator": "test@domain.com",
    "description": "A brief description of my SLO",
    "grouping": {
      "labels": [
        "<string>"
      ]
    },
    "id": "b11919d5-ef85-4bb1-8655-02640dbe94d9",
    "labels": {},
    "name": "Example Slo Name",
    "ownershipTags": {
      "environment": {
        "labelKeys": [
          "deployment_environment",
          "k8s_namespace"
        ],
        "staticValues": [
          "checkout-api"
        ]
      },
      "service": {
        "labelKeys": [
          "deployment_environment",
          "k8s_namespace"
        ],
        "staticValues": [
          "checkout-api"
        ]
      },
      "team": {
        "labelKeys": [
          "deployment_environment",
          "k8s_namespace"
        ],
        "staticValues": [
          "checkout-api"
        ]
      }
    },
    "productType": "SLO_PRODUCT_TYPE_UNSPECIFIED",
    "revision": {
      "revision": 1,
      "updateTime": "2023-11-07T05:31:56Z"
    },
    "sloTimeFrame": "SLO_TIME_FRAME_UNSPECIFIED",
    "sloType": "SLO_TYPE_REQUEST",
    "targetThresholdPercentage": 99.999,
    "type": "request",
    "updateTime": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.coralogix.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key authentication

Query Parameters

silence_data_validations
boolean
deprecated

Body

application/json

Definition of an SLO

requestBasedMetricSli
RequestBasedMetricSli · object
required

Definition of a request-based SLI based on metrics

apmSliMetadata
ApmSli · object

Definition of an APM-based SLI with automatic query generation

createTime
string<date-time>
creator
string
Example:

"test@domain.com"

description
string
Example:

"A brief description of my SLO"

grouping
Grouping · object

Definition of the SLO grouping fields

id
string
Example:

"b11919d5-ef85-4bb1-8655-02640dbe94d9"

labels
object
name
string
Example:

"Example Slo Name"

ownershipTags
SloOwnershipTags · object

Service, environment, and team ownership for the SLO group. At most one SloOwnershipTag per dimension; omit a dimension when unset.

productType
enum<string>
Available options:
SLO_PRODUCT_TYPE_UNSPECIFIED,
SLO_PRODUCT_TYPE_APM
revision
Revision · object

The revision of the slo, used to differentiate between different versions of the same SLO

sloTimeFrame
enum<string>
Available options:
SLO_TIME_FRAME_UNSPECIFIED,
SLO_TIME_FRAME_7_DAYS,
SLO_TIME_FRAME_14_DAYS,
SLO_TIME_FRAME_21_DAYS,
SLO_TIME_FRAME_28_DAYS
sloType
enum<string>
Available options:
SLO_TYPE_REQUEST,
SLO_TYPE_WINDOW
targetThresholdPercentage
number<float>
Example:

99.999

type
string
deprecated
Example:

"request"

updateTime
string<date-time>

Response

Response after creating a new SLO.

slo
Slo · object
required

Definition of an SLO