openapi: 3.0.0 info: description: The Observatorium API version: "0.0.1" title: Observatorium API license: name: Apache 2.0 url: "http://www.apache.org/licenses/LICENSE-2.0.html" x-logo: url: 'https://observatorium.io/observatorium.png' altText: 'Observatorium logo' tags: - name: observatoriumv1 description: Calls related to Observatorium - name: metrics description: Calls related to metric endpoints - name: logs description: Calls related to logs endpoint x-tagGroups: - name: metrics tags: - metrics/rulesrawv1 - metrics/rulesv1 - metrics/labelsv1 - metrics/labelvaluesv1 - metrics/queryv1 - metrics/seriesv1 - name: logs tags: - logs/pushv1 - logs/labelsv1 - logs/labelvaluesv1 - logs/queryv1 - logs/rulesrawv1 - logs/rulesv1 - logs/seriesv1 - logs/tailV1 # Keeping all the API paths here, but likely need to separate it out to another file, # once paths for other signals are also added. paths: /api/metrics/v1/{tenant}/api/v1/rules/raw: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant get: tags: - metrics/rulesrawv1 summary: Lists all configured rules for a tenant in YAML form operationId: getRawRules description: | You can list all configured rules for a tenant in YAML form responses: "200": description: all rules for a tenant content: application/yaml: schema: $ref: ./models/models.yaml#/components/schemas/RulesRaw "401": description: error finding tenant ID "403": description: unauthorized "500": description: server side error while listing rules put: tags: - metrics/rulesrawv1 summary: Set/overwrite the rules for a tenant operationId: setRawRules description: You can set rules for a tenant responses: "200": description: successfully updated rules file "401": description: error finding tenant ID "403": description: unauthorized "500": description: server error while saving rules requestBody: content: application/yaml: schema: $ref: ./models/models.yaml#/components/schemas/RulesRaw description: Rules to set for a tenant /api/metrics/v1/{tenant}/api/v1/rules: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - in: query name: type description: type of Rules schema: type: string enum: - alert - record - in: query name: match[] description: Repeated label selector argument schema: type: array items: type: string get: tags: - metrics/rulesv1 summary: Get Rules for a tenant in JSON form operationId: getRules description: | You can get rules for a tenant with health data responses: "2XX": description: rule for a tenant content: application/json: schema: $ref: "./responses/responses.yaml#/components/schemas/MetricRulesResponse" "4XX": description: Bad request "5XX": description: Server side error /api/metrics/v1/{tenant}/api/v1/labels: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/optionalSeriesMatcher - $ref: ./parameters/parameters.yaml#/components/parameters/startTS - $ref: ./parameters/parameters.yaml#/components/parameters/endTS get: tags: - metrics/labelsv1 summary: Get all labels for a tenant operationId: getLabels description: | You can get labels for a tenant responses: "2XX": description: labels for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/MetricLabelsResponse "4XX": description: Bad request "5XX": description: Server side error /api/metrics/v1/{tenant}/api/v1/label/{label_name}/values: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - in: path name: label_name description: label name to get values for required: true schema: type: string - $ref: ./parameters/parameters.yaml#/components/parameters/optionalSeriesMatcher - $ref: ./parameters/parameters.yaml#/components/parameters/startTS - $ref: ./parameters/parameters.yaml#/components/parameters/endTS get: tags: - metrics/labelvaluesv1 summary: Get label values for a tenant operationId: getLabelValues description: | You can get label values for a label of a tenant responses: "2XX": description: label values for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/MetricLabelValuesResponse "4XX": description: Bad request "5XX": description: Server side error /api/metrics/v1/{tenant}/api/v1/query: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/promqlQuery - $ref: ./parameters/parameters.yaml#/components/parameters/queryTimeout - $ref: ./parameters/parameters.yaml#/components/parameters/queryDedup - $ref: ./parameters/parameters.yaml#/components/parameters/queryPartialResponse - in: query name: time description: Evaluation timestamp schema: type: string format: rfc3339 | unix_timestamp get: tags: - metrics/queryv1 summary: Evaluate instant queries for a tenant operationId: getInstantQuery description: | You can evaluate instant queries for a tenant responses: "2XX": description: instance query result for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/MetricQueryResponse "4XX": description: Bad request "5XX": description: Server side error /api/metrics/v1/{tenant}/api/v1/query_range: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/promqlQuery - $ref: ./parameters/parameters.yaml#/components/parameters/startTS - $ref: ./parameters/parameters.yaml#/components/parameters/endTS - $ref: ./parameters/parameters.yaml#/components/parameters/queryTimeout - $ref: ./parameters/parameters.yaml#/components/parameters/queryDedup - $ref: ./parameters/parameters.yaml#/components/parameters/queryPartialResponse - in: query name: step description: Query resolution step width schema: type: string get: tags: - metrics/queryv1 summary: Evaluate range queries for a tenant operationId: getRangeQuery description: | You can evaluate range queries for a tenant responses: "2XX": description: range query result for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/MetricQueryRangeResponse "4XX": description: Bad request "5XX": description: Server side error /api/metrics/v1/{tenant}/api/v1/series: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/seriesMatcher - $ref: ./parameters/parameters.yaml#/components/parameters/startTS - $ref: ./parameters/parameters.yaml#/components/parameters/endTS get: tags: - metrics/seriesv1 summary: Get series for a tenant operationId: getSeries description: | You can get series for a tenant responses: "2XX": description: series for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/MetricSeriesResponse "4XX": description: Bad request "5XX": description: Server side error /api/logs/v1/{tenant}/loki/api/v1/push: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant post: tags: - logs/pushv1 summary: sends log entries to Loki operationId: postlogEntries requestBody: description: You can send all the log entries of clusters to Loki required: true content: application/json: schema: $ref: ./models/models.yaml#/components/schemas/PushLogs responses: "204": description: writes all log entries of corresponding tenenat to Loki "401": description: error finding tenant ID "403": description: unauthorized "500": description: server side error while pushing logs /api/logs/v1/{tenant}/loki/api/v1/labels: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/startTS - $ref: ./parameters/parameters.yaml#/components/parameters/endTS get: tags: - logs/labelsv1 summary: Get all labels for a tenant operationId: getLogLabels description: | You can get labels for a tenant responses: "2XX": description: labels for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/LogLabelsResponse "4XX": description: Bad request "5XX": description: Server side error while getting labels /api/logs/v1/{tenant}/loki/api/v1/label/{name}/values: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - in: path name: name description: label name to get values for required: true schema: type: string - $ref: ./parameters/parameters.yaml#/components/parameters/startTS - $ref: ./parameters/parameters.yaml#/components/parameters/endTS get: tags: - logs/labelvaluesv1 summary: Get label values for a tenant operationId: getLogLabelValues description: | You can get label values for a label of a tenant responses: "2XX": description: label values for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/LogLabelValuesResponse "4XX": description: Bad request "5XX": description: Server side error while getting label values /api/logs/v1/{tenant}/loki/api/v1/series: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/seriesMatcher - $ref: ./parameters/parameters.yaml#/components/parameters/startTS - $ref: ./parameters/parameters.yaml#/components/parameters/endTS get: tags: - logs/seriesv1 summary: Get series for a tenant operationId: getLogSeries description: | You can get series for a tenant responses: "2XX": description: series for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/LogSeriesResponse "4XX": description: Bad request "5XX": description: Server side error while getting series post: tags: - logs/seriesv1 summary: Get series for a tenant operationId: postLogSeries description: Used when specifying a large or dynamic number of stream selectors that may breach server-side URL character limits. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: match[]: type: array items: type: string start: type: string format: rfc3339 | unix_timestamp end: type: string format: rfc3339 | unix_timestamp responses: "201": description: successfully writes series to tenant "401": description: error finding tenant ID "403": description: unauthorized "500": description: server side error while writing series /api/logs/v1/{tenant}/loki/api/v1/query: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/logqlQuery - $ref: ./parameters/parameters.yaml#/components/parameters/limit - in: query name: time description: Evaluation timestamp schema: type: string format: rfc3339 | unix_timestamp - in: query name: direction description: Determines the sort order of logs.Supported values are forward or backward. Defaults to backward. schema: type: string get: tags: - logs/queryv1 summary: Evaluate instant queries for a tenant operationId: getLogInstantQuery description: | You can evaluate instant queries for a tenant responses: "2XX": description: instance query result for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/LogQueryResponse "4XX": description: Bad request "5XX": description: Server side error while getting queries /api/logs/v1/{tenant}/loki/api/v1/query_range: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/logqlQuery - $ref: ./parameters/parameters.yaml#/components/parameters/startTS - $ref: ./parameters/parameters.yaml#/components/parameters/endTS - $ref: ./parameters/parameters.yaml#/components/parameters/limit - in: query name: step description: Query resolution step width schema: type: string - in: query name: interval description: Only return entries at (or >) the specified interval,Only applies to queries which produce a stream response. schema: type: string - in: query name: direction description: Determines the sort order of logs.Supported values are forward or backward. Defaults to backward. schema: type: string get: tags: - logs/queryv1 summary: Evaluate range queries for a tenant operationId: getLogRangeQuery description: | You can evaluate range queries for a tenant responses: "2XX": description: range query result for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/LogQueryRangeResponse "4XX": description: Bad request "5XX": description: Server side error while getting range queries /api/logs/v1/{tenant}/loki/api/v1/tail: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/startTS - $ref: ./parameters/parameters.yaml#/components/parameters/logqlQuery - in: query name: delay description: delay retrieving logs schema: type: integer oneOf: - minimum: 0 - maximum: 5 get: tags: - logs/tailV1 summary: lists log messages based on query operationId: getLogs description: | You can get log messages based on query responses: "2XX": description: logs for a tenant content: application/json: schema: $ref: ./responses/responses.yaml#/components/schemas/LogReadResponse "4XX": description: Bad request "5XX": description: Server side error while tailing logs /api/logs/v1/{tenant}/loki/api/v1/rules: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant get: tags: - logs/rulesrawv1 summary: Get all logs rules for a tenant in YAML form operationId: getAllLogsRules description: | You can get all logs rules for a tenant in YAML form for all known namespaces and groups. responses: "2XX": description: All logs rules for a tenant content: application/yaml: schema: $ref: "./responses/responses.yaml#/components/schemas/AllLogRulesResponse" "4XX": description: Bad request "5XX": description: Server side error /api/logs/v1/{tenant}/loki/api/v1/rules/{namespace}: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/logRulesNamespace get: tags: - logs/rulesrawv1 summary: Get all logs rules in a namespace for a tenant in YAML form operationId: getLogsRules description: | You can get all logs rules in a namespace for a tenant. responses: "2XX": description: All rule groups in a namespace for a tenant content: application/yaml: schema: $ref: "./responses/responses.yaml#/components/schemas/LogRulesNamespaceResponse" "4XX": description: Bad request "5XX": description: Server side error post: tags: - logs/rulesrawv1 summary: Set logs rule groups in a namespace for a tenant operationId: setLogsRules description: | You can create and update rule groups in a namespace for a tenant. requestBody: content: application/yaml: schema: type: object properties: name: type: string interval: type: string rules[]: type: array items: anyOf: - $ref: "./models/models.yaml#/components/schemas/RecordingRule" - $ref: "./models/models.yaml#/components/schemas/AlertingRule" responses: "2XX": description: Successfully created and/or updated rule groups in a namespace for a tenant "4XX": description: Bad request "5XX": description: Server side error delete: tags: - logs/rulesrawv1 summary: Delete logs rules groups in a namespace for a tenant operationId: deleteLogsRules description: | You can delete all the rule groups in a namespace (including the namespace itself). responses: "202": description: Successfully deleted all rule groups in a namespace including the namespace itself "4XX": description: Bad request "5XX": description: Server side error /api/logs/v1/{tenant}/loki/api/v1/rules/{namespace}/{group}: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant - $ref: ./parameters/parameters.yaml#/components/parameters/logRulesNamespace - $ref: ./parameters/parameters.yaml#/components/parameters/logRulesGroup get: tags: - logs/rulesrawv1 summary: Get the logs Rule group in a namespace for a tenant in YAML form operationId: getLogsRulesGroup description: | You get the logs Rule group in a namespace for a tenant responses: "2XX": description: rule group for a tenant content: application/yaml: schema: $ref: "./responses/responses.yaml#/components/schemas/LogRulesGroupResponse" "4XX": description: Bad request "5XX": description: Server side error delete: tags: - logs/rulesrawv1 summary: Delete a logs rule group in a namespace for a tenant operationId: deleteLogsRulesGroup description: | You delete a rule group by namespace and group name for a tenant. responses: "202": description: Successfully deleted a rule group in a namespace for a tenant "4XX": description: Bad request "5XX": description: Server side error /api/logs/v1/{tenant}/prometheus/api/v1/rules: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant get: tags: - logs/rulesv1 summary: Prometheus-compatible rules endpoint to list alerting and recording rules that are currently loaded for a tenant in JSON form operationId: getLogsPromRules description: | Prometheus-compatible rules endpoint to list alerting and recording rules that are currently loaded for a tenant. responses: "2XX": description: All rules for a tenant content: application/json: schema: $ref: "./responses/responses.yaml#/components/schemas/LogRulesPrometheusResponse" "4XX": description: Bad request "5XX": description: Server side error /api/logs/v1/{tenant}/prometheus/api/v1/alerts: parameters: - $ref: ./parameters/parameters.yaml#/components/parameters/tenant get: tags: - logs/rulesv1 summary: Prometheus-compatible rules endpoint to list all active alerts for a tenant in JSON form operationId: getLogsPromAlerts description: | Prometheus-compatible rules endpoint to list all active alerts for a tenant. responses: "2XX": description: All active alerts for a tenant content: application/json: schema: $ref: "./responses/responses.yaml#/components/schemas/LogRulesPrometheusResponse" "4XX": description: Bad request "5XX": description: Server side error