Ownkube Alerts API
The Alerts API from Ownkube — 3 operation(s) for alerts.
The Alerts API from Ownkube — 3 operation(s) for alerts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/ownkube-io:ownkube-io-alerts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Ownkube CLI Alerts API
version: 1.15.0
description: API for the Ownkube CLI tool. Authenticate via browser-based flow, then use x-api-key header for subsequent requests.
servers:
- url: /api/cli
security:
- apiKey: []
tags:
- name: Alerts
paths:
/v1/deployments/{deploymentId}/alerts:
get:
tags:
- Alerts
summary: List alert rules for a deployment (newest first)
security:
- apiKey: []
parameters:
- schema:
type: string
description: The deployment id.
required: true
description: The deployment id.
name: deploymentId
in: path
responses:
'200':
description: Alert rules
content:
application/json:
schema:
$ref: '#/components/schemas/AlertRuleListResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'412':
description: Precondition failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limited; retry after the Retry-After header's seconds
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: getV1DeploymentsByDeploymentIdAlerts
x-operation-id-source: derived
post:
tags:
- Alerts
summary: Create an alert rule
description: Creates a metric alert rule on an Ownkube Compute deployment. `metric` is `cpu`/`memory` (percent of the app's limit, threshold ≤ 100) or `restarts` (a raw count). Only valid for Ownkube Compute deployments.
security:
- apiKey: []
parameters:
- schema:
type: string
description: The deployment id.
required: true
description: The deployment id.
name: deploymentId
in: path
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
minLength: 1
maxLength: 80
description: Short label for the rule.
metric:
type: string
enum:
- cpu
- memory
- restarts
description: cpu/memory compare a percent of the app's limit; restarts is a raw count.
comparator:
type: string
enum:
- gt
- lt
default: gt
description: Fire when the value is greater-than (gt) or less-than (lt).
threshold:
type: number
minimum: 0
exclusiveMinimum: true
maximum: 1000000
description: Percent (cpu/memory, ≤ 100) or count (restarts).
forDurationSeconds:
type: integer
minimum: 0
maximum: 86400
default: 300
description: How long the condition must hold before firing (default 300).
windowSeconds:
type: integer
minimum: 60
maximum: 86400
description: Lookback window for windowed metrics (restarts).
severity:
type: string
enum:
- warning
- critical
default: warning
description: warning (default) or critical.
required:
- name
- metric
- threshold
responses:
'200':
description: Created rule
content:
application/json:
schema:
$ref: '#/components/schemas/AlertRule'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'412':
description: Precondition failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limited; retry after the Retry-After header's seconds
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: postV1DeploymentsByDeploymentIdAlerts
x-operation-id-source: derived
/v1/alert-rules/{ruleId}:
patch:
tags:
- Alerts
summary: Update an alert rule
description: Edits an alert rule's fields or toggles `enabled`. All body fields are optional; percent metrics still cap the threshold at 100.
security:
- apiKey: []
parameters:
- schema:
type: string
description: The alert rule id.
required: true
description: The alert rule id.
name: ruleId
in: path
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
minLength: 1
maxLength: 80
description: Short label for the rule.
metric:
type: string
enum:
- cpu
- memory
- restarts
description: cpu/memory compare a percent of the app's limit; restarts is a raw count.
comparator:
type: string
enum:
- gt
- lt
default: gt
description: Fire when the value is greater-than (gt) or less-than (lt).
threshold:
type: number
minimum: 0
exclusiveMinimum: true
maximum: 1000000
description: Percent (cpu/memory, ≤ 100) or count (restarts).
forDurationSeconds:
type: integer
minimum: 0
maximum: 86400
default: 300
description: How long the condition must hold before firing (default 300).
windowSeconds:
type: integer
minimum: 60
maximum: 86400
description: Lookback window for windowed metrics (restarts).
severity:
type: string
enum:
- warning
- critical
default: warning
description: warning (default) or critical.
enabled:
type: boolean
description: Turn the rule on or off without deleting it.
responses:
'200':
description: Updated rule
content:
application/json:
schema:
$ref: '#/components/schemas/AlertRule'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'412':
description: Precondition failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limited; retry after the Retry-After header's seconds
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: patchV1AlertRulesByRuleId
x-operation-id-source: derived
delete:
tags:
- Alerts
summary: Delete an alert rule
security:
- apiKey: []
parameters:
- schema:
type: string
description: The alert rule id.
required: true
description: The alert rule id.
name: ruleId
in: path
responses:
'200':
description: Deleted
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteAlertRuleResult'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'412':
description: Precondition failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limited; retry after the Retry-After header's seconds
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: deleteV1AlertRulesByRuleId
x-operation-id-source: derived
/v1/alert-firings:
get:
tags:
- Alerts
summary: List recent alert firings (newest first)
description: Lists recent alert firings for the organization, optionally scoped to one deployment. A firing is recorded when a rule starts breaching and updated to `resolved` when it recovers.
security:
- apiKey: []
parameters:
- schema:
type: string
description: Scope to one deployment (omit for the whole org).
required: false
description: Scope to one deployment (omit for the whole org).
name: deploymentId
in: query
- schema:
type: integer
minimum: 1
maximum: 100
default: 50
description: Max number of firings to return (default 50).
required: false
description: Max number of firings to return (default 50).
name: limit
in: query
responses:
'200':
description: Alert firings
content:
application/json:
schema:
$ref: '#/components/schemas/AlertFiringListResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'412':
description: Precondition failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limited; retry after the Retry-After header's seconds
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: getV1AlertFirings
x-operation-id-source: derived
components:
schemas:
ErrorResponse:
type: object
properties:
error:
type: string
description: Human-readable error message
code:
type: string
description: Machine-readable error code
required:
- error
- code
DeleteAlertRuleResult:
type: object
properties:
success:
type: boolean
required:
- success
AlertFiringListResponse:
type: object
properties:
firings:
type: array
items:
$ref: '#/components/schemas/AlertFiring'
required:
- firings
AlertRule:
type: object
properties:
id:
type: string
deploymentId:
type: string
name:
type: string
metric:
type: string
enum:
- cpu
- memory
- restarts
comparator:
type: string
enum:
- gt
- lt
threshold:
type: string
description: Percent (cpu/memory) or raw count (restarts).
forDurationSeconds:
type: number
windowSeconds:
type: number
nullable: true
severity:
type: string
enum:
- warning
- critical
enabled:
type: boolean
required:
- id
- deploymentId
- name
- metric
- comparator
- threshold
- forDurationSeconds
- windowSeconds
- severity
- enabled
AlertFiring:
type: object
properties:
id:
type: string
alertRuleId:
type: string
nullable: true
deploymentId:
type: string
nullable: true
ruleName:
type: string
metric:
type: string
enum:
- cpu
- memory
- restarts
severity:
type: string
enum:
- warning
- critical
status:
type: string
enum:
- firing
- resolved
summary:
type: string
nullable: true
value:
type: string
nullable: true
startsAt:
anyOf:
- type: string
- type: string
format: date-time
- nullable: true
description: When the alert started firing.
endsAt:
anyOf:
- type: string
- type: string
format: date-time
- nullable: true
description: When the alert resolved; null while still firing.
required:
- id
- alertRuleId
- deploymentId
- ruleName
- metric
- severity
- status
- summary
- value
- startsAt
- endsAt
AlertRuleListResponse:
type: object
properties:
rules:
type: array
items:
$ref: '#/components/schemas/AlertRule'
required:
- rules
securitySchemes:
apiKey:
type: apiKey
in: header
name: x-api-key
description: API key issued by the browser-based CLI authorization flow.