From 5393895a06c14043b89153eca6b0249bc8c38657 Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Fri, 2 Aug 2024 10:56:14 +0300 Subject: [PATCH] PMM-12985 Create v3 API infra (#3116) --- .github/workflows/doc.yml | 24 +- api/swagger/header.json | 5 +- api/swagger/swagger-dev-only.json | 13341 ---------------- api/swagger/swagger.json | 5 +- .../advisors-and-advisor-checks.md | 2 +- docs/api/advisor-api/failed-checks.md | 2 +- docs/api/advisor-api/overview.md | 8 +- docs/api/backups/list-locations.md | 2 +- docs/api/backups/overview.md | 24 + docs/api/backups/restore-backup.md | 3 +- docs/api/backups/start-backup.md | 3 +- docs/api/inventory/add-node.md | 4 +- 12 files changed, 57 insertions(+), 13366 deletions(-) delete mode 100644 api/swagger/swagger-dev-only.json create mode 100644 docs/api/backups/overview.md diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 95b4c948f8..4aefa14550 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -3,31 +3,41 @@ on: push: branches: - main + - v3 paths: - "api/**" - "docs/api/**" workflow_dispatch: - inputs: - version: - description: "API Version on readme.io" - required: true - default: "v1.0" # v0.0 stands for the dev version jobs: sync: name: Sync runs-on: ubuntu-22.04 + env: + VERSION: v2 + ID: 626badcabbc59c02acc1a53f + steps: - name: Check out code uses: actions/checkout@v4 + - name: Detect PMM version and API ID + run: | + # For reference: + # PMM 2: VERSION=v2, ID=626badcabbc59c02acc1a53f + # PMM 3: VERSION=v3, ID=622892a957a7410330bc6184 + export VERSION=$(cat api/swagger/swagger.json | jq -r '.info.version') + export ID=$(cat api/swagger/swagger.json | jq -r '."x-readme-id"') + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "ID=$ID" >> $GITHUB_ENV + - name: API uses: readmeio/rdme@v8 with: - rdme: openapi ./api/swagger/swagger.json --id=626badcabbc59c02acc1a53f --key=${{ secrets.README_TOKEN }} + rdme: openapi ./api/swagger/swagger.json --id=${{ env.ID }} --key=${{ secrets.README_TOKEN }} - name: Markdown docs uses: readmeio/rdme@v8 with: - rdme: docs docs/api --version=${{ github.event.inputs.version || 'v1.0' }} --key=${{ secrets.README_TOKEN }} + rdme: docs docs/api --version=${{ env.VERSION }} --key=${{ secrets.README_TOKEN }} diff --git a/api/swagger/header.json b/api/swagger/header.json index 881b0fb2bb..90c8445d6f 100644 --- a/api/swagger/header.json +++ b/api/swagger/header.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "PMM API", - "version": "public" + "version": "v2" }, "schemes": [ "https", @@ -25,5 +25,6 @@ "node", "python" ] - } + }, + "x-readme-id": "626badcabbc59c02acc1a53f" } diff --git a/api/swagger/swagger-dev-only.json b/api/swagger/swagger-dev-only.json deleted file mode 100644 index bda80314e4..0000000000 --- a/api/swagger/swagger-dev-only.json +++ /dev/null @@ -1,13341 +0,0 @@ -{ - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "schemes": [ - "https", - "http" - ], - "swagger": "2.0", - "info": { - "description": "This API is for development and testing purposes.", - "title": "PMM API", - "version": "develop" - }, - "paths": { - "/v0/qan/Filters/Get": { - "post": { - "tags": [ - "Filters" - ], - "summary": "Get gets map of metrics names.", - "operationId": "Get", - "parameters": [ - { - "description": "FiltersRequest contains period for which we need filters.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "FiltersRequest contains period for which we need filters.", - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time", - "x-order": 0 - }, - "period_start_to": { - "type": "string", - "format": "date-time", - "x-order": 1 - }, - "main_metric_name": { - "type": "string", - "x-order": 2 - }, - "labels": { - "type": "array", - "items": { - "description": "MapFieldEntry allows to pass labels/dimensions in form like {\"server\": [\"db1\", \"db2\"...]}.", - "type": "object", - "properties": { - "key": { - "type": "string", - "x-order": 0 - }, - "value": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - } - }, - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "FiltersReply is map of labels for given period by key.\nKey is label's name and value is label's value and how many times it occur.", - "type": "object", - "properties": { - "labels": { - "type": "object", - "additionalProperties": { - "description": "ListLabels is list of label's values: duplicates are impossible.", - "type": "object", - "properties": { - "name": { - "type": "array", - "items": { - "description": "Values is label values and main metric percent and per second.", - "type": "object", - "properties": { - "value": { - "type": "string", - "x-order": 0 - }, - "main_metric_percent": { - "type": "number", - "format": "float", - "x-order": 1 - }, - "main_metric_per_sec": { - "type": "number", - "format": "float", - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v0/qan/GetMetricsNames": { - "post": { - "tags": [ - "MetricsNames" - ], - "summary": "GetMetricsNames gets map of metrics names.", - "operationId": "GetMetricsNames", - "parameters": [ - { - "description": "MetricsNamesRequest is emty.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "MetricsNamesRequest is emty.", - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "MetricsNamesReply is map of stored metrics:\nkey is root of metric name in db (Ex:. [m_]query_time[_sum]);\nvalue - Human readable name of metrics.", - "type": "object", - "properties": { - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v0/qan/GetReport": { - "post": { - "tags": [ - "Profile" - ], - "summary": "GetReport returns list of metrics group by queryid or other dimentions.", - "operationId": "GetReport", - "parameters": [ - { - "description": "ReportRequest defines filtering of metrics report for db server or other dimentions.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "ReportRequest defines filtering of metrics report for db server or other dimentions.", - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time", - "x-order": 0 - }, - "period_start_to": { - "type": "string", - "format": "date-time", - "x-order": 1 - }, - "group_by": { - "type": "string", - "x-order": 2 - }, - "labels": { - "type": "array", - "items": { - "description": "ReportMapFieldEntry allows to pass labels/dimentions in form like {\"server\": [\"db1\", \"db2\"...]}.", - "type": "object", - "properties": { - "key": { - "type": "string", - "x-order": 0 - }, - "value": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - } - }, - "x-order": 3 - }, - "columns": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 4 - }, - "order_by": { - "type": "string", - "x-order": 5 - }, - "offset": { - "type": "integer", - "format": "int64", - "x-order": 6 - }, - "limit": { - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "main_metric": { - "type": "string", - "x-order": 8 - }, - "search": { - "type": "string", - "x-order": 9 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "ReportReply is list of reports per quieryids, hosts etc.", - "type": "object", - "properties": { - "total_rows": { - "type": "integer", - "format": "int64", - "x-order": 0 - }, - "offset": { - "type": "integer", - "format": "int64", - "x-order": 1 - }, - "limit": { - "type": "integer", - "format": "int64", - "x-order": 2 - }, - "rows": { - "type": "array", - "items": { - "description": "Row define metrics for selected dimention.", - "type": "object", - "properties": { - "rank": { - "type": "integer", - "format": "int64", - "x-order": 0 - }, - "dimension": { - "type": "string", - "x-order": 1 - }, - "database": { - "type": "string", - "x-order": 2 - }, - "metrics": { - "type": "object", - "additionalProperties": { - "description": "Metric cell.", - "type": "object", - "properties": { - "stats": { - "description": "Stat is statistics of specific metric.", - "type": "object", - "properties": { - "rate": { - "type": "number", - "format": "float", - "x-order": 0 - }, - "cnt": { - "type": "number", - "format": "float", - "x-order": 1 - }, - "sum": { - "type": "number", - "format": "float", - "x-order": 2 - }, - "min": { - "type": "number", - "format": "float", - "x-order": 3 - }, - "max": { - "type": "number", - "format": "float", - "x-order": 4 - }, - "p99": { - "type": "number", - "format": "float", - "x-order": 5 - }, - "avg": { - "type": "number", - "format": "float", - "x-order": 6 - }, - "sum_per_sec": { - "type": "number", - "format": "float", - "x-order": 7 - } - }, - "x-order": 0 - } - } - }, - "x-order": 3 - }, - "sparkline": { - "type": "array", - "items": { - "description": "Point contains values that represents abscissa (time) and ordinate (volume etc.)\nof every point in a coordinate system of Sparklines.", - "type": "object", - "properties": { - "point": { - "description": "The serial number of the chart point from the largest time in the time interval to the lowest time in the time range.", - "type": "integer", - "format": "int64", - "x-order": 0 - }, - "time_frame": { - "description": "Duration beetween two points.", - "type": "integer", - "format": "int64", - "x-order": 1 - }, - "timestamp": { - "description": "Time of point in format RFC3339.", - "type": "string", - "x-order": 2 - }, - "load": { - "description": "load is query_time / time_range.", - "type": "number", - "format": "float", - "x-order": 3 - }, - "num_queries_per_sec": { - "description": "number of queries in bucket.", - "type": "number", - "format": "float", - "x-order": 4 - }, - "num_queries_with_errors_per_sec": { - "description": "number of queries with errors.", - "type": "number", - "format": "float", - "x-order": 5 - }, - "num_queries_with_warnings_per_sec": { - "description": "number of queries with warnings.", - "type": "number", - "format": "float", - "x-order": 6 - }, - "m_query_time_sum_per_sec": { - "description": "The statement execution time in seconds.", - "type": "number", - "format": "float", - "x-order": 7 - }, - "m_lock_time_sum_per_sec": { - "description": "The time to acquire locks in seconds.", - "type": "number", - "format": "float", - "x-order": 8 - }, - "m_rows_sent_sum_per_sec": { - "description": "The number of rows sent to the client.", - "type": "number", - "format": "float", - "x-order": 9 - }, - "m_rows_examined_sum_per_sec": { - "description": "Number of rows scanned - SELECT.", - "type": "number", - "format": "float", - "x-order": 10 - }, - "m_rows_affected_sum_per_sec": { - "description": "Number of rows changed - UPDATE, DELETE, INSERT.", - "type": "number", - "format": "float", - "x-order": 11 - }, - "m_rows_read_sum_per_sec": { - "description": "The number of rows read from tables.", - "type": "number", - "format": "float", - "x-order": 12 - }, - "m_merge_passes_sum_per_sec": { - "description": "The number of merge passes that the sort algorithm has had to do.", - "type": "number", - "format": "float", - "x-order": 13 - }, - "m_innodb_io_r_ops_sum_per_sec": { - "description": "Counts the number of page read operations scheduled.", - "type": "number", - "format": "float", - "x-order": 14 - }, - "m_innodb_io_r_bytes_sum_per_sec": { - "description": "Similar to innodb_IO_r_ops, but the unit is bytes.", - "type": "number", - "format": "float", - "x-order": 15 - }, - "m_innodb_io_r_wait_sum_per_sec": { - "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage.", - "type": "number", - "format": "float", - "x-order": 16 - }, - "m_innodb_rec_lock_wait_sum_per_sec": { - "description": "Shows how long (in seconds) the query waited for row locks.", - "type": "number", - "format": "float", - "x-order": 17 - }, - "m_innodb_queue_wait_sum_per_sec": { - "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution.", - "type": "number", - "format": "float", - "x-order": 18 - }, - "m_innodb_pages_distinct_sum_per_sec": { - "description": "Counts approximately the number of unique pages the query accessed.", - "type": "number", - "format": "float", - "x-order": 19 - }, - "m_query_length_sum_per_sec": { - "description": "Shows how long the query is.", - "type": "number", - "format": "float", - "x-order": 20 - }, - "m_bytes_sent_sum_per_sec": { - "description": "The number of bytes sent to all clients.", - "type": "number", - "format": "float", - "x-order": 21 - }, - "m_tmp_tables_sum_per_sec": { - "description": "Number of temporary tables created on memory for the query.", - "type": "number", - "format": "float", - "x-order": 22 - }, - "m_tmp_disk_tables_sum_per_sec": { - "description": "Number of temporary tables created on disk for the query.", - "type": "number", - "format": "float", - "x-order": 23 - }, - "m_tmp_table_sizes_sum_per_sec": { - "description": "Total Size in bytes for all temporary tables used in the query.", - "type": "number", - "format": "float", - "x-order": 24 - }, - "m_qc_hit_sum_per_sec": { - "description": "Boolean metrics:\n- *_sum_per_sec - how many times this matric was true.\n\nQuery Cache hits.", - "type": "number", - "format": "float", - "x-order": 25 - }, - "m_full_scan_sum_per_sec": { - "description": "The query performed a full table scan.", - "type": "number", - "format": "float", - "x-order": 26 - }, - "m_full_join_sum_per_sec": { - "description": "The query performed a full join (a join without indexes).", - "type": "number", - "format": "float", - "x-order": 27 - }, - "m_tmp_table_sum_per_sec": { - "description": "The query created an implicit internal temporary table.", - "type": "number", - "format": "float", - "x-order": 28 - }, - "m_tmp_table_on_disk_sum_per_sec": { - "description": "The querys temporary table was stored on disk.", - "type": "number", - "format": "float", - "x-order": 29 - }, - "m_filesort_sum_per_sec": { - "description": "The query used a filesort.", - "type": "number", - "format": "float", - "x-order": 30 - }, - "m_filesort_on_disk_sum_per_sec": { - "description": "The filesort was performed on disk.", - "type": "number", - "format": "float", - "x-order": 31 - }, - "m_select_full_range_join_sum_per_sec": { - "description": "The number of joins that used a range search on a reference table.", - "type": "number", - "format": "float", - "x-order": 32 - }, - "m_select_range_sum_per_sec": { - "description": "The number of joins that used ranges on the first table.", - "type": "number", - "format": "float", - "x-order": 33 - }, - "m_select_range_check_sum_per_sec": { - "description": "The number of joins without keys that check for key usage after each row.", - "type": "number", - "format": "float", - "x-order": 34 - }, - "m_sort_range_sum_per_sec": { - "description": "The number of sorts that were done using ranges.", - "type": "number", - "format": "float", - "x-order": 35 - }, - "m_sort_rows_sum_per_sec": { - "description": "The number of sorted rows.", - "type": "number", - "format": "float", - "x-order": 36 - }, - "m_sort_scan_sum_per_sec": { - "description": "The number of sorts that were done by scanning the table.", - "type": "number", - "format": "float", - "x-order": 37 - }, - "m_no_index_used_sum_per_sec": { - "description": "The number of queries without index.", - "type": "number", - "format": "float", - "x-order": 38 - }, - "m_no_good_index_used_sum_per_sec": { - "description": "The number of queries without good index.", - "type": "number", - "format": "float", - "x-order": 39 - }, - "m_docs_returned_sum_per_sec": { - "description": "MongoDB metrics.\n\nThe number of returned documents.", - "type": "number", - "format": "float", - "x-order": 40 - }, - "m_response_length_sum_per_sec": { - "description": "The response length of the query result in bytes.", - "type": "number", - "format": "float", - "x-order": 41 - }, - "m_docs_scanned_sum_per_sec": { - "description": "The number of scanned documents.", - "type": "number", - "format": "float", - "x-order": 42 - }, - "m_shared_blks_hit_sum_per_sec": { - "description": "PostgreSQL metrics.\n\nTotal number of shared block cache hits by the statement.", - "type": "number", - "format": "float", - "x-order": 43 - }, - "m_shared_blks_read_sum_per_sec": { - "description": "Total number of shared blocks read by the statement.", - "type": "number", - "format": "float", - "x-order": 44 - }, - "m_shared_blks_dirtied_sum_per_sec": { - "description": "Total number of shared blocks dirtied by the statement.", - "type": "number", - "format": "float", - "x-order": 45 - }, - "m_shared_blks_written_sum_per_sec": { - "description": "Total number of shared blocks written by the statement.", - "type": "number", - "format": "float", - "x-order": 46 - }, - "m_local_blks_hit_sum_per_sec": { - "description": "Total number of local block cache hits by the statement.", - "type": "number", - "format": "float", - "x-order": 47 - }, - "m_local_blks_read_sum_per_sec": { - "description": "Total number of local blocks read by the statement.", - "type": "number", - "format": "float", - "x-order": 48 - }, - "m_local_blks_dirtied_sum_per_sec": { - "description": "Total number of local blocks dirtied by the statement.", - "type": "number", - "format": "float", - "x-order": 49 - }, - "m_local_blks_written_sum_per_sec": { - "description": "Total number of local blocks written by the statement.", - "type": "number", - "format": "float", - "x-order": 50 - }, - "m_temp_blks_read_sum_per_sec": { - "description": "Total number of temp blocks read by the statement.", - "type": "number", - "format": "float", - "x-order": 51 - }, - "m_temp_blks_written_sum_per_sec": { - "description": "Total number of temp blocks written by the statement.", - "type": "number", - "format": "float", - "x-order": 52 - }, - "m_blk_read_time_sum_per_sec": { - "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero).", - "type": "number", - "format": "float", - "x-order": 53 - }, - "m_blk_write_time_sum_per_sec": { - "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero).", - "type": "number", - "format": "float", - "x-order": 54 - }, - "m_cpu_user_time_sum_per_sec": { - "description": "Total time user spent in query.", - "type": "number", - "format": "float", - "x-order": 55 - }, - "m_cpu_sys_time_sum_per_sec": { - "description": "Total time system spent in query.", - "type": "number", - "format": "float", - "x-order": 56 - }, - "m_plans_calls_sum_per_sec": { - "description": "Total number of planned calls.", - "type": "number", - "format": "float", - "title": "pg_stat_monitor 0.9 metrics", - "x-order": 57 - }, - "m_wal_records_sum_per_sec": { - "description": "Total number of WAL (Write-ahead logging) records.", - "type": "number", - "format": "float", - "x-order": 58 - }, - "m_wal_fpi_sum_per_sec": { - "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records.", - "type": "number", - "format": "float", - "x-order": 59 - }, - "m_wal_bytes_sum_per_sec": { - "description": "Total bytes of WAL (Write-ahead logging) records.", - "type": "number", - "format": "float", - "x-order": 60 - }, - "m_plan_time_sum_per_sec": { - "description": "Plan time in per seconds.", - "type": "number", - "format": "float", - "x-order": 61 - } - } - }, - "x-order": 4 - }, - "fingerprint": { - "type": "string", - "x-order": 5 - }, - "num_queries": { - "type": "integer", - "format": "int64", - "x-order": 6 - }, - "qps": { - "type": "number", - "format": "float", - "x-order": 7 - }, - "load": { - "type": "number", - "format": "float", - "x-order": 8 - } - } - }, - "x-order": 3 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v0/qan/ObjectDetails/ExplainFingerprintByQueryID": { - "post": { - "tags": [ - "ObjectDetails" - ], - "summary": "ExplainFingerprintByQueryID get explain fingerprint for given query ID.", - "operationId": "ExplainFingerprintByQueryID", - "parameters": [ - { - "description": "ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID.", - "type": "object", - "properties": { - "serviceid": { - "type": "string", - "x-order": 0 - }, - "query_id": { - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "ExplainFingerprintByQueryIDReply is explain fingerprint and placeholders count for given query ID.", - "type": "object", - "properties": { - "explain_fingerprint": { - "type": "string", - "x-order": 0 - }, - "placeholders_count": { - "type": "integer", - "format": "int64", - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v0/qan/ObjectDetails/GetHistogram": { - "post": { - "tags": [ - "ObjectDetails" - ], - "summary": "GetHistogram gets histogram items for specific filtering.", - "operationId": "GetHistogram", - "parameters": [ - { - "description": "HistogramRequest defines filtering by time range, labels and queryid.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "HistogramRequest defines filtering by time range, labels and queryid.", - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time", - "x-order": 0 - }, - "period_start_to": { - "type": "string", - "format": "date-time", - "x-order": 1 - }, - "labels": { - "type": "array", - "items": { - "description": "MapFieldEntry allows to pass labels/dimensions in form like {\"server\": [\"db1\", \"db2\"...]}.", - "type": "object", - "properties": { - "key": { - "type": "string", - "x-order": 0 - }, - "value": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - } - }, - "x-order": 2 - }, - "queryid": { - "type": "string", - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "HistogramReply is histogram items as a list.", - "type": "object", - "properties": { - "histogram_items": { - "type": "array", - "items": { - "description": "HistogramItem represents one item in histogram.", - "type": "object", - "properties": { - "range": { - "type": "string", - "x-order": 0 - }, - "frequency": { - "type": "integer", - "format": "int64", - "x-order": 1 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v0/qan/ObjectDetails/GetLabels": { - "post": { - "tags": [ - "ObjectDetails" - ], - "summary": "GetLabels gets list of labels for object details.", - "operationId": "GetLabels", - "parameters": [ - { - "description": "ObjectDetailsLabelsRequest defines filtering of object detail's labels for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "ObjectDetailsLabelsRequest defines filtering of object detail's labels for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time", - "x-order": 0 - }, - "period_start_to": { - "type": "string", - "format": "date-time", - "x-order": 1 - }, - "filter_by": { - "description": "dimension value: ex: queryid - 1D410B4BE5060972.", - "type": "string", - "x-order": 2 - }, - "group_by": { - "description": "one of dimension: queryid | host ...", - "type": "string", - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "ObjectDetailsLabelsReply is a map of labels names as keys and labels values as a list.", - "type": "object", - "properties": { - "labels": { - "type": "object", - "additionalProperties": { - "description": "ListLabelValues is list of label's values.", - "type": "object", - "properties": { - "values": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v0/qan/ObjectDetails/GetMetrics": { - "post": { - "tags": [ - "ObjectDetails" - ], - "summary": "GetMetrics gets map of metrics for specific filtering.", - "operationId": "GetMetrics", - "parameters": [ - { - "description": "MetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "MetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time", - "x-order": 0 - }, - "period_start_to": { - "type": "string", - "format": "date-time", - "x-order": 1 - }, - "filter_by": { - "description": "dimension value: ex: queryid - 1D410B4BE5060972.", - "type": "string", - "x-order": 2 - }, - "group_by": { - "description": "one of dimension: queryid | host ...", - "type": "string", - "x-order": 3 - }, - "labels": { - "type": "array", - "items": { - "description": "MapFieldEntry allows to pass labels/dimensions in form like {\"server\": [\"db1\", \"db2\"...]}.", - "type": "object", - "properties": { - "key": { - "type": "string", - "x-order": 0 - }, - "value": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - } - }, - "x-order": 4 - }, - "include_only_fields": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "totals": { - "type": "boolean", - "title": "retrieve only values for totals, excluding N/A values", - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "MetricsReply defines metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "type": "object", - "properties": { - "metrics": { - "type": "object", - "additionalProperties": { - "description": "MetricValues is statistics of specific metric.", - "type": "object", - "properties": { - "rate": { - "type": "number", - "format": "float", - "x-order": 0 - }, - "cnt": { - "type": "number", - "format": "float", - "x-order": 1 - }, - "sum": { - "type": "number", - "format": "float", - "x-order": 2 - }, - "min": { - "type": "number", - "format": "float", - "x-order": 3 - }, - "max": { - "type": "number", - "format": "float", - "x-order": 4 - }, - "avg": { - "type": "number", - "format": "float", - "x-order": 5 - }, - "p99": { - "type": "number", - "format": "float", - "x-order": 6 - }, - "percent_of_total": { - "type": "number", - "format": "float", - "x-order": 7 - } - } - }, - "x-order": 0 - }, - "text_metrics": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 1 - }, - "sparkline": { - "type": "array", - "items": { - "description": "Point contains values that represents abscissa (time) and ordinate (volume etc.)\nof every point in a coordinate system of Sparklines.", - "type": "object", - "properties": { - "point": { - "description": "The serial number of the chart point from the largest time in the time interval to the lowest time in the time range.", - "type": "integer", - "format": "int64", - "x-order": 0 - }, - "time_frame": { - "description": "Duration beetween two points.", - "type": "integer", - "format": "int64", - "x-order": 1 - }, - "timestamp": { - "description": "Time of point in format RFC3339.", - "type": "string", - "x-order": 2 - }, - "load": { - "description": "load is query_time / time_range.", - "type": "number", - "format": "float", - "x-order": 3 - }, - "num_queries_per_sec": { - "description": "number of queries in bucket.", - "type": "number", - "format": "float", - "x-order": 4 - }, - "num_queries_with_errors_per_sec": { - "description": "number of queries with errors.", - "type": "number", - "format": "float", - "x-order": 5 - }, - "num_queries_with_warnings_per_sec": { - "description": "number of queries with warnings.", - "type": "number", - "format": "float", - "x-order": 6 - }, - "m_query_time_sum_per_sec": { - "description": "The statement execution time in seconds.", - "type": "number", - "format": "float", - "x-order": 7 - }, - "m_lock_time_sum_per_sec": { - "description": "The time to acquire locks in seconds.", - "type": "number", - "format": "float", - "x-order": 8 - }, - "m_rows_sent_sum_per_sec": { - "description": "The number of rows sent to the client.", - "type": "number", - "format": "float", - "x-order": 9 - }, - "m_rows_examined_sum_per_sec": { - "description": "Number of rows scanned - SELECT.", - "type": "number", - "format": "float", - "x-order": 10 - }, - "m_rows_affected_sum_per_sec": { - "description": "Number of rows changed - UPDATE, DELETE, INSERT.", - "type": "number", - "format": "float", - "x-order": 11 - }, - "m_rows_read_sum_per_sec": { - "description": "The number of rows read from tables.", - "type": "number", - "format": "float", - "x-order": 12 - }, - "m_merge_passes_sum_per_sec": { - "description": "The number of merge passes that the sort algorithm has had to do.", - "type": "number", - "format": "float", - "x-order": 13 - }, - "m_innodb_io_r_ops_sum_per_sec": { - "description": "Counts the number of page read operations scheduled.", - "type": "number", - "format": "float", - "x-order": 14 - }, - "m_innodb_io_r_bytes_sum_per_sec": { - "description": "Similar to innodb_IO_r_ops, but the unit is bytes.", - "type": "number", - "format": "float", - "x-order": 15 - }, - "m_innodb_io_r_wait_sum_per_sec": { - "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage.", - "type": "number", - "format": "float", - "x-order": 16 - }, - "m_innodb_rec_lock_wait_sum_per_sec": { - "description": "Shows how long (in seconds) the query waited for row locks.", - "type": "number", - "format": "float", - "x-order": 17 - }, - "m_innodb_queue_wait_sum_per_sec": { - "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution.", - "type": "number", - "format": "float", - "x-order": 18 - }, - "m_innodb_pages_distinct_sum_per_sec": { - "description": "Counts approximately the number of unique pages the query accessed.", - "type": "number", - "format": "float", - "x-order": 19 - }, - "m_query_length_sum_per_sec": { - "description": "Shows how long the query is.", - "type": "number", - "format": "float", - "x-order": 20 - }, - "m_bytes_sent_sum_per_sec": { - "description": "The number of bytes sent to all clients.", - "type": "number", - "format": "float", - "x-order": 21 - }, - "m_tmp_tables_sum_per_sec": { - "description": "Number of temporary tables created on memory for the query.", - "type": "number", - "format": "float", - "x-order": 22 - }, - "m_tmp_disk_tables_sum_per_sec": { - "description": "Number of temporary tables created on disk for the query.", - "type": "number", - "format": "float", - "x-order": 23 - }, - "m_tmp_table_sizes_sum_per_sec": { - "description": "Total Size in bytes for all temporary tables used in the query.", - "type": "number", - "format": "float", - "x-order": 24 - }, - "m_qc_hit_sum_per_sec": { - "description": "Boolean metrics:\n- *_sum_per_sec - how many times this matric was true.\n\nQuery Cache hits.", - "type": "number", - "format": "float", - "x-order": 25 - }, - "m_full_scan_sum_per_sec": { - "description": "The query performed a full table scan.", - "type": "number", - "format": "float", - "x-order": 26 - }, - "m_full_join_sum_per_sec": { - "description": "The query performed a full join (a join without indexes).", - "type": "number", - "format": "float", - "x-order": 27 - }, - "m_tmp_table_sum_per_sec": { - "description": "The query created an implicit internal temporary table.", - "type": "number", - "format": "float", - "x-order": 28 - }, - "m_tmp_table_on_disk_sum_per_sec": { - "description": "The querys temporary table was stored on disk.", - "type": "number", - "format": "float", - "x-order": 29 - }, - "m_filesort_sum_per_sec": { - "description": "The query used a filesort.", - "type": "number", - "format": "float", - "x-order": 30 - }, - "m_filesort_on_disk_sum_per_sec": { - "description": "The filesort was performed on disk.", - "type": "number", - "format": "float", - "x-order": 31 - }, - "m_select_full_range_join_sum_per_sec": { - "description": "The number of joins that used a range search on a reference table.", - "type": "number", - "format": "float", - "x-order": 32 - }, - "m_select_range_sum_per_sec": { - "description": "The number of joins that used ranges on the first table.", - "type": "number", - "format": "float", - "x-order": 33 - }, - "m_select_range_check_sum_per_sec": { - "description": "The number of joins without keys that check for key usage after each row.", - "type": "number", - "format": "float", - "x-order": 34 - }, - "m_sort_range_sum_per_sec": { - "description": "The number of sorts that were done using ranges.", - "type": "number", - "format": "float", - "x-order": 35 - }, - "m_sort_rows_sum_per_sec": { - "description": "The number of sorted rows.", - "type": "number", - "format": "float", - "x-order": 36 - }, - "m_sort_scan_sum_per_sec": { - "description": "The number of sorts that were done by scanning the table.", - "type": "number", - "format": "float", - "x-order": 37 - }, - "m_no_index_used_sum_per_sec": { - "description": "The number of queries without index.", - "type": "number", - "format": "float", - "x-order": 38 - }, - "m_no_good_index_used_sum_per_sec": { - "description": "The number of queries without good index.", - "type": "number", - "format": "float", - "x-order": 39 - }, - "m_docs_returned_sum_per_sec": { - "description": "MongoDB metrics.\n\nThe number of returned documents.", - "type": "number", - "format": "float", - "x-order": 40 - }, - "m_response_length_sum_per_sec": { - "description": "The response length of the query result in bytes.", - "type": "number", - "format": "float", - "x-order": 41 - }, - "m_docs_scanned_sum_per_sec": { - "description": "The number of scanned documents.", - "type": "number", - "format": "float", - "x-order": 42 - }, - "m_shared_blks_hit_sum_per_sec": { - "description": "PostgreSQL metrics.\n\nTotal number of shared block cache hits by the statement.", - "type": "number", - "format": "float", - "x-order": 43 - }, - "m_shared_blks_read_sum_per_sec": { - "description": "Total number of shared blocks read by the statement.", - "type": "number", - "format": "float", - "x-order": 44 - }, - "m_shared_blks_dirtied_sum_per_sec": { - "description": "Total number of shared blocks dirtied by the statement.", - "type": "number", - "format": "float", - "x-order": 45 - }, - "m_shared_blks_written_sum_per_sec": { - "description": "Total number of shared blocks written by the statement.", - "type": "number", - "format": "float", - "x-order": 46 - }, - "m_local_blks_hit_sum_per_sec": { - "description": "Total number of local block cache hits by the statement.", - "type": "number", - "format": "float", - "x-order": 47 - }, - "m_local_blks_read_sum_per_sec": { - "description": "Total number of local blocks read by the statement.", - "type": "number", - "format": "float", - "x-order": 48 - }, - "m_local_blks_dirtied_sum_per_sec": { - "description": "Total number of local blocks dirtied by the statement.", - "type": "number", - "format": "float", - "x-order": 49 - }, - "m_local_blks_written_sum_per_sec": { - "description": "Total number of local blocks written by the statement.", - "type": "number", - "format": "float", - "x-order": 50 - }, - "m_temp_blks_read_sum_per_sec": { - "description": "Total number of temp blocks read by the statement.", - "type": "number", - "format": "float", - "x-order": 51 - }, - "m_temp_blks_written_sum_per_sec": { - "description": "Total number of temp blocks written by the statement.", - "type": "number", - "format": "float", - "x-order": 52 - }, - "m_blk_read_time_sum_per_sec": { - "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero).", - "type": "number", - "format": "float", - "x-order": 53 - }, - "m_blk_write_time_sum_per_sec": { - "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero).", - "type": "number", - "format": "float", - "x-order": 54 - }, - "m_cpu_user_time_sum_per_sec": { - "description": "Total time user spent in query.", - "type": "number", - "format": "float", - "x-order": 55 - }, - "m_cpu_sys_time_sum_per_sec": { - "description": "Total time system spent in query.", - "type": "number", - "format": "float", - "x-order": 56 - }, - "m_plans_calls_sum_per_sec": { - "description": "Total number of planned calls.", - "type": "number", - "format": "float", - "title": "pg_stat_monitor 0.9 metrics", - "x-order": 57 - }, - "m_wal_records_sum_per_sec": { - "description": "Total number of WAL (Write-ahead logging) records.", - "type": "number", - "format": "float", - "x-order": 58 - }, - "m_wal_fpi_sum_per_sec": { - "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records.", - "type": "number", - "format": "float", - "x-order": 59 - }, - "m_wal_bytes_sum_per_sec": { - "description": "Total bytes of WAL (Write-ahead logging) records.", - "type": "number", - "format": "float", - "x-order": 60 - }, - "m_plan_time_sum_per_sec": { - "description": "Plan time in per seconds.", - "type": "number", - "format": "float", - "x-order": 61 - } - } - }, - "x-order": 2 - }, - "totals": { - "type": "object", - "additionalProperties": { - "description": "MetricValues is statistics of specific metric.", - "type": "object", - "properties": { - "rate": { - "type": "number", - "format": "float", - "x-order": 0 - }, - "cnt": { - "type": "number", - "format": "float", - "x-order": 1 - }, - "sum": { - "type": "number", - "format": "float", - "x-order": 2 - }, - "min": { - "type": "number", - "format": "float", - "x-order": 3 - }, - "max": { - "type": "number", - "format": "float", - "x-order": 4 - }, - "avg": { - "type": "number", - "format": "float", - "x-order": 5 - }, - "p99": { - "type": "number", - "format": "float", - "x-order": 6 - }, - "percent_of_total": { - "type": "number", - "format": "float", - "x-order": 7 - } - } - }, - "x-order": 3 - }, - "fingerprint": { - "type": "string", - "x-order": 4 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v0/qan/ObjectDetails/GetQueryExample": { - "post": { - "tags": [ - "ObjectDetails" - ], - "summary": "GetQueryExample gets list of query examples.", - "operationId": "GetQueryExample", - "parameters": [ - { - "description": "QueryExampleRequest defines filtering of query examples for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "QueryExampleRequest defines filtering of query examples for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time", - "x-order": 0 - }, - "period_start_to": { - "type": "string", - "format": "date-time", - "x-order": 1 - }, - "filter_by": { - "description": "dimension value: ex: queryid - 1D410B4BE5060972.", - "type": "string", - "x-order": 2 - }, - "group_by": { - "description": "one of dimension: queryid | host ...", - "type": "string", - "x-order": 3 - }, - "labels": { - "type": "array", - "items": { - "description": "MapFieldEntry allows to pass labels/dimensions in form like {\"server\": [\"db1\", \"db2\"...]}.", - "type": "object", - "properties": { - "key": { - "type": "string", - "x-order": 0 - }, - "value": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - } - }, - "x-order": 4 - }, - "limit": { - "type": "integer", - "format": "int64", - "x-order": 5 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "QueryExampleReply list of query examples.", - "type": "object", - "properties": { - "query_examples": { - "type": "array", - "items": { - "description": "QueryExample shows query examples and their metrics.", - "type": "object", - "properties": { - "example": { - "type": "string", - "x-order": 0 - }, - "example_format": { - "description": "ExampleFormat is format of query example: real or query without values.\n\nDeprecated: is not used, should not be used, should be removed.", - "type": "string", - "default": "EXAMPLE_FORMAT_INVALID", - "enum": [ - "EXAMPLE_FORMAT_INVALID", - "EXAMPLE", - "FINGERPRINT" - ], - "x-order": 1 - }, - "example_type": { - "description": "ExampleType is a type of query example selected for this query class in given period of time.", - "type": "string", - "default": "EXAMPLE_TYPE_INVALID", - "enum": [ - "EXAMPLE_TYPE_INVALID", - "RANDOM", - "SLOWEST", - "FASTEST", - "WITH_ERROR" - ], - "x-order": 2 - }, - "is_truncated": { - "type": "integer", - "format": "int64", - "x-order": 3 - }, - "placeholders_count": { - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "explain_fingerprint": { - "type": "string", - "x-order": 5 - }, - "query_id": { - "type": "string", - "x-order": 6 - }, - "example_metrics": { - "type": "string", - "x-order": 7 - }, - "service_id": { - "type": "string", - "x-order": 8 - }, - "service_type": { - "type": "string", - "x-order": 9 - }, - "schema": { - "type": "string", - "x-order": 10 - }, - "tables": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 11 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v0/qan/ObjectDetails/GetQueryPlan": { - "post": { - "tags": [ - "ObjectDetails" - ], - "summary": "GetQueryPlan gets query plan and plan id for specific filtering.", - "operationId": "GetQueryPlan", - "parameters": [ - { - "description": "QueryPlanRequest defines filtering by queryid.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "QueryPlanRequest defines filtering by queryid.", - "type": "object", - "properties": { - "queryid": { - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "QueryPlanReply contains planid and query_plan.", - "type": "object", - "properties": { - "planid": { - "type": "string", - "x-order": 0 - }, - "query_plan": { - "type": "string", - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v0/qan/ObjectDetails/QueryExists": { - "post": { - "tags": [ - "ObjectDetails" - ], - "summary": "QueryExists check if query exists in clickhouse.", - "operationId": "QueryExists", - "parameters": [ - { - "description": "QueryExistsRequest check if provided query exists or not.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "QueryExistsRequest check if provided query exists or not.", - "type": "object", - "properties": { - "serviceid": { - "type": "string", - "x-order": 0 - }, - "query": { - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "boolean" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/Platform/Connect": { - "post": { - "description": "Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account.", - "tags": [ - "Platform" - ], - "summary": "Connect", - "operationId": "Connect", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "server_name": { - "description": "User defined human readable PMM Server Name.", - "type": "string", - "x-order": 0 - }, - "email": { - "description": "Existing Percona Platform user's email.", - "type": "string", - "x-order": 1 - }, - "password": { - "description": "Existing Percona Platform user's password.", - "type": "string", - "x-order": 2 - }, - "personal_access_token": { - "description": "Personal Access Token that the user obtains from Percona Portal.", - "type": "string", - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/Platform/Disconnect": { - "post": { - "description": "Disconnect a PMM server from the organization created on Percona Portal.", - "tags": [ - "Platform" - ], - "summary": "Disconnect", - "operationId": "Disconnect", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "force": { - "type": "boolean", - "title": "Forces the cleanup process for connected PMM instances regardless of the Portal API response", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/Platform/GetContactInformation": { - "post": { - "description": "GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform.", - "tags": [ - "Platform" - ], - "summary": "GetContactInformation", - "operationId": "GetContactInformation", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "customer_success": { - "description": "CustomerSuccess contains the contanct details of the customer success employee assigned to a customer's account.", - "type": "object", - "properties": { - "name": { - "type": "string", - "x-order": 0 - }, - "email": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 0 - }, - "new_ticket_url": { - "description": "URL to open a new support ticket.", - "type": "string", - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/Platform/SearchOrganizationEntitlements": { - "post": { - "description": "SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to.", - "tags": [ - "Platform" - ], - "summary": "SearchOrganizationEntitlements", - "operationId": "SearchOrganizationEntitlements", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "entitlements": { - "type": "array", - "items": { - "description": "OrganizationEntitlement contains information about Organization entitlement.", - "type": "object", - "properties": { - "number": { - "description": "Entitlement number.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "Entitlement name.", - "type": "string", - "x-order": 1 - }, - "summary": { - "description": "Entitlement short summary.", - "type": "string", - "x-order": 2 - }, - "tier": { - "description": "Entitlement tier.", - "type": "string", - "x-order": 3 - }, - "total_units": { - "description": "Total units covered by this entitlement.", - "type": "string", - "x-order": 4 - }, - "unlimited_units": { - "description": "Flag indicates that unlimited units are covered.", - "type": "boolean", - "x-order": 5 - }, - "support_level": { - "description": "Support level covered by this entitlement.", - "type": "string", - "x-order": 6 - }, - "software_families": { - "description": "Percona product families covered by this entitlement.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 7 - }, - "start_date": { - "description": "Entitlement start data.\nNote: only date is used here but not time.", - "type": "string", - "format": "date-time", - "x-order": 8 - }, - "end_date": { - "description": "Entitlement end date.\nNote: only date is used here but not time.", - "type": "string", - "format": "date-time", - "x-order": 9 - }, - "platform": { - "description": "Platform indicates platform specific entitlements.", - "type": "object", - "properties": { - "security_advisor": { - "description": "Flag indicates that security advisors are covered by this entitlement.", - "type": "string", - "x-order": 0 - }, - "config_advisor": { - "description": "Flag indicates that config advisors are covered by this entitlement.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 10 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/Platform/SearchOrganizationTickets": { - "post": { - "description": "SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to.", - "tags": [ - "Platform" - ], - "summary": "SearchOrganizationTickets", - "operationId": "SearchOrganizationTickets", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "tickets": { - "description": "Support tickets belonging to the Percona Portal Organization.", - "type": "array", - "items": { - "description": "OrganizationTicket contains information about the support ticket.", - "type": "object", - "properties": { - "number": { - "description": "Ticket number.", - "type": "string", - "x-order": 0 - }, - "short_description": { - "description": "Ticket short description.", - "type": "string", - "x-order": 1 - }, - "priority": { - "description": "Ticket priority.", - "type": "string", - "x-order": 2 - }, - "state": { - "description": "Ticket state.", - "type": "string", - "x-order": 3 - }, - "create_time": { - "description": "Ticket creation time.", - "type": "string", - "format": "date-time", - "x-order": 4 - }, - "department": { - "description": "Department.", - "type": "string", - "x-order": 5 - }, - "requester": { - "description": "Ticket requester.", - "type": "string", - "x-order": 6 - }, - "task_type": { - "description": "Task type.", - "type": "string", - "x-order": 7 - }, - "url": { - "description": "Ticket url.", - "type": "string", - "x-order": 8 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/Platform/ServerInfo": { - "post": { - "description": "ServerInfo returns PMM server ID and name.", - "tags": [ - "Platform" - ], - "summary": "ServerInfo", - "operationId": "ServerInfo", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "pmm_server_name": { - "type": "string", - "x-order": 0 - }, - "pmm_server_id": { - "type": "string", - "x-order": 1 - }, - "pmm_server_telemetry_id": { - "type": "string", - "x-order": 2 - }, - "connected_to_portal": { - "type": "boolean", - "x-order": 3 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/Platform/UserStatus": { - "post": { - "description": "UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not.", - "tags": [ - "Platform" - ], - "summary": "UserStatus", - "operationId": "UserStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "is_platform_user": { - "type": "boolean", - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/ChangePSMDB": { - "post": { - "tags": [ - "Components" - ], - "summary": "ChangePSMDBComponents manages PSMDB related components.", - "operationId": "ChangePSMDBComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "mongod": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "version": { - "type": "string", - "x-order": 0 - }, - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - } - } - }, - "x-order": 1 - } - }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/ChangePXC": { - "post": { - "tags": [ - "Components" - ], - "summary": "ChangePXCComponents manages PXC related components.", - "operationId": "ChangePXCComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "pxc": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "version": { - "type": "string", - "x-order": 0 - }, - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - } - } - }, - "x-order": 1 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "version": { - "type": "string", - "x-order": 0 - }, - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - } - } - }, - "x-order": 1 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "version": { - "type": "string", - "x-order": 0 - }, - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - } - } - }, - "x-order": 1 - } - }, - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/CheckForOperatorUpdate": { - "post": { - "tags": [ - "Components" - ], - "summary": "CheckForOperatorUpdate checks if a new version of an operator is available.", - "operationId": "CheckForOperatorUpdate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "cluster_to_components": { - "description": "The cluster name is used as a key for this map, value contains components and their inforamtion about update.", - "type": "object", - "additionalProperties": { - "description": "ComponentsUpdateInformation contains info about components and their available latest versions.", - "type": "object", - "properties": { - "component_to_update_information": { - "description": "component_to_update_information stores, under the name of the component, information about the update.\n\"pxc-operator\", \"psmdb-operator\" are names used by backend for our operators.", - "type": "object", - "additionalProperties": { - "description": "ComponentUpdateInformation contains version we can update to for certain component.", - "type": "object", - "properties": { - "available_version": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/GetPSMDB": { - "post": { - "tags": [ - "Components" - ], - "summary": "GetPSMDBComponents returns list of available components for PSMDB Clusters.", - "operationId": "GetPSMDBComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "db_version": { - "description": "Version of DB.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "versions": { - "type": "array", - "items": { - "description": "OperatorVersion contains information about operator and components matrix.", - "type": "object", - "properties": { - "product": { - "type": "string", - "x-order": 0 - }, - "operator": { - "type": "string", - "x-order": 1 - }, - "matrix": { - "description": "Matrix contains all available components.", - "type": "object", - "properties": { - "mongod": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 0 - }, - "pxc": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 1 - }, - "pmm": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 2 - }, - "proxysql": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 3 - }, - "haproxy": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 4 - }, - "backup": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 5 - }, - "operator": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 6 - }, - "log_collector": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 7 - } - }, - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/GetPXC": { - "post": { - "tags": [ - "Components" - ], - "summary": "GetPXCComponents returns list of available components for PXC Clusters.", - "operationId": "GetPXCComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "db_version": { - "description": "Version of DB.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "versions": { - "type": "array", - "items": { - "description": "OperatorVersion contains information about operator and components matrix.", - "type": "object", - "properties": { - "product": { - "type": "string", - "x-order": 0 - }, - "operator": { - "type": "string", - "x-order": 1 - }, - "matrix": { - "description": "Matrix contains all available components.", - "type": "object", - "properties": { - "mongod": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 0 - }, - "pxc": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 1 - }, - "pmm": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 2 - }, - "proxysql": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 3 - }, - "haproxy": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 4 - }, - "backup": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 5 - }, - "operator": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 6 - }, - "log_collector": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 7 - } - }, - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/InstallOperator": { - "post": { - "tags": [ - "Components" - ], - "summary": "InstallOperator installs given operator in given version.", - "operationId": "InstallOperator", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "operator_type": { - "description": "operator_type tells what operator we are interested in updating.", - "type": "string", - "x-order": 1 - }, - "version": { - "description": "version tells what version of the operator we should update to.", - "type": "string", - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/Delete": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "DeleteDBCluster deletes DB cluster.", - "operationId": "DeleteDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "DB cluster name.", - "type": "string", - "x-order": 1 - }, - "cluster_type": { - "description": "DBClusterType represents database cluster type.\n\n - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type.\n - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type.\n - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type.", - "type": "string", - "default": "DB_CLUSTER_TYPE_INVALID", - "enum": [ - "DB_CLUSTER_TYPE_INVALID", - "DB_CLUSTER_TYPE_PXC", - "DB_CLUSTER_TYPE_PSMDB" - ], - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/Get": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "GetDBCluster returns parameters used to create a database cluster", - "operationId": "GetDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "DB cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "pxc_cluster": { - "description": "PXCCluster represents PXC cluster information.", - "type": "object", - "properties": { - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - } - }, - "x-order": 3 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 4 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "destination": { - "type": "string", - "title": "Destination filename", - "x-order": 1 - } - }, - "x-order": 5 - } - }, - "x-order": 3 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed XtraDB image.", - "type": "string", - "x-order": 5 - }, - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 8 - } - }, - "x-order": 0 - }, - "psmdb_cluster": { - "description": "PSMDBCluster represents PSMDB cluster information.", - "type": "object", - "properties": { - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "destination": { - "type": "string", - "title": "Destination filename", - "x-order": 1 - } - }, - "x-order": 4 - } - }, - "x-order": 3 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed PSMDB image.", - "type": "string", - "x-order": 5 - }, - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 8 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/List": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "ListDBClusters returns a list of DB clusters.", - "operationId": "ListDBClusters", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "pxc_clusters": { - "description": "PXC clusters information.", - "type": "array", - "items": { - "description": "PXCCluster represents PXC cluster information.", - "type": "object", - "properties": { - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - } - }, - "x-order": 3 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 4 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "destination": { - "type": "string", - "title": "Destination filename", - "x-order": 1 - } - }, - "x-order": 5 - } - }, - "x-order": 3 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed XtraDB image.", - "type": "string", - "x-order": 5 - }, - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 8 - } - } - }, - "x-order": 0 - }, - "psmdb_clusters": { - "description": "PSMDB clusters information.", - "type": "array", - "items": { - "description": "PSMDBCluster represents PSMDB cluster information.", - "type": "object", - "properties": { - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "destination": { - "type": "string", - "title": "Destination filename", - "x-order": 1 - } - }, - "x-order": 4 - } - }, - "x-order": 3 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed PSMDB image.", - "type": "string", - "x-order": 5 - }, - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 8 - } - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/Restart": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "RestartDBCluster restarts DB cluster.", - "operationId": "RestartDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PXC cluster name.", - "type": "string", - "x-order": 1 - }, - "cluster_type": { - "description": "DBClusterType represents database cluster type.\n\n - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type.\n - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type.\n - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type.", - "type": "string", - "default": "DB_CLUSTER_TYPE_INVALID", - "enum": [ - "DB_CLUSTER_TYPE_INVALID", - "DB_CLUSTER_TYPE_PXC", - "DB_CLUSTER_TYPE_PSMDB" - ], - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/GetLogs": { - "post": { - "tags": [ - "LogsAPI" - ], - "summary": "GetLogs gets all logs from db cluster.", - "operationId": "GetLogs", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "cluster_name": { - "description": "DB cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "logs": { - "description": "Log represents list of logs. Each entry contains either container's logs or,\nwhen container field is empty, pod's events.", - "type": "array", - "items": { - "description": "Logs contain logs for certain pod's container. If container is an empty\nstring, logs contain pod's events.", - "type": "object", - "properties": { - "pod": { - "description": "Pod name.", - "type": "string", - "x-order": 0 - }, - "container": { - "description": "Container name.", - "type": "string", - "x-order": 1 - }, - "logs": { - "description": "Content of container's log or pod's events.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Get": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "GetKubernetesCluster return KubeAuth with Kubernetes config.", - "operationId": "GetKubernetesCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "kube_auth": { - "description": "KubeAuth represents Kubernetes / kubectl authentication and authorization information.", - "type": "object", - "properties": { - "kubeconfig": { - "description": "Kubeconfig file content.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/List": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "ListKubernetesClusters returns a list of all registered Kubernetes clusters.", - "operationId": "ListKubernetesClusters", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "kubernetes_clusters": { - "description": "Kubernetes clusters.", - "type": "array", - "items": { - "description": "Cluster contains public info about Kubernetes cluster.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "operators": { - "description": "Operators contains list of operators installed in Kubernetes cluster.", - "type": "object", - "properties": { - "pxc": { - "description": "Operator contains all information about operator installed in Kubernetes cluster.", - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - }, - "version": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 0 - }, - "psmdb": { - "description": "Operator contains all information about operator installed in Kubernetes cluster.", - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - }, - "version": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 1 - }, - "dbaas": { - "description": "Operator contains all information about operator installed in Kubernetes cluster.", - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - }, - "version": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 2 - } - }, - "x-order": 1 - }, - "status": { - "description": "KubernetesClusterStatus defines status of Kubernetes cluster.\n\n - KUBERNETES_CLUSTER_STATUS_INVALID: KUBERNETES_CLUSTER_STATUS_INVALID represents unknown state.\n - KUBERNETES_CLUSTER_STATUS_OK: KUBERNETES_CLUSTER_STATUS_OK represents that Kubernetes cluster is accessible.\n - KUBERNETES_CLUSTER_STATUS_UNAVAILABLE: KUBERNETES_CLUSTER_STATUS_UNAVAILABLE represents that Kubernetes cluster is not accessible.\n - KUBERNETES_CLUSTER_STATUS_PROVISIONING: KUBERNETES_CLUSTER_STATUS_PROVISIONING represents that Kubernetes cluster is privisioning.", - "type": "string", - "default": "KUBERNETES_CLUSTER_STATUS_INVALID", - "enum": [ - "KUBERNETES_CLUSTER_STATUS_INVALID", - "KUBERNETES_CLUSTER_STATUS_OK", - "KUBERNETES_CLUSTER_STATUS_UNAVAILABLE", - "KUBERNETES_CLUSTER_STATUS_PROVISIONING" - ], - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Register": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "RegisterKubernetesCluster registers an existing Kubernetes cluster in PMM.", - "operationId": "RegisterKubernetesCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "kube_auth": { - "description": "KubeAuth represents Kubernetes / kubectl authentication and authorization information.", - "type": "object", - "properties": { - "kubeconfig": { - "description": "Kubeconfig file content.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 1 - }, - "aws_access_key_id": { - "description": "AWS access key id, only needed when registering EKS cluster and kubeconfig does not contain it.", - "type": "string", - "x-order": 2 - }, - "aws_secret_access_key": { - "description": "AWS secret access key, only needed when registering EKS cluster and kubeconfig does not contain it.", - "type": "string", - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Resources/Get": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "GetResources returns all and available resources of a Kubernetes cluster.\nNOTE: The user defined in kubeconfig for the cluster has to have rights to\n list and get Pods from all Namespaces. Also getting and listing Nodes\n has to be allowed.", - "operationId": "GetResources", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "all": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - }, - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - } - }, - "x-order": 0 - }, - "available": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - }, - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/StorageClasses/List": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "ListStorageClasses returns the names of all storage classes available in a Kubernetes cluster.", - "operationId": "ListStorageClasses", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "storage_classes": { - "description": "Kubernetes storage classes names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Unregister": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "UnregisterKubernetesCluster removes a registered Kubernetes cluster from PMM.", - "operationId": "UnregisterKubernetesCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "force": { - "description": "If true then Kubernetes cluster will be deleted\neven if it contains database clusters.", - "type": "boolean", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBCluster/Create": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "CreatePSMDBCluster creates a new PSMDB cluster.", - "operationId": "CreatePSMDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "PSMDB cluster name.\na DNS-1035 label must consist of lower case alphanumeric characters or '-',\nstart with an alphabetic character, and end with an alphanumeric character\n(e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')", - "x-order": 1 - }, - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "destination": { - "type": "string", - "title": "Destination filename", - "x-order": 1 - } - }, - "x-order": 4 - } - }, - "x-order": 2 - }, - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBCluster/Resources/Get": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "GetPSMDBClusterResources returns expected resources to be consumed by the cluster.", - "operationId": "GetPSMDBClusterResources", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "destination": { - "type": "string", - "title": "Destination filename", - "x-order": 1 - } - }, - "x-order": 4 - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "expected": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - }, - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBCluster/Update": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "UpdatePSMDBCluster updates existing PSMDB cluster.", - "operationId": "UpdatePSMDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PSMDB cluster name.", - "type": "string", - "x-order": 1 - }, - "params": { - "description": "UpdatePSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 1 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 1 - }, - "suspend": { - "description": "Suspend cluster `pause: true`.", - "type": "boolean", - "x-order": 2 - }, - "resume": { - "description": "Resume cluster `pause: false`.", - "type": "boolean", - "x-order": 3 - }, - "image": { - "description": "PSMDB image to use. If it's the same image but with different version tag, upgrade of database cluster to version\nin given tag is triggered. If entirely different image is given, error is returned.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBClusters/GetCredentials": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "GetPSMDBClusterCredentials returns a PSMDB cluster credentials by cluster name.", - "operationId": "GetPSMDBClusterCredentials", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PSMDB cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "connection_credentials": { - "description": "PSMDBCredentials is a credentials to connect to PSMDB.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "username": { - "description": "MongoDB username.", - "type": "string", - "x-order": 0 - }, - "password": { - "description": "MongoDB password.", - "type": "string", - "x-order": 1 - }, - "host": { - "description": "MongoDB host.", - "type": "string", - "x-order": 2 - }, - "port": { - "description": "MongoDB port.", - "type": "integer", - "format": "int32", - "x-order": 3 - }, - "replicaset": { - "description": "Replicaset name.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCCluster/Create": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "CreatePXCCluster creates a new PXC cluster.", - "operationId": "CreatePXCCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "PXC cluster name.\na DNS-1035 label must consist of lower case alphanumeric characters or '-',\nstart with an alphabetic character, and end with an alphanumeric character\n(e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')", - "x-order": 1 - }, - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - } - }, - "x-order": 3 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 4 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "destination": { - "type": "string", - "title": "Destination filename", - "x-order": 1 - } - }, - "x-order": 5 - } - }, - "x-order": 2 - }, - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCCluster/Resources/Get": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "GetPXCClusterResources returns expected resources to be consumed by the cluster.", - "operationId": "GetPXCClusterResources", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - } - }, - "x-order": 3 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copyies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "schedule": { - "description": "Schedule represents schedule configration.", - "type": "object", - "properties": { - "week": { - "description": "Weekly runs.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "weekday": { - "description": "Weekday configuration.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "hour": { - "description": "Hour configuration.", - "type": "integer", - "format": "int32", - "x-order": 2 - }, - "minute": { - "description": "Minutes configuration.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 2 - } - }, - "x-order": 4 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "format": "int64", - "x-order": 0 - }, - "destination": { - "type": "string", - "title": "Destination filename", - "x-order": 1 - } - }, - "x-order": 5 - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "expected": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - }, - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCCluster/Update": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "UpdatePXCCluster updates existing PXC cluster.", - "operationId": "UpdatePXCCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PXC cluster name.", - "type": "string", - "x-order": 1 - }, - "params": { - "description": "UpdatePXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "image": { - "description": "Image to use. If it's the same image but with different version tag, upgrade of database cluster to version\nin given tag is triggered. If entirely different image is given, error is returned.", - "type": "string", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - } - }, - "x-order": 2 - }, - "suspend": { - "description": "Suspend cluster `pause: true`.", - "type": "boolean", - "x-order": 3 - }, - "resume": { - "description": "Resume cluster `pause: false`.", - "type": "boolean", - "x-order": 4 - }, - "haproxy": { - "description": "HAProxy container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - } - }, - "x-order": 5 - } - }, - "x-order": 2 - }, - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCClusters/GetCredentials": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "GetPXCClusterCredentials returns a PXC cluster credentials by cluster name.", - "operationId": "GetPXCClusterCredentials", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PXC cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "connection_credentials": { - "description": "PXCClusterConnectionCredentials is cluster connection credentials.", - "type": "object", - "properties": { - "username": { - "description": "PXC username.", - "type": "string", - "x-order": 0 - }, - "password": { - "description": "PXC password.", - "type": "string", - "x-order": 1 - }, - "host": { - "description": "PXC host.", - "type": "string", - "x-order": 2 - }, - "port": { - "description": "PXC port.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/alerting/Rules/Create": { - "post": { - "tags": [ - "Alerting" - ], - "summary": "CreateRule creates alerting rule from the given template.", - "operationId": "CreateRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "template_name": { - "description": "Template name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "Rule name.", - "type": "string", - "x-order": 1 - }, - "group": { - "description": "Rule group name.", - "type": "string", - "x-order": 2 - }, - "folder_uid": { - "description": "Folder UID.", - "type": "string", - "x-order": 3 - }, - "params": { - "description": "Rule parameters. All template parameters should be set.", - "type": "array", - "items": { - "description": "ParamValue represents a single rule parameter value.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "type": { - "description": "ParamType represents template parameter type.", - "type": "string", - "default": "PARAM_TYPE_INVALID", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "x-order": 1 - }, - "bool": { - "description": "Bool value.", - "type": "boolean", - "x-order": 2 - }, - "float": { - "description": "Float value.", - "type": "number", - "format": "double", - "x-order": 3 - }, - "string": { - "description": "String value.", - "type": "string", - "x-order": 4 - } - } - }, - "x-order": 4 - }, - "for": { - "description": "Rule duration. Should be set.", - "type": "string", - "x-order": 5 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_INVALID", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 6 - }, - "custom_labels": { - "description": "All custom labels to add or remove (with empty values) to default labels from template.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "filters": { - "description": "Filters.", - "type": "array", - "items": { - "description": "Filter represents a single filter condition.", - "type": "object", - "properties": { - "type": { - "description": "FilterType represents filter matching type.", - "type": "string", - "default": "FILTER_TYPE_INVALID", - "enum": [ - "FILTER_TYPE_INVALID", - "MATCH", - "MISMATCH" - ], - "x-order": 0 - }, - "label": { - "type": "string", - "x-order": 1 - }, - "regexp": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 8 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/alerting/Templates/Create": { - "post": { - "tags": [ - "Alerting" - ], - "summary": "CreateTemplate creates a new template.", - "operationId": "CreateTemplate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "yaml": { - "description": "YAML (or JSON) template file content.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/alerting/Templates/Delete": { - "post": { - "tags": [ - "Alerting" - ], - "summary": "DeleteTemplate deletes existing, previously created via API.", - "operationId": "DeleteTemplate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/alerting/Templates/List": { - "post": { - "tags": [ - "Alerting" - ], - "summary": "ListTemplates returns a list of all collected alert rule templates.", - "operationId": "ListTemplates", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "reload": { - "description": "If true, template files will be re-read from disk.", - "type": "boolean", - "x-order": 0 - }, - "page_params": { - "description": "PageParams represents page request parameters for pagination.", - "type": "object", - "properties": { - "page_size": { - "description": "Maximum number of results per page.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "index": { - "description": "Index of the requested page, starts from 0.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "templates": { - "type": "array", - "items": { - "description": "Template represents Alert Template that is used to create Alert Rule.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID).", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Short human-readable summary.", - "type": "string", - "x-order": 1 - }, - "expr": { - "description": "PromQL query expression with templating parameters.", - "type": "string", - "x-order": 2 - }, - "params": { - "description": "Query parameters definitions.", - "type": "array", - "items": { - "description": "ParamDefinition represents a single query parameter.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Short human-readable parameter summary.", - "type": "string", - "x-order": 1 - }, - "unit": { - "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_INVALID: Invalid, unknown or absent.\n - PERCENTAGE: %\n - SECONDS: s", - "type": "string", - "default": "PARAM_UNIT_INVALID", - "enum": [ - "PARAM_UNIT_INVALID", - "PERCENTAGE", - "SECONDS" - ], - "x-order": 2 - }, - "type": { - "description": "ParamType represents template parameter type.", - "type": "string", - "default": "PARAM_TYPE_INVALID", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "x-order": 3 - }, - "bool": { - "description": "BoolParamDefinition represents boolean parameter's default value.", - "type": "object", - "properties": { - "default": { - "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False.", - "type": "string", - "default": "DO_NOT_CHANGE", - "enum": [ - "DO_NOT_CHANGE", - "TRUE", - "FALSE" - ], - "x-order": 0 - } - }, - "x-order": 4 - }, - "float": { - "description": "FloatParamDefinition represents float parameter's default value and valid range.", - "type": "object", - "properties": { - "has_default": { - "description": "True if default value is set.", - "type": "boolean", - "x-order": 0 - }, - "default": { - "description": "Default value if has_default is true.", - "type": "number", - "format": "double", - "x-order": 1 - }, - "has_min": { - "description": "True if minimal valid value is set.", - "type": "boolean", - "x-order": 2 - }, - "min": { - "description": "Minimal valid value (inclusive) if has_min is true.", - "type": "number", - "format": "double", - "x-order": 3 - }, - "has_max": { - "description": "True if maximal valid value is set.", - "type": "boolean", - "x-order": 4 - }, - "max": { - "description": "Maximal valid value (inclusive) if has_max is true.", - "type": "number", - "format": "double", - "x-order": 5 - } - }, - "x-order": 5 - }, - "string": { - "description": "StringParamDefinition represents string parameter's default value.", - "type": "object", - "properties": { - "has_default": { - "description": "True if default value is set.", - "type": "boolean", - "x-order": 0 - }, - "default": { - "description": "Default value if has_default is true.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 6 - } - } - }, - "x-order": 3 - }, - "for": { - "description": "Default duration value.", - "type": "string", - "x-order": 4 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_INVALID", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 5 - }, - "labels": { - "description": "Labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "annotations": { - "description": "Annotations.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "source": { - "description": "TemplateSource defines template source.\n\n - BUILT_IN: Template that is shipped with PMM Server releases.\n - SAAS: Template that is downloaded from check.percona.com.\n - USER_FILE: Templated loaded from user-suplied file.\n - USER_API: Templated created via API.", - "type": "string", - "default": "TEMPLATE_SOURCE_INVALID", - "enum": [ - "TEMPLATE_SOURCE_INVALID", - "BUILT_IN", - "SAAS", - "USER_FILE", - "USER_API" - ], - "x-order": 8 - }, - "created_at": { - "description": "Template creation time. Empty for built-in and SaaS templates.", - "type": "string", - "format": "date-time", - "x-order": 9 - }, - "yaml": { - "description": "YAML (or JSON) template file content. Empty for built-in and SaaS templates.", - "type": "string", - "x-order": 10 - } - } - }, - "x-order": 0 - }, - "totals": { - "description": "PageTotals represents total values for pagination.", - "type": "object", - "properties": { - "total_items": { - "description": "Total number of results.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "total_pages": { - "description": "Total number of pages.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/alerting/Templates/Update": { - "post": { - "tags": [ - "Alerting" - ], - "summary": "UpdateTemplate updates existing template, previously created via API.", - "operationId": "UpdateTemplate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID).", - "type": "string", - "x-order": 0 - }, - "yaml": { - "description": "YAML (or JSON) template file content.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/azure/AzureDatabase/Add": { - "post": { - "tags": [ - "AzureDatabase" - ], - "summary": "AddAzureDatabase adds Azure Database instance.", - "operationId": "AddAzureDatabase", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "region": { - "description": "Azure database location.", - "type": "string", - "x-order": 0 - }, - "az": { - "description": "Azure database availability zone.", - "type": "string", - "x-order": 1 - }, - "instance_id": { - "description": "Azure database instance ID.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Represents a purchasable Stock Keeping Unit (SKU) under a product.\nhttps://docs.microsoft.com/en-us/partner-center/develop/product-resources#sku.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name. Defaults to Azure Database instance ID.", - "type": "string", - "x-order": 6 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Defaults to Azure Database instance ID.", - "type": "string", - "x-order": 7 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 8 - }, - "username": { - "description": "Username for scraping metrics.", - "type": "string", - "x-order": 9 - }, - "password": { - "description": "Password for scraping metrics.", - "type": "string", - "x-order": 10 - }, - "azure_client_id": { - "description": "Azure client ID.", - "type": "string", - "x-order": 11 - }, - "azure_client_secret": { - "description": "Azure client secret.", - "type": "string", - "x-order": 12 - }, - "azure_tenant_id": { - "description": "Azure tanant ID.", - "type": "string", - "x-order": 13 - }, - "azure_subscription_id": { - "description": "Azure subscription ID.", - "type": "string", - "x-order": 14 - }, - "azure_resource_group": { - "description": "Azure resource group.", - "type": "string", - "x-order": 15 - }, - "azure_database_exporter": { - "description": "If true, adds azure_database_exporter.", - "type": "boolean", - "x-order": 16 - }, - "qan": { - "description": "If true, adds qan-mysql-perfschema-agent or qan-postgresql-pgstatements-agent.", - "type": "boolean", - "x-order": 17 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node and Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 18 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 19 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 20 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 21 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 22 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", - "type": "integer", - "format": "int32", - "x-order": 23 - }, - "type": { - "description": "DiscoverAzureDatabaseType describes supported Azure Database instance engines.\n\n - DISCOVER_AZURE_DATABASE_TYPE_MYSQL: MySQL type: microsoft.dbformysql or MariaDB type: microsoft.dbformariadb\n - DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL: PostgreSQL type: microsoft.dbformysql", - "type": "string", - "default": "DISCOVER_AZURE_DATABASE_TYPE_INVALID", - "enum": [ - "DISCOVER_AZURE_DATABASE_TYPE_INVALID", - "DISCOVER_AZURE_DATABASE_TYPE_MYSQL", - "DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL" - ], - "x-order": 24 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "error": { - "type": "string", - "x-order": 0 - }, - "code": { - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "message": { - "type": "string", - "x-order": 2 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "x-order": 0 - }, - "value": { - "type": "string", - "format": "byte", - "x-order": 1 - } - } - }, - "x-order": 3 - } - } - } - } - } - } - }, - "/v1/management/azure/AzureDatabase/Discover": { - "post": { - "tags": [ - "AzureDatabase" - ], - "summary": "DiscoverAzureDatabase discovers Azure Database for MySQL, MariaDB and PostgreSQL Server instances.", - "operationId": "DiscoverAzureDatabase", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "DiscoverAzureDatabaseRequest discover azure databases request.", - "type": "object", - "properties": { - "azure_client_id": { - "description": "Azure client ID.", - "type": "string", - "x-order": 0 - }, - "azure_client_secret": { - "description": "Azure client secret.", - "type": "string", - "x-order": 1 - }, - "azure_tenant_id": { - "description": "Azure tanant ID.", - "type": "string", - "x-order": 2 - }, - "azure_subscription_id": { - "description": "Azure subscription ID.", - "type": "string", - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "description": "DiscoverAzureDatabaseResponse discover azure databases response.", - "type": "object", - "properties": { - "azure_database_instance": { - "type": "array", - "items": { - "description": "DiscoverAzureDatabaseInstance models an unique Azure Database instance for the list of instances returned by Discovery.", - "type": "object", - "properties": { - "instance_id": { - "description": "Azure database instance ID.", - "type": "string", - "x-order": 0 - }, - "region": { - "description": "Azure database location.", - "type": "string", - "x-order": 1 - }, - "service_name": { - "description": "Azure database server name.", - "type": "string", - "x-order": 2 - }, - "username": { - "description": "Database username.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "azure_resource_group": { - "description": "Azure Resource group.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment tag.", - "type": "string", - "x-order": 6 - }, - "type": { - "description": "DiscoverAzureDatabaseType describes supported Azure Database instance engines.\n\n - DISCOVER_AZURE_DATABASE_TYPE_MYSQL: MySQL type: microsoft.dbformysql or MariaDB type: microsoft.dbformariadb\n - DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL: PostgreSQL type: microsoft.dbformysql", - "type": "string", - "default": "DISCOVER_AZURE_DATABASE_TYPE_INVALID", - "enum": [ - "DISCOVER_AZURE_DATABASE_TYPE_INVALID", - "DISCOVER_AZURE_DATABASE_TYPE_MYSQL", - "DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL" - ], - "x-order": 7 - }, - "az": { - "description": "Azure database availability zone.", - "type": "string", - "x-order": 8 - }, - "node_model": { - "description": "Represents a purchasable Stock Keeping Unit (SKU) under a product.\nhttps://docs.microsoft.com/en-us/partner-center/develop/product-resources#sku.", - "type": "string", - "x-order": 9 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "error": { - "type": "string", - "x-order": 0 - }, - "code": { - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "message": { - "type": "string", - "x-order": 2 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "x-order": 0 - }, - "value": { - "type": "string", - "format": "byte", - "x-order": 1 - } - } - }, - "x-order": 3 - } - } - } - } - } - } - }, - "/v1/management/backup/Artifacts/Delete": { - "post": { - "tags": [ - "Artifacts" - ], - "summary": "DeleteArtifact deletes specified artifact.", - "operationId": "DeleteArtifact", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "artifact_id": { - "description": "Machine-readable artifact ID.", - "type": "string", - "x-order": 0 - }, - "remove_files": { - "description": "Removes all the backup files associated with artifact if flag is set.", - "type": "boolean", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Artifacts/List": { - "post": { - "tags": [ - "Artifacts" - ], - "summary": "ListArtifacts returns a list of all backup artifacts.", - "operationId": "ListArtifacts", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "artifacts": { - "type": "array", - "items": { - "description": "Artifact represents single backup artifact.", - "type": "object", - "properties": { - "artifact_id": { - "description": "Machine-readable artifact ID.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "Artifact name", - "x-order": 1 - }, - "vendor": { - "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL.", - "type": "string", - "x-order": 2 - }, - "location_id": { - "description": "Machine-readable location ID.", - "type": "string", - "x-order": 3 - }, - "location_name": { - "description": "Location name.", - "type": "string", - "x-order": 4 - }, - "service_id": { - "description": "Machine-readable service ID.", - "type": "string", - "x-order": 5 - }, - "service_name": { - "description": "Service name.", - "type": "string", - "x-order": 6 - }, - "data_model": { - "description": "DataModel is a model used for performing a backup.", - "type": "string", - "default": "DATA_MODEL_INVALID", - "enum": [ - "DATA_MODEL_INVALID", - "PHYSICAL", - "LOGICAL" - ], - "x-order": 7 - }, - "status": { - "description": "BackupStatus shows the current status of execution of backup.", - "type": "string", - "default": "BACKUP_STATUS_INVALID", - "enum": [ - "BACKUP_STATUS_INVALID", - "BACKUP_STATUS_PENDING", - "BACKUP_STATUS_IN_PROGRESS", - "BACKUP_STATUS_PAUSED", - "BACKUP_STATUS_SUCCESS", - "BACKUP_STATUS_ERROR", - "BACKUP_STATUS_DELETING", - "BACKUP_STATUS_FAILED_TO_DELETE" - ], - "x-order": 8 - }, - "created_at": { - "description": "Artifact creation time.", - "type": "string", - "format": "date-time", - "x-order": 9 - }, - "mode": { - "description": "BackupMode specifies backup mode.", - "type": "string", - "default": "BACKUP_MODE_INVALID", - "enum": [ - "BACKUP_MODE_INVALID", - "SNAPSHOT", - "INCREMENTAL", - "PITR" - ], - "x-order": 10 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Artifacts/ListPITRTimeranges": { - "post": { - "tags": [ - "Artifacts" - ], - "summary": "ListPitrTimeranges list the available MongoDB PITR timeranges in a given backup location", - "operationId": "ListPitrTimeranges", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "artifact_id": { - "description": "Artifact ID represents artifact whose location has PITR timeranges to be retrieved.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "timeranges": { - "type": "array", - "items": { - "type": "object", - "properties": { - "start_timestamp": { - "description": "start_timestamp is the time of the first event in the PITR chunk.", - "type": "string", - "format": "date-time", - "x-order": 0 - }, - "end_timestamp": { - "description": "end_timestamp is the time of the last event in the PITR chunk.", - "type": "string", - "format": "date-time", - "x-order": 1 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Backups/ChangeScheduled": { - "post": { - "tags": [ - "Backups" - ], - "summary": "ChangeScheduledBackup changes existing scheduled backup.", - "operationId": "ChangeScheduledBackup", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "scheduled_backup_id": { - "type": "string", - "x-order": 0 - }, - "enabled": { - "type": "boolean", - "x-order": 1 - }, - "cron_expression": { - "description": "How often backup should be run in cron format.", - "type": "string", - "x-order": 2 - }, - "start_time": { - "description": "First backup wouldn't happen before this time.", - "type": "string", - "format": "date-time", - "x-order": 3 - }, - "name": { - "description": "Name of backup.", - "type": "string", - "x-order": 4 - }, - "description": { - "description": "Human-readable description.", - "type": "string", - "x-order": 5 - }, - "retry_interval": { - "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h.", - "type": "string", - "x-order": 6 - }, - "retries": { - "description": "How many times to retry a failed backup before giving up.", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "retention": { - "description": "How many artifacts keep. 0 - unlimited.", - "type": "integer", - "format": "int64", - "x-order": 8 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Backups/GetLogs": { - "post": { - "tags": [ - "Backups" - ], - "summary": "GetLogs returns logs for provided artifact.", - "operationId": "GetLogsMixin3", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "artifact_id": { - "type": "string", - "x-order": 0 - }, - "offset": { - "type": "integer", - "format": "int64", - "x-order": 1 - }, - "limit": { - "type": "integer", - "format": "int64", - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "logs": { - "type": "array", - "items": { - "description": "LogChunk represent one chunk of logs.", - "type": "object", - "properties": { - "chunk_id": { - "type": "integer", - "format": "int64", - "x-order": 0 - }, - "data": { - "type": "string", - "x-order": 1 - } - } - }, - "x-order": 0 - }, - "end": { - "type": "boolean", - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Backups/ListArtifactCompatibleServices": { - "post": { - "tags": [ - "Backups" - ], - "summary": "ListArtifactCompatibleServices lists compatible services for restoring a backup.", - "operationId": "ListArtifactCompatibleServices", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "artifact_id": { - "description": "Artifact id used to determine restore compatibility.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "mysql": { - "type": "array", - "items": { - "description": "MySQLService represents a generic MySQL instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - } - }, - "x-order": 0 - }, - "mongodb": { - "type": "array", - "items": { - "description": "MongoDBService represents a generic MongoDB instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Backups/ListScheduled": { - "post": { - "tags": [ - "Backups" - ], - "summary": "ListScheduledBackups returns all scheduled backups.", - "operationId": "ListScheduledBackups", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "scheduled_backups": { - "type": "array", - "items": { - "description": "ScheduledBackup represents scheduled task for backup.", - "type": "object", - "properties": { - "scheduled_backup_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "service_id": { - "description": "Machine-readable service ID.", - "type": "string", - "x-order": 1 - }, - "service_name": { - "description": "Service name.", - "type": "string", - "x-order": 2 - }, - "location_id": { - "description": "Machine-readable location ID.", - "type": "string", - "x-order": 3 - }, - "location_name": { - "description": "Location name.", - "type": "string", - "x-order": 4 - }, - "cron_expression": { - "description": "How often backup will be run in cron format.", - "type": "string", - "x-order": 5 - }, - "start_time": { - "description": "First backup wouldn't happen before this time.", - "type": "string", - "format": "date-time", - "x-order": 6 - }, - "name": { - "description": "Artifact name.", - "type": "string", - "x-order": 7 - }, - "description": { - "description": "Description.", - "type": "string", - "x-order": 8 - }, - "retry_interval": { - "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h.", - "type": "string", - "x-order": 9 - }, - "retries": { - "description": "How many times to retry a failed backup before giving up.", - "type": "integer", - "format": "int64", - "x-order": 10 - }, - "enabled": { - "description": "If scheduling is enabled.", - "type": "boolean", - "x-order": 11 - }, - "data_model": { - "description": "DataModel is a model used for performing a backup.", - "type": "string", - "default": "DATA_MODEL_INVALID", - "enum": [ - "DATA_MODEL_INVALID", - "PHYSICAL", - "LOGICAL" - ], - "x-order": 12 - }, - "vendor": { - "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL.", - "type": "string", - "x-order": 13 - }, - "last_run": { - "description": "Last run.", - "type": "string", - "format": "date-time", - "x-order": 14 - }, - "next_run": { - "description": "Next run.", - "type": "string", - "format": "date-time", - "x-order": 15 - }, - "retention": { - "description": "How many artifacts keep. 0 - unlimited.", - "type": "integer", - "format": "int64", - "x-order": 16 - }, - "mode": { - "description": "BackupMode specifies backup mode.", - "type": "string", - "default": "BACKUP_MODE_INVALID", - "enum": [ - "BACKUP_MODE_INVALID", - "SNAPSHOT", - "INCREMENTAL", - "PITR" - ], - "x-order": 17 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Backups/RemoveScheduled": { - "post": { - "tags": [ - "Backups" - ], - "summary": "RemoveScheduledBackup removes existing scheduled backup.", - "operationId": "RemoveScheduledBackup", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "scheduled_backup_id": { - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Backups/Restore": { - "post": { - "description": "Could return the Error message in the details containing specific ErrorCode indicating failure reason:\nERROR_CODE_XTRABACKUP_NOT_INSTALLED - xtrabackup is not installed on the service\nERROR_CODE_INVALID_XTRABACKUP - different versions of xtrabackup and xbcloud\nERROR_CODE_INCOMPATIBLE_XTRABACKUP - xtrabackup is not compatible with MySQL for taking a backup\nERROR_CODE_INCOMPATIBLE_TARGET_MYSQL - target MySQL version is not compatible with the artifact for performing a restore of the backup", - "tags": [ - "Backups" - ], - "summary": "RestoreBackup requests the backup restore.", - "operationId": "RestoreBackup", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "description": "Service identifier where backup should be restored.", - "type": "string", - "x-order": 0 - }, - "artifact_id": { - "description": "Artifact id to restore.", - "type": "string", - "x-order": 1 - }, - "pitr_timestamp": { - "type": "string", - "format": "date-time", - "title": "Timestamp of PITR to restore to", - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "restore_id": { - "description": "Unique restore identifier.", - "type": "string", - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Backups/Schedule": { - "post": { - "tags": [ - "Backups" - ], - "summary": "ScheduleBackup schedules repeated backup.", - "operationId": "ScheduleBackup", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "description": "Service identifier where backup should be performed.", - "type": "string", - "x-order": 0 - }, - "location_id": { - "description": "Machine-readable location ID.", - "type": "string", - "x-order": 1 - }, - "cron_expression": { - "description": "How often backup should be run in cron format.", - "type": "string", - "x-order": 2 - }, - "start_time": { - "description": "First backup wouldn't happen before this time.", - "type": "string", - "format": "date-time", - "x-order": 3 - }, - "name": { - "description": "Name of backup.", - "type": "string", - "x-order": 4 - }, - "description": { - "description": "Human-readable description.", - "type": "string", - "x-order": 5 - }, - "retry_interval": { - "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h.", - "type": "string", - "x-order": 6 - }, - "retries": { - "description": "How many times to retry a failed backup before giving up.", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "enabled": { - "description": "If scheduling is enabled.", - "type": "boolean", - "x-order": 8 - }, - "retention": { - "description": "How many artifacts keep. 0 - unlimited.", - "type": "integer", - "format": "int64", - "x-order": 9 - }, - "mode": { - "description": "BackupMode specifies backup mode.", - "type": "string", - "default": "BACKUP_MODE_INVALID", - "enum": [ - "BACKUP_MODE_INVALID", - "SNAPSHOT", - "INCREMENTAL", - "PITR" - ], - "x-order": 10 - }, - "data_model": { - "description": "DataModel is a model used for performing a backup.", - "type": "string", - "default": "DATA_MODEL_INVALID", - "enum": [ - "DATA_MODEL_INVALID", - "PHYSICAL", - "LOGICAL" - ], - "x-order": 11 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "scheduled_backup_id": { - "type": "string", - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Backups/Start": { - "post": { - "description": "Could return the Error message in the details containing specific ErrorCode indicating failure reason:\nERROR_CODE_XTRABACKUP_NOT_INSTALLED - xtrabackup is not installed on the service\nERROR_CODE_INVALID_XTRABACKUP - different versions of xtrabackup and xbcloud\nERROR_CODE_INCOMPATIBLE_XTRABACKUP - xtrabackup is not compatible with MySQL for taking a backup", - "tags": [ - "Backups" - ], - "summary": "StartBackup request backup specified service to location.", - "operationId": "StartBackup", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 0 - }, - "location_id": { - "description": "Machine-readable location ID.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "If empty then name is auto-generated.", - "type": "string", - "x-order": 2 - }, - "description": { - "description": "Human-readable description.", - "type": "string", - "x-order": 3 - }, - "retry_interval": { - "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h.", - "type": "string", - "x-order": 4 - }, - "retries": { - "description": "How many times to retry a failed backup before giving up.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "data_model": { - "description": "DataModel is a model used for performing a backup.", - "type": "string", - "default": "DATA_MODEL_INVALID", - "enum": [ - "DATA_MODEL_INVALID", - "PHYSICAL", - "LOGICAL" - ], - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "artifact_id": { - "description": "Unique identifier.", - "type": "string", - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Locations/Add": { - "post": { - "tags": [ - "Locations" - ], - "summary": "AddLocation adds backup location.", - "operationId": "AddLocation", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Location name", - "x-order": 0 - }, - "description": { - "type": "string", - "x-order": 1 - }, - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 2 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "x-order": 0 - }, - "access_key": { - "type": "string", - "x-order": 1 - }, - "secret_key": { - "type": "string", - "x-order": 2 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - } - }, - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "location_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Locations/Change": { - "post": { - "tags": [ - "Locations" - ], - "summary": "ChangeLocation changes backup location.", - "operationId": "ChangeLocation", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "location_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "Location name", - "x-order": 1 - }, - "description": { - "type": "string", - "x-order": 2 - }, - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 3 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "x-order": 0 - }, - "access_key": { - "type": "string", - "x-order": 1 - }, - "secret_key": { - "type": "string", - "x-order": 2 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - } - }, - "x-order": 4 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Locations/List": { - "post": { - "tags": [ - "Locations" - ], - "summary": "ListLocations returns a list of all backup locations.", - "operationId": "ListLocations", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "locations": { - "type": "array", - "items": { - "description": "Location represents single Backup Location.", - "type": "object", - "properties": { - "location_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "Location name", - "x-order": 1 - }, - "description": { - "type": "string", - "title": "Short description", - "x-order": 2 - }, - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 3 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "x-order": 0 - }, - "access_key": { - "type": "string", - "x-order": 1 - }, - "secret_key": { - "type": "string", - "x-order": 2 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - } - }, - "x-order": 4 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Locations/Remove": { - "post": { - "tags": [ - "Locations" - ], - "summary": "RemoveLocation removes existing backup location.", - "operationId": "RemoveLocation", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "location_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "force": { - "type": "boolean", - "title": "Force mode", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/Locations/TestConfig": { - "post": { - "tags": [ - "Locations" - ], - "summary": "TestLocationConfig tests backup location and credentials.", - "operationId": "TestLocationConfig", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "filesystem_config": { - "description": "FilesystemLocationConfig represents file system location config.", - "type": "object", - "properties": { - "path": { - "type": "string", - "x-order": 0 - } - }, - "x-order": 0 - }, - "s3_config": { - "description": "S3LocationConfig represents S3 bucket configuration.", - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "x-order": 0 - }, - "access_key": { - "type": "string", - "x-order": 1 - }, - "secret_key": { - "type": "string", - "x-order": 2 - }, - "bucket_name": { - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/backup/RestoreHistory/List": { - "post": { - "tags": [ - "RestoreHistory" - ], - "summary": "ListRestoreHistory returns a list of all backup restore history items.", - "operationId": "ListRestoreHistory", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "description": "RestoreHistoryItem represents single backup restore item.", - "type": "object", - "properties": { - "restore_id": { - "description": "Machine-readable restore id.", - "type": "string", - "x-order": 0 - }, - "artifact_id": { - "description": "ID of the artifact used for restore.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Artifact name used for restore.", - "type": "string", - "x-order": 2 - }, - "vendor": { - "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL.", - "type": "string", - "x-order": 3 - }, - "location_id": { - "description": "Machine-readable location ID.", - "type": "string", - "x-order": 4 - }, - "location_name": { - "description": "Location name.", - "type": "string", - "x-order": 5 - }, - "service_id": { - "description": "Machine-readable service ID.", - "type": "string", - "x-order": 6 - }, - "service_name": { - "description": "Service name.", - "type": "string", - "x-order": 7 - }, - "data_model": { - "description": "DataModel is a model used for performing a backup.", - "type": "string", - "default": "DATA_MODEL_INVALID", - "enum": [ - "DATA_MODEL_INVALID", - "PHYSICAL", - "LOGICAL" - ], - "x-order": 8 - }, - "status": { - "description": "RestoreStatus shows the current status of execution of restore.", - "type": "string", - "default": "RESTORE_STATUS_INVALID", - "enum": [ - "RESTORE_STATUS_INVALID", - "RESTORE_STATUS_IN_PROGRESS", - "RESTORE_STATUS_SUCCESS", - "RESTORE_STATUS_ERROR" - ], - "x-order": 9 - }, - "started_at": { - "description": "Restore start time.", - "type": "string", - "format": "date-time", - "x-order": 10 - }, - "finished_at": { - "description": "Restore finish time.", - "type": "string", - "format": "date-time", - "x-order": 11 - }, - "pitr_timestamp": { - "description": "PITR timestamp is filled for PITR restores, empty otherwise.", - "type": "string", - "format": "date-time", - "x-order": 12 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Alerts/List": { - "post": { - "tags": [ - "Alerts" - ], - "summary": "ListAlerts returns a list of all Alerts.", - "operationId": "ListAlerts", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "page_params": { - "description": "PageParams represents page request parameters for pagination.", - "type": "object", - "properties": { - "page_size": { - "description": "Maximum number of results per page.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "index": { - "description": "Index of the requested page, starts from 0.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "alerts": { - "type": "array", - "items": { - "description": "Alert represents Alert.", - "type": "object", - "properties": { - "alert_id": { - "description": "ID.", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Human-readable summary.", - "type": "string", - "x-order": 1 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_INVALID", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 2 - }, - "status": { - "description": "Status represents Alert Rule's and Alert's combined status.\n\n - CLEAR: No alert.\n - PENDING: Pending, but not triggering alert.\n - TRIGGERING: Triggering (firing) alert.\n - SILENCED: Silenced alert.", - "type": "string", - "default": "STATUS_INVALID", - "enum": [ - "STATUS_INVALID", - "CLEAR", - "PENDING", - "TRIGGERING", - "SILENCED" - ], - "x-order": 3 - }, - "labels": { - "description": "Combined labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 4 - }, - "rule": { - "description": "Rule represents Alert Rule.", - "type": "object", - "properties": { - "rule_id": { - "description": "Rule ID.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "Rule name.", - "type": "string", - "x-order": 1 - }, - "summary": { - "description": "Rule human-readable summary.", - "type": "string", - "x-order": 2 - }, - "template_name": { - "description": "Template used for this rule.", - "type": "string", - "x-order": 3 - }, - "disabled": { - "description": "True if that rule is disabled.", - "type": "boolean", - "x-order": 4 - }, - "expr_template": { - "description": "Expression template.", - "type": "string", - "x-order": 5 - }, - "expr": { - "description": "Expression filled with parameters.", - "type": "string", - "x-order": 6 - }, - "params_definitions": { - "description": "Expression parameters definitions.", - "type": "array", - "items": { - "description": "ParamDefinition represents a single query parameter.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Short human-readable parameter summary.", - "type": "string", - "x-order": 1 - }, - "unit": { - "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_INVALID: Invalid, unknown or absent.\n - PERCENTAGE: %\n - SECONDS: s", - "type": "string", - "default": "PARAM_UNIT_INVALID", - "enum": [ - "PARAM_UNIT_INVALID", - "PERCENTAGE", - "SECONDS" - ], - "x-order": 2 - }, - "type": { - "description": "ParamType represents template parameter type.", - "type": "string", - "default": "PARAM_TYPE_INVALID", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "x-order": 3 - }, - "bool": { - "description": "BoolParamDefinition represents boolean parameter's default value.", - "type": "object", - "properties": { - "default": { - "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False.", - "type": "string", - "default": "DO_NOT_CHANGE", - "enum": [ - "DO_NOT_CHANGE", - "TRUE", - "FALSE" - ], - "x-order": 0 - } - }, - "x-order": 4 - }, - "float": { - "description": "FloatParamDefinition represents float parameter's default value and valid range.", - "type": "object", - "properties": { - "has_default": { - "description": "True if default value is set.", - "type": "boolean", - "x-order": 0 - }, - "default": { - "description": "Default value if has_default is true.", - "type": "number", - "format": "double", - "x-order": 1 - }, - "has_min": { - "description": "True if minimal valid value is set.", - "type": "boolean", - "x-order": 2 - }, - "min": { - "description": "Minimal valid value (inclusive) if has_min is true.", - "type": "number", - "format": "double", - "x-order": 3 - }, - "has_max": { - "description": "True if maximal valid value is set.", - "type": "boolean", - "x-order": 4 - }, - "max": { - "description": "Maximal valid value (inclusive) if has_max is true.", - "type": "number", - "format": "double", - "x-order": 5 - } - }, - "x-order": 5 - }, - "string": { - "description": "StringParamDefinition represents string parameter's default value.", - "type": "object", - "properties": { - "has_default": { - "description": "True if default value is set.", - "type": "boolean", - "x-order": 0 - }, - "default": { - "description": "Default value if has_default is true.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 6 - } - } - }, - "x-order": 7 - }, - "params_values": { - "description": "Expression parameters values.", - "type": "array", - "items": { - "description": "ParamValue represents a single rule parameter value for List, Change and Update APIs.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "type": { - "description": "ParamType represents template parameter type.", - "type": "string", - "default": "PARAM_TYPE_INVALID", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "x-order": 1 - }, - "bool": { - "description": "Bool value.", - "type": "boolean", - "x-order": 2 - }, - "float": { - "description": "Float value.", - "type": "number", - "format": "double", - "x-order": 3 - }, - "string": { - "description": "String value.", - "type": "string", - "x-order": 4 - } - } - }, - "x-order": 8 - }, - "default_for": { - "description": "Default for duration.", - "type": "string", - "x-order": 9 - }, - "for": { - "description": "For duration.", - "type": "string", - "x-order": 10 - }, - "default_severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_INVALID", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 11 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_INVALID", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 12 - }, - "custom_labels": { - "description": "Custom labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 - }, - "labels": { - "description": "Labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 14 - }, - "annotations": { - "description": "Annotations.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 15 - }, - "filters": { - "description": "Filters.", - "type": "array", - "items": { - "description": "Filter repsents a single filter condition.", - "type": "object", - "properties": { - "type": { - "description": "FilterType represents filter matching type.\n\n - EQUAL: =\n\n!=\n NOT_EQUAL = 2;\n - REGEX: =~\n\n!~\n NOT_REGEX = 4;", - "type": "string", - "default": "FILTER_TYPE_INVALID", - "enum": [ - "FILTER_TYPE_INVALID", - "EQUAL", - "REGEX" - ], - "x-order": 0 - }, - "key": { - "type": "string", - "x-order": 1 - }, - "value": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 16 - }, - "channels": { - "description": "Channels.", - "type": "array", - "items": { - "description": "Channel represents a single Notification Channel.\n\nreserved channels\n pushover_config = 5;\n opsgenie_config = 7;\n victorops_config = 9;\n wechat_config = 10;", - "type": "object", - "properties": { - "channel_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Short human-readable summary.", - "type": "string", - "x-order": 1 - }, - "email_config": { - "description": "EmailConfig represents email configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "to": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - }, - "x-order": 2 - }, - "pagerduty_config": { - "description": "PagerDutyConfig represents PagerDuty configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "routing_key": { - "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 1 - }, - "service_key": { - "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 3 - }, - "slack_config": { - "description": "SlackConfig represents Slack configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "channel": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 4 - }, - "webhook_config": { - "description": "WebhookConfig represents webhook configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "url": { - "type": "string", - "x-order": 1 - }, - "http_config": { - "description": "HTTPConfig represents HTTP client configuration.", - "type": "object", - "properties": { - "basic_auth": { - "description": "BasicAuth represents basic HTTP auth configuration.", - "type": "object", - "properties": { - "username": { - "type": "string", - "x-order": 0 - }, - "password": { - "type": "string", - "x-order": 1 - }, - "password_file": { - "type": "string", - "x-order": 2 - } - }, - "x-order": 0 - }, - "bearer_token": { - "type": "string", - "x-order": 1 - }, - "bearer_token_file": { - "type": "string", - "x-order": 2 - }, - "tls_config": { - "type": "object", - "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config", - "properties": { - "ca_file": { - "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 0 - }, - "cert_file": { - "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 1 - }, - "key_file": { - "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 2 - }, - "server_name": { - "description": "Name of the server.", - "type": "string", - "x-order": 3 - }, - "insecure_skip_verify": { - "description": "Disable validation of the server certificate.", - "type": "boolean", - "x-order": 4 - }, - "ca_file_content": { - "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 5 - }, - "cert_file_content": { - "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 6 - }, - "key_file_content": { - "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 3 - }, - "proxy_url": { - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "max_alerts": { - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 5 - }, - "disabled": { - "description": "True if that channel is disabled.", - "type": "boolean", - "x-order": 6 - } - } - }, - "x-order": 17 - }, - "created_at": { - "description": "Rule creation time.", - "type": "string", - "format": "date-time", - "x-order": 18 - } - }, - "x-order": 5 - }, - "created_at": { - "description": "Alert creation time.", - "type": "string", - "format": "date-time", - "x-order": 6 - }, - "updated_at": { - "description": "Alert last update time.", - "type": "string", - "format": "date-time", - "x-order": 7 - } - } - }, - "x-order": 0 - }, - "totals": { - "description": "PageTotals represents total values for pagination.", - "type": "object", - "properties": { - "total_items": { - "description": "Total number of results.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "total_pages": { - "description": "Total number of pages.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Alerts/Toggle": { - "post": { - "description": "Pass empty list to apply toggle action to all existing alerts", - "tags": [ - "Alerts" - ], - "summary": "ToggleAlerts allows to switch alerts state between silenced and unsilenced.", - "operationId": "ToggleAlerts", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "alert_ids": { - "description": "List of alerts that silence state should be switched. If provided array is empty than all\nexisting alerts are switched.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 0 - }, - "silenced": { - "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False.", - "type": "string", - "default": "DO_NOT_CHANGE", - "enum": [ - "DO_NOT_CHANGE", - "TRUE", - "FALSE" - ], - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Channels/Add": { - "post": { - "tags": [ - "Channels" - ], - "summary": "AddChannel adds notification channel.", - "operationId": "AddChannel", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "summary": { - "description": "Short human-readable summary.", - "type": "string", - "x-order": 0 - }, - "email_config": { - "description": "EmailConfig represents email configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "to": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - }, - "x-order": 1 - }, - "pagerduty_config": { - "description": "PagerDutyConfig represents PagerDuty configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "routing_key": { - "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 1 - }, - "service_key": { - "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 2 - }, - "slack_config": { - "description": "SlackConfig represents Slack configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "channel": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 3 - }, - "webhook_config": { - "description": "WebhookConfig represents webhook configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "url": { - "type": "string", - "x-order": 1 - }, - "http_config": { - "description": "HTTPConfig represents HTTP client configuration.", - "type": "object", - "properties": { - "basic_auth": { - "description": "BasicAuth represents basic HTTP auth configuration.", - "type": "object", - "properties": { - "username": { - "type": "string", - "x-order": 0 - }, - "password": { - "type": "string", - "x-order": 1 - }, - "password_file": { - "type": "string", - "x-order": 2 - } - }, - "x-order": 0 - }, - "bearer_token": { - "type": "string", - "x-order": 1 - }, - "bearer_token_file": { - "type": "string", - "x-order": 2 - }, - "tls_config": { - "type": "object", - "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config", - "properties": { - "ca_file": { - "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 0 - }, - "cert_file": { - "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 1 - }, - "key_file": { - "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 2 - }, - "server_name": { - "description": "Name of the server.", - "type": "string", - "x-order": 3 - }, - "insecure_skip_verify": { - "description": "Disable validation of the server certificate.", - "type": "boolean", - "x-order": 4 - }, - "ca_file_content": { - "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 5 - }, - "cert_file_content": { - "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 6 - }, - "key_file_content": { - "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 3 - }, - "proxy_url": { - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "max_alerts": { - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 4 - }, - "disabled": { - "description": "New channel status.", - "type": "boolean", - "x-order": 5 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "channel_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Channels/Change": { - "post": { - "tags": [ - "Channels" - ], - "summary": "ChangeChannel changes notification channel.", - "operationId": "ChangeChannel", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "channel_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Short human-readable summary. Empty value will not change it.", - "type": "string", - "x-order": 1 - }, - "email_config": { - "description": "EmailConfig represents email configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "to": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - }, - "x-order": 2 - }, - "pagerduty_config": { - "description": "PagerDutyConfig represents PagerDuty configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "routing_key": { - "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 1 - }, - "service_key": { - "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 3 - }, - "slack_config": { - "description": "SlackConfig represents Slack configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "channel": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 4 - }, - "webhook_config": { - "description": "WebhookConfig represents webhook configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "url": { - "type": "string", - "x-order": 1 - }, - "http_config": { - "description": "HTTPConfig represents HTTP client configuration.", - "type": "object", - "properties": { - "basic_auth": { - "description": "BasicAuth represents basic HTTP auth configuration.", - "type": "object", - "properties": { - "username": { - "type": "string", - "x-order": 0 - }, - "password": { - "type": "string", - "x-order": 1 - }, - "password_file": { - "type": "string", - "x-order": 2 - } - }, - "x-order": 0 - }, - "bearer_token": { - "type": "string", - "x-order": 1 - }, - "bearer_token_file": { - "type": "string", - "x-order": 2 - }, - "tls_config": { - "type": "object", - "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config", - "properties": { - "ca_file": { - "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 0 - }, - "cert_file": { - "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 1 - }, - "key_file": { - "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 2 - }, - "server_name": { - "description": "Name of the server.", - "type": "string", - "x-order": 3 - }, - "insecure_skip_verify": { - "description": "Disable validation of the server certificate.", - "type": "boolean", - "x-order": 4 - }, - "ca_file_content": { - "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 5 - }, - "cert_file_content": { - "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 6 - }, - "key_file_content": { - "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 3 - }, - "proxy_url": { - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "max_alerts": { - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 5 - }, - "disabled": { - "description": "Enables or disables that channel. Should be set.", - "type": "boolean", - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Channels/List": { - "post": { - "tags": [ - "Channels" - ], - "summary": "ListChannels returns a list of all notifation channels.", - "operationId": "ListChannels", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "page_params": { - "description": "PageParams represents page request parameters for pagination.", - "type": "object", - "properties": { - "page_size": { - "description": "Maximum number of results per page.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "index": { - "description": "Index of the requested page, starts from 0.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "channels": { - "type": "array", - "items": { - "description": "Channel represents a single Notification Channel.\n\nreserved channels\n pushover_config = 5;\n opsgenie_config = 7;\n victorops_config = 9;\n wechat_config = 10;", - "type": "object", - "properties": { - "channel_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Short human-readable summary.", - "type": "string", - "x-order": 1 - }, - "email_config": { - "description": "EmailConfig represents email configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "to": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - }, - "x-order": 2 - }, - "pagerduty_config": { - "description": "PagerDutyConfig represents PagerDuty configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "routing_key": { - "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 1 - }, - "service_key": { - "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 3 - }, - "slack_config": { - "description": "SlackConfig represents Slack configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "channel": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 4 - }, - "webhook_config": { - "description": "WebhookConfig represents webhook configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "url": { - "type": "string", - "x-order": 1 - }, - "http_config": { - "description": "HTTPConfig represents HTTP client configuration.", - "type": "object", - "properties": { - "basic_auth": { - "description": "BasicAuth represents basic HTTP auth configuration.", - "type": "object", - "properties": { - "username": { - "type": "string", - "x-order": 0 - }, - "password": { - "type": "string", - "x-order": 1 - }, - "password_file": { - "type": "string", - "x-order": 2 - } - }, - "x-order": 0 - }, - "bearer_token": { - "type": "string", - "x-order": 1 - }, - "bearer_token_file": { - "type": "string", - "x-order": 2 - }, - "tls_config": { - "type": "object", - "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config", - "properties": { - "ca_file": { - "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 0 - }, - "cert_file": { - "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 1 - }, - "key_file": { - "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 2 - }, - "server_name": { - "description": "Name of the server.", - "type": "string", - "x-order": 3 - }, - "insecure_skip_verify": { - "description": "Disable validation of the server certificate.", - "type": "boolean", - "x-order": 4 - }, - "ca_file_content": { - "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 5 - }, - "cert_file_content": { - "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 6 - }, - "key_file_content": { - "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 3 - }, - "proxy_url": { - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "max_alerts": { - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 5 - }, - "disabled": { - "description": "True if that channel is disabled.", - "type": "boolean", - "x-order": 6 - } - } - }, - "x-order": 0 - }, - "totals": { - "description": "PageTotals represents total values for pagination.", - "type": "object", - "properties": { - "total_items": { - "description": "Total number of results.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "total_pages": { - "description": "Total number of pages.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Channels/Remove": { - "post": { - "tags": [ - "Channels" - ], - "summary": "RemoveChannel removes notification channel.", - "operationId": "RemoveChannel", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "channel_id": { - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Rules/Create": { - "post": { - "tags": [ - "Rules" - ], - "summary": "CreateAlertRule creates Alerting rule.", - "operationId": "CreateAlertRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "template_name": { - "description": "Template name. Can't be specified simultaneously with source_rule_id.", - "type": "string", - "x-order": 0 - }, - "source_rule_id": { - "description": "ID of the rule that will be used as source. Can't be specified simultaneously with template_name.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Rule name.", - "type": "string", - "x-order": 2 - }, - "disabled": { - "description": "New rule status.", - "type": "boolean", - "x-order": 3 - }, - "params": { - "description": "Rule parameters. All template parameters should be set.", - "type": "array", - "items": { - "description": "ParamValue represents a single rule parameter value for List, Change and Update APIs.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "type": { - "description": "ParamType represents template parameter type.", - "type": "string", - "default": "PARAM_TYPE_INVALID", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "x-order": 1 - }, - "bool": { - "description": "Bool value.", - "type": "boolean", - "x-order": 2 - }, - "float": { - "description": "Float value.", - "type": "number", - "format": "double", - "x-order": 3 - }, - "string": { - "description": "String value.", - "type": "string", - "x-order": 4 - } - } - }, - "x-order": 4 - }, - "for": { - "description": "Rule duration. Should be set.", - "type": "string", - "x-order": 5 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_INVALID", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 6 - }, - "custom_labels": { - "description": "All custom labels to add or remove (with empty values) to default labels from template.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "filters": { - "description": "Filters. Should be set.", - "type": "array", - "items": { - "description": "Filter repsents a single filter condition.", - "type": "object", - "properties": { - "type": { - "description": "FilterType represents filter matching type.\n\n - EQUAL: =\n\n!=\n NOT_EQUAL = 2;\n - REGEX: =~\n\n!~\n NOT_REGEX = 4;", - "type": "string", - "default": "FILTER_TYPE_INVALID", - "enum": [ - "FILTER_TYPE_INVALID", - "EQUAL", - "REGEX" - ], - "x-order": 0 - }, - "key": { - "type": "string", - "x-order": 1 - }, - "value": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 8 - }, - "channel_ids": { - "description": "Channels. Should be set.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "rule_id": { - "description": "Rule ID.", - "type": "string", - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Rules/Delete": { - "post": { - "tags": [ - "Rules" - ], - "summary": "DeleteAlertRule deletes Alerting rule.", - "operationId": "DeleteAlertRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "rule_id": { - "description": "Rule ID.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Rules/List": { - "post": { - "tags": [ - "Rules" - ], - "summary": "ListAlertRules returns a list of all Alerting rules.", - "operationId": "ListAlertRules", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "page_params": { - "description": "PageParams represents page request parameters for pagination.", - "type": "object", - "properties": { - "page_size": { - "description": "Maximum number of results per page.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "index": { - "description": "Index of the requested page, starts from 0.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "description": "Rule represents Alert Rule.", - "type": "object", - "properties": { - "rule_id": { - "description": "Rule ID.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "Rule name.", - "type": "string", - "x-order": 1 - }, - "summary": { - "description": "Rule human-readable summary.", - "type": "string", - "x-order": 2 - }, - "template_name": { - "description": "Template used for this rule.", - "type": "string", - "x-order": 3 - }, - "disabled": { - "description": "True if that rule is disabled.", - "type": "boolean", - "x-order": 4 - }, - "expr_template": { - "description": "Expression template.", - "type": "string", - "x-order": 5 - }, - "expr": { - "description": "Expression filled with parameters.", - "type": "string", - "x-order": 6 - }, - "params_definitions": { - "description": "Expression parameters definitions.", - "type": "array", - "items": { - "description": "ParamDefinition represents a single query parameter.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Short human-readable parameter summary.", - "type": "string", - "x-order": 1 - }, - "unit": { - "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_INVALID: Invalid, unknown or absent.\n - PERCENTAGE: %\n - SECONDS: s", - "type": "string", - "default": "PARAM_UNIT_INVALID", - "enum": [ - "PARAM_UNIT_INVALID", - "PERCENTAGE", - "SECONDS" - ], - "x-order": 2 - }, - "type": { - "description": "ParamType represents template parameter type.", - "type": "string", - "default": "PARAM_TYPE_INVALID", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "x-order": 3 - }, - "bool": { - "description": "BoolParamDefinition represents boolean parameter's default value.", - "type": "object", - "properties": { - "default": { - "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False.", - "type": "string", - "default": "DO_NOT_CHANGE", - "enum": [ - "DO_NOT_CHANGE", - "TRUE", - "FALSE" - ], - "x-order": 0 - } - }, - "x-order": 4 - }, - "float": { - "description": "FloatParamDefinition represents float parameter's default value and valid range.", - "type": "object", - "properties": { - "has_default": { - "description": "True if default value is set.", - "type": "boolean", - "x-order": 0 - }, - "default": { - "description": "Default value if has_default is true.", - "type": "number", - "format": "double", - "x-order": 1 - }, - "has_min": { - "description": "True if minimal valid value is set.", - "type": "boolean", - "x-order": 2 - }, - "min": { - "description": "Minimal valid value (inclusive) if has_min is true.", - "type": "number", - "format": "double", - "x-order": 3 - }, - "has_max": { - "description": "True if maximal valid value is set.", - "type": "boolean", - "x-order": 4 - }, - "max": { - "description": "Maximal valid value (inclusive) if has_max is true.", - "type": "number", - "format": "double", - "x-order": 5 - } - }, - "x-order": 5 - }, - "string": { - "description": "StringParamDefinition represents string parameter's default value.", - "type": "object", - "properties": { - "has_default": { - "description": "True if default value is set.", - "type": "boolean", - "x-order": 0 - }, - "default": { - "description": "Default value if has_default is true.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 6 - } - } - }, - "x-order": 7 - }, - "params_values": { - "description": "Expression parameters values.", - "type": "array", - "items": { - "description": "ParamValue represents a single rule parameter value for List, Change and Update APIs.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "type": { - "description": "ParamType represents template parameter type.", - "type": "string", - "default": "PARAM_TYPE_INVALID", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "x-order": 1 - }, - "bool": { - "description": "Bool value.", - "type": "boolean", - "x-order": 2 - }, - "float": { - "description": "Float value.", - "type": "number", - "format": "double", - "x-order": 3 - }, - "string": { - "description": "String value.", - "type": "string", - "x-order": 4 - } - } - }, - "x-order": 8 - }, - "default_for": { - "description": "Default for duration.", - "type": "string", - "x-order": 9 - }, - "for": { - "description": "For duration.", - "type": "string", - "x-order": 10 - }, - "default_severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_INVALID", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 11 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_INVALID", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 12 - }, - "custom_labels": { - "description": "Custom labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 - }, - "labels": { - "description": "Labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 14 - }, - "annotations": { - "description": "Annotations.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 15 - }, - "filters": { - "description": "Filters.", - "type": "array", - "items": { - "description": "Filter repsents a single filter condition.", - "type": "object", - "properties": { - "type": { - "description": "FilterType represents filter matching type.\n\n - EQUAL: =\n\n!=\n NOT_EQUAL = 2;\n - REGEX: =~\n\n!~\n NOT_REGEX = 4;", - "type": "string", - "default": "FILTER_TYPE_INVALID", - "enum": [ - "FILTER_TYPE_INVALID", - "EQUAL", - "REGEX" - ], - "x-order": 0 - }, - "key": { - "type": "string", - "x-order": 1 - }, - "value": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 16 - }, - "channels": { - "description": "Channels.", - "type": "array", - "items": { - "description": "Channel represents a single Notification Channel.\n\nreserved channels\n pushover_config = 5;\n opsgenie_config = 7;\n victorops_config = 9;\n wechat_config = 10;", - "type": "object", - "properties": { - "channel_id": { - "description": "Machine-readable ID.", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Short human-readable summary.", - "type": "string", - "x-order": 1 - }, - "email_config": { - "description": "EmailConfig represents email configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "to": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - }, - "x-order": 2 - }, - "pagerduty_config": { - "description": "PagerDutyConfig represents PagerDuty configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "routing_key": { - "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 1 - }, - "service_key": { - "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 3 - }, - "slack_config": { - "description": "SlackConfig represents Slack configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "channel": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 4 - }, - "webhook_config": { - "description": "WebhookConfig represents webhook configuration.", - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean", - "x-order": 0 - }, - "url": { - "type": "string", - "x-order": 1 - }, - "http_config": { - "description": "HTTPConfig represents HTTP client configuration.", - "type": "object", - "properties": { - "basic_auth": { - "description": "BasicAuth represents basic HTTP auth configuration.", - "type": "object", - "properties": { - "username": { - "type": "string", - "x-order": 0 - }, - "password": { - "type": "string", - "x-order": 1 - }, - "password_file": { - "type": "string", - "x-order": 2 - } - }, - "x-order": 0 - }, - "bearer_token": { - "type": "string", - "x-order": 1 - }, - "bearer_token_file": { - "type": "string", - "x-order": 2 - }, - "tls_config": { - "type": "object", - "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config", - "properties": { - "ca_file": { - "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 0 - }, - "cert_file": { - "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 1 - }, - "key_file": { - "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 2 - }, - "server_name": { - "description": "Name of the server.", - "type": "string", - "x-order": 3 - }, - "insecure_skip_verify": { - "description": "Disable validation of the server certificate.", - "type": "boolean", - "x-order": 4 - }, - "ca_file_content": { - "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time.", - "type": "string", - "x-order": 5 - }, - "cert_file_content": { - "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time.", - "type": "string", - "x-order": 6 - }, - "key_file_content": { - "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 3 - }, - "proxy_url": { - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "max_alerts": { - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 5 - }, - "disabled": { - "description": "True if that channel is disabled.", - "type": "boolean", - "x-order": 6 - } - } - }, - "x-order": 17 - }, - "created_at": { - "description": "Rule creation time.", - "type": "string", - "format": "date-time", - "x-order": 18 - } - } - }, - "x-order": 0 - }, - "totals": { - "description": "PageTotals represents total values for pagination.", - "type": "object", - "properties": { - "total_items": { - "description": "Total number of results.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "total_pages": { - "description": "Total number of pages.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Rules/Toggle": { - "post": { - "tags": [ - "Rules" - ], - "summary": "ToggleAlertRule allows to switch between disabled and enabled states of an Alert Rule.", - "operationId": "ToggleAlertRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "rule_id": { - "description": "Rule ID.", - "type": "string", - "x-order": 0 - }, - "disabled": { - "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False.", - "type": "string", - "default": "DO_NOT_CHANGE", - "enum": [ - "DO_NOT_CHANGE", - "TRUE", - "FALSE" - ], - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ia/Rules/Update": { - "post": { - "tags": [ - "Rules" - ], - "summary": "UpdateAlertRule updates Alerting rule.", - "operationId": "UpdateAlertRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "rule_id": { - "description": "Rule ID.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "Rule name. Should be set.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "New rule status. Should be set.", - "type": "boolean", - "x-order": 2 - }, - "params": { - "description": "Rule parameters. All template parameters should be set.", - "type": "array", - "items": { - "description": "ParamValue represents a single rule parameter value for List, Change and Update APIs.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "type": { - "description": "ParamType represents template parameter type.", - "type": "string", - "default": "PARAM_TYPE_INVALID", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "x-order": 1 - }, - "bool": { - "description": "Bool value.", - "type": "boolean", - "x-order": 2 - }, - "float": { - "description": "Float value.", - "type": "number", - "format": "double", - "x-order": 3 - }, - "string": { - "description": "String value.", - "type": "string", - "x-order": 4 - } - } - }, - "x-order": 3 - }, - "for": { - "description": "Rule duration. Should be set.", - "type": "string", - "x-order": 4 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_INVALID", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 5 - }, - "custom_labels": { - "description": "All custom labels to add or remove (with empty values) to default labels from template.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "filters": { - "description": "Filters. Should be set.", - "type": "array", - "items": { - "description": "Filter repsents a single filter condition.", - "type": "object", - "properties": { - "type": { - "description": "FilterType represents filter matching type.\n\n - EQUAL: =\n\n!=\n NOT_EQUAL = 2;\n - REGEX: =~\n\n!~\n NOT_REGEX = 4;", - "type": "string", - "default": "FILTER_TYPE_INVALID", - "enum": [ - "FILTER_TYPE_INVALID", - "EQUAL", - "REGEX" - ], - "x-order": 0 - }, - "key": { - "type": "string", - "x-order": 1 - }, - "value": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 7 - }, - "channel_ids": { - "description": "Channels. Should be set.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 8 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - } - }, - "securityDefinitions": { - "basicAuth": { - "type": "basic" - } - }, - "security": [ - { - "basicAuth": [] - } - ], - "tags": [ - { - "name": "Components" - }, - { - "name": "DBClusters" - }, - { - "name": "Kubernetes" - }, - { - "name": "LogsAPI" - }, - { - "name": "PSMDBClusters" - }, - { - "name": "PXCClusters" - }, - { - "name": "Alerts" - }, - { - "name": "Channels" - }, - { - "name": "Rules" - }, - { - "name": "Alerting" - }, - { - "name": "Artifacts" - }, - { - "name": "Backups" - }, - { - "name": "Locations" - }, - { - "name": "RestoreHistory" - }, - { - "name": "Collector" - }, - { - "name": "Filters" - }, - { - "name": "MetricsNames" - }, - { - "name": "ObjectDetails" - }, - { - "name": "Profile" - }, - { - "name": "Platform" - } - ], - "x-readme": { - "samples-languages": [ - "curl", - "go", - "node", - "python" - ] - } -} \ No newline at end of file diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 3ce02bed10..afb58c022a 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -12,7 +12,7 @@ "swagger": "2.0", "info": { "title": "PMM API", - "version": "public" + "version": "v2" }, "paths": { "/logs.zip": { @@ -26562,5 +26562,6 @@ "node", "python" ] - } + }, + "x-readme-id": "626badcabbc59c02acc1a53f" } \ No newline at end of file diff --git a/docs/api/advisor-api/advisors-and-advisor-checks.md b/docs/api/advisor-api/advisors-and-advisor-checks.md index 7a50116fde..ae9d17337c 100644 --- a/docs/api/advisor-api/advisors-and-advisor-checks.md +++ b/docs/api/advisor-api/advisors-and-advisor-checks.md @@ -2,6 +2,6 @@ title: Percona Advisors and Advisors checks slug: advisors-and-advisor-checks category: 6291050b9400a1001ae1877d -order: 2 +order: 1 hidden: 0 --- diff --git a/docs/api/advisor-api/failed-checks.md b/docs/api/advisor-api/failed-checks.md index b240596293..a112246bd2 100644 --- a/docs/api/advisor-api/failed-checks.md +++ b/docs/api/advisor-api/failed-checks.md @@ -2,6 +2,6 @@ title: List of problems detected by Advisors slug: failed-checks category: 6291050b9400a1001ae1877d -order: 1 +order: 2 hidden: 0 --- diff --git a/docs/api/advisor-api/overview.md b/docs/api/advisor-api/overview.md index f791f36668..ae9fa13284 100644 --- a/docs/api/advisor-api/overview.md +++ b/docs/api/advisor-api/overview.md @@ -1,6 +1,6 @@ --- title: Overview -slug: percona-advisors +slug: pmm-advisors category: 6291050b9400a1001ae1877d order: 0 --- @@ -10,6 +10,6 @@ This section is about API for managing Percona [Advisors](https://docs.percona.c This section has three main subsections. -- In [List of problems detected by Advisors](reference/failed-checks) you can find API to get information about potential problems with your Infrastructure detected by Advisors. -- [Percona Advisors and Advisors checks](reference/advisors-and-advisor-checks) lists all Advisors and Advisor Checks available in your PMM. -- [Changing Advisors and Advisor checks](reference/changing-advisor-checks) will help you automate Advisor checks modification if needed. +- In [List of problems detected by Advisors](failed-checks) you can find API to get information about potential problems with your Infrastructure detected by Advisors. +- [Percona Advisors and Advisors checks](advisors-and-advisor-checks) lists all Advisors and Advisor Checks available in your PMM. +- [Changing Advisors and Advisor checks](changing-advisor-checks) will help you automate Advisor checks modification if needed. diff --git a/docs/api/backups/list-locations.md b/docs/api/backups/list-locations.md index bb64df8151..97723f3152 100644 --- a/docs/api/backups/list-locations.md +++ b/docs/api/backups/list-locations.md @@ -2,7 +2,7 @@ title: List Locations slug: listlocations excerpt: ListLocations returns a list of all backup locations. -category: 626badcabbc59c02acc1a540 +category: 66aa56507e69ed004a736efe --- The following API call will list all the available backup locations: diff --git a/docs/api/backups/overview.md b/docs/api/backups/overview.md new file mode 100644 index 0000000000..c4f8b2915e --- /dev/null +++ b/docs/api/backups/overview.md @@ -0,0 +1,24 @@ +--- +title: Overview +slug: database-backups +category: 66aa56507e69ed004a736efe +order: 0 +--- + + +This section provides a set of API endpoints that allow to backup databases. Currently, PMM Backup Management works with the following database families: + +- MongoDB (Generally Available) +- MySQL (in Technical Preview) + + +To be able to make a backup, you should start by [preparing a backup location](https://docs.percona.com/percona-monitoring-and-management/get-started/backup/prepare_storage_location.html#prepare-a-location-for-local-backups), which is where the backup artifacts will be physically stored. Although the backup location can be re-used to store multiple backups, we generally recommend to create a backup location per database service, which will help organize your storage. + +Here a few other references to : + +- [Make a backup](startbackup) +- [Restore the database from a backup](restorebackup) +- [List restore history items](listrestorehistory) +- [List available backup locations](listlocations) + +Read [more](https://docs.percona.com/percona-monitoring-and-management/get-started/backup/index.html). diff --git a/docs/api/backups/restore-backup.md b/docs/api/backups/restore-backup.md index 50f212d5e4..52e9ec9dbc 100644 --- a/docs/api/backups/restore-backup.md +++ b/docs/api/backups/restore-backup.md @@ -2,8 +2,7 @@ title: Restore from a backup slug: restorebackup excerpt: This endpoint allows to restore a database from a previously made backup. -category: 626badcabbc59c02acc1a540 -order: 1 +category: 66aa56507e69ed004a736efe --- PMM can backup the monitored services. diff --git a/docs/api/backups/start-backup.md b/docs/api/backups/start-backup.md index 918508c0c4..49939ca46a 100644 --- a/docs/api/backups/start-backup.md +++ b/docs/api/backups/start-backup.md @@ -2,8 +2,7 @@ title: Make a backup slug: startbackup excerpt: This endpoint allows to make an unscheduled, or ad-hoc, backup of a given service. -category: 626badcabbc59c02acc1a540 -order: 0 +category: 66aa56507e69ed004a736efe --- PMM can backup the monitored services. diff --git a/docs/api/inventory/add-node.md b/docs/api/inventory/add-node.md index 79b725c3ac..67adcbbe54 100644 --- a/docs/api/inventory/add-node.md +++ b/docs/api/inventory/add-node.md @@ -14,8 +14,6 @@ Let's see how to add a Node of type `GENERIC_NODE` using the old and new API cal Old API call: -````shell: - ```shell curl --insecure -X POST \ -H 'Authorization: Basic YWRtaW46YWRtaW4=' \ @@ -34,7 +32,7 @@ curl --insecure -X POST \ } } ' -```` +``` New API call: