From d3c153bcbc40ac4b72660dcfb75dc316d1e17731 Mon Sep 17 00:00:00 2001 From: adela Date: Fri, 17 Apr 2026 15:17:14 +0200 Subject: [PATCH 1/2] docs: update GitHub Actions data masking tutorials to latest API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Setting names: bb.workspace.semantic-types → SEMANTIC_TYPES, bb.workspace.data-classification → DATA_CLASSIFICATION - Policy URL: policies/masking_rule → workspaces/-/policies/masking_rule - Masking exception → exemption (API rename) - Fix classification file reference Co-Authored-By: Claude Opus 4.6 --- docs/tutorials/github-action-data-masking-part1.mdx | 4 ++-- docs/tutorials/github-action-data-masking-part2.mdx | 6 +++--- docs/tutorials/github-action-data-masking-part3.mdx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/tutorials/github-action-data-masking-part1.mdx b/docs/tutorials/github-action-data-masking-part1.mdx index e92e6ace6..2df31a78a 100644 --- a/docs/tutorials/github-action-data-masking-part1.mdx +++ b/docs/tutorials/github-action-data-masking-part1.mdx @@ -103,7 +103,7 @@ Go to **Data Access > Semantic Types** and click **Add**. You can create a new s Find the step `Apply semantic type`, which will apply the semantic type to the database via API. All the masking algorithms should be defined in one file in the root directory as `masking/semantic-type.json`. ```bash -response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/settings/bb.workspace.semantic-types?allow_missing=true" \ +response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/settings/SEMANTIC_TYPES" \ --header "Authorization: Bearer ${BYTEBASE_TOKEN}" \ --header "Content-Type: application/json" \ --data @"$CHANGED_FILE") @@ -126,7 +126,7 @@ Go to **Data Access > Global Masking** and click **Add**. You can create a new g Find the step `Apply global masking rule`, which will apply the global masking rule to the database via API. All the global masking rules should be defined in one file in the root directory as `masking/global-masking-rule.json`. The code it calls Bytebase API is as follows: ```bash -response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/policies/masking_rule?allow_missing=true&update_mask=payload" \ +response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/workspaces/-/policies/masking_rule?allow_missing=true&update_mask=payload" \ --header "Authorization: Bearer ${BYTEBASE_TOKEN}" \ --header "Content-Type: application/json" \ --data @"$CHANGED_FILE") diff --git a/docs/tutorials/github-action-data-masking-part2.mdx b/docs/tutorials/github-action-data-masking-part2.mdx index 7fed7e2b8..c6981963c 100644 --- a/docs/tutorials/github-action-data-masking-part2.mdx +++ b/docs/tutorials/github-action-data-masking-part2.mdx @@ -73,16 +73,16 @@ Go to a project page, then click **Manage > Masking Exemptions**, you can grant ### In GitHub Workflow -Find the step `Apply masking exception`, which will apply the masking exception to the database and the process is similar, the code it calls Bytebase API is as follows: +Find the step `Apply masking exemption`, which will apply the masking exemption to the database and the process is similar, the code it calls Bytebase API is as follows: ```bash -response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/projects/${PROJECT_NAME}/policies/masking_exception?allow_missing=true&update_mask=payload" \ +response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/projects/${PROJECT_NAME}/policies/masking_exemption?allow_missing=true&update_mask=payload" \ --header "Authorization: Bearer ${BYTEBASE_TOKEN}" \ --header "Content-Type: application/json" \ --data @"$CHANGED_FILE") ``` -By changing file `masking/projects/**/masking-exception.json`, create a PR and then merge, the change will be applied. +By changing file `masking/projects/**/masking-exemption.json`, create a PR and then merge, the change will be applied. Log in Bytebase console, go to the project `Sample Project`, click **Manage > Masking Exemptions**, you can see the masking exemption is applied. diff --git a/docs/tutorials/github-action-data-masking-part3.mdx b/docs/tutorials/github-action-data-masking-part3.mdx index 2f3425153..f50750c0f 100644 --- a/docs/tutorials/github-action-data-masking-part3.mdx +++ b/docs/tutorials/github-action-data-masking-part3.mdx @@ -46,10 +46,10 @@ Go to **Data Access > Data Classification**, you can upload the classification f ### In GitHub Workflow -Find the step `Apply classification`, which will apply the classification to the database via API. All the classifications should be defined in one file in the root directory as `masking/classification.json`. The code it calls Bytebase API is as follows: +Find the step `Apply classification`, which will apply the classification to the database via API. All the classifications should be defined in one file in the root directory as `masking/data-classification.json`. The code it calls Bytebase API is as follows: ```bash -response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/settings/bb.workspace.classification" \ +response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/settings/DATA_CLASSIFICATION" \ --header "Authorization: Bearer ${BYTEBASE_TOKEN}" \ --header "Content-Type: application/json" \ --data @"$CHANGED_FILE") From a3f8c3056475bdfaba0057f6df6597a9f3dda8d5 Mon Sep 17 00:00:00 2001 From: adela Date: Fri, 17 Apr 2026 16:07:10 +0200 Subject: [PATCH 2/2] fix: use camelCase query params per OpenAPI spec Query params allowMissing and updateMask use camelCase as documented in the Bytebase OpenAPI spec at api.bytebase.com. Co-Authored-By: Claude Opus 4.6 --- docs/tutorials/github-action-data-masking-part1.mdx | 2 +- docs/tutorials/github-action-data-masking-part2.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/github-action-data-masking-part1.mdx b/docs/tutorials/github-action-data-masking-part1.mdx index 2df31a78a..bca522139 100644 --- a/docs/tutorials/github-action-data-masking-part1.mdx +++ b/docs/tutorials/github-action-data-masking-part1.mdx @@ -126,7 +126,7 @@ Go to **Data Access > Global Masking** and click **Add**. You can create a new g Find the step `Apply global masking rule`, which will apply the global masking rule to the database via API. All the global masking rules should be defined in one file in the root directory as `masking/global-masking-rule.json`. The code it calls Bytebase API is as follows: ```bash -response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/workspaces/-/policies/masking_rule?allow_missing=true&update_mask=payload" \ +response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/workspaces/-/policies/masking_rule?allowMissing=true&updateMask=payload" \ --header "Authorization: Bearer ${BYTEBASE_TOKEN}" \ --header "Content-Type: application/json" \ --data @"$CHANGED_FILE") diff --git a/docs/tutorials/github-action-data-masking-part2.mdx b/docs/tutorials/github-action-data-masking-part2.mdx index c6981963c..aa28a8f0c 100644 --- a/docs/tutorials/github-action-data-masking-part2.mdx +++ b/docs/tutorials/github-action-data-masking-part2.mdx @@ -76,7 +76,7 @@ Go to a project page, then click **Manage > Masking Exemptions**, you can grant Find the step `Apply masking exemption`, which will apply the masking exemption to the database and the process is similar, the code it calls Bytebase API is as follows: ```bash -response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/projects/${PROJECT_NAME}/policies/masking_exemption?allow_missing=true&update_mask=payload" \ +response=$(curl -s -w "\n%{http_code}" --request PATCH "${BYTEBASE_API_URL}/projects/${PROJECT_NAME}/policies/masking_exemption?allowMissing=true&updateMask=payload" \ --header "Authorization: Bearer ${BYTEBASE_TOKEN}" \ --header "Content-Type: application/json" \ --data @"$CHANGED_FILE")