diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index bd5ec32d58..4aefa14550 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -9,26 +9,35 @@ on: - "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.json b/api/swagger/swagger.json index 872fef72b9..a69241f74f 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": { "/v1/actions/{action_id}": { @@ -27171,5 +27171,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 60f3f83038..feb19c1528 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 4f69c28081..788f7ffbe8 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.