Skip to main content

Create manual threshold

POST

Creates a manual threshold in the caller's environment.

Active target uniqueness

Only one active manual threshold can exist for the same target. Creating a second active threshold for the same statTypeId and optional nodeId returns 409.

Request body​

FieldTypeRequiredDescription
targetobjectYesMetric target that the threshold applies to
target.statTypeIdstringYesMetric identifier to attach the threshold to
target.nodeIdintegerNoOptional node identifier for a node-specific threshold
modestringYesThreshold mode. Supported values: CAPPED, STATIC. See Mode behavior.
boundsobjectYesLower and upper bound values
bounds.uppernumberYesUpper bound value
bounds.lowernumberYesLower bound value

Mode behavior​

  • CAPPED caps the machine-learning corridor with the provided bounds and can only tighten the existing machine-learning range
  • STATIC disables machine-learning baselines for the target and uses the provided bounds directly

For example, if machine learning produces lower=20 and upper=100:

  • CAPPED with lower=25 and upper=50 produces effective bounds lower=25 and upper=50
  • CAPPED with lower=10 and upper=50 produces effective bounds lower=20 and upper=50
  • STATIC with lower=10 and upper=50 uses lower=10 and upper=50

Target validation​

  • target.statTypeId must reference a metric that exists in the caller's environment
  • If target.nodeId is provided, the node must exist and the metric must belong to that node
  • If target.nodeId is omitted, the threshold applies to all nodes in the environment that expose the metric

Response​

  • 201 Created

The response is a Manual threshold object.

{
"id": "64b64b64b64b64b64b64b64b",
"target": {
"statTypeId": "11111111-1111-1111-1111-111111111111"
},
"mode": "CAPPED",
"bounds": {
"upper": 10,
"lower": 20
},
"createdAt": "2025-01-02T00:00:00.000Z",
"updatedAt": "2025-01-02T00:00:00.000Z"
}

Errors​

  • 400: invalid JSON body, invalid request fields, unknown metric, unknown node, or invalid node and metric combination
  • 401: unauthorized
  • 403: forbidden
  • 409: an active manual threshold already exists for the same target

Example request​

{
"target": {
"statTypeId": "11111111-1111-1111-1111-111111111111",
"nodeId": 123
},
"mode": "STATIC",
"bounds": {
"upper": 30,
"lower": 10
}
}