You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Log in as the admin user, and go to **Security & Policy > Users & Groups**. Click **+ Add User**, fill in with `api-example`, choose the `DBA` role that is sufficient for this tutorial and click **Confirm**.
1
+
1. Log in as 'Workspace Admin', and go to **IAM & Admin** > **Users & Groups**. Click **+ Add User**, fill in with `api-sample`, choose the `Workspace DBA` role sufficient for this tutorial and click **Confirm**.
@@ -34,15 +34,16 @@ This tutorial code repository is at https://github.com/bytebase/api-example/tree
34
34
35
35
## Obtain the Access Token
36
36
37
-
1. Go to [Bytebase API Example
38
-
repo](https://github.com/bytebase/api-example) and clone it.
37
+
1. Go to [Bytebase API Example repo](https://github.com/bytebase/api-example) and clone it.
39
38
40
-
1. Go to subfolder `sql-review`, and follow the instructions in the `README.md` to run the scripts. replace the `bytebase_url`, `bytebase_account`, `bytebase_password` with your own values. Then you will get a `bytebase_token` looks like `ey....9V8s`.
39
+
1. Navigate to the `sql-review` subfolder and follow the instructions in the `README.md` file of the example code repository to execute the scripts.
40
+
41
+
1. Replace `bytebase_url`, `bytebase_account`, and `bytebase_password` in the commands below with your own values, then run them to obtain a `bytebase_token` in your terminal.
You may notice that the SQL review rules are not applied to any resources yet from the above screenshot. In Bytebase, the SQL review rules can be applied to the`environments` or `projects`. Project-level rules take precedence over environment-level rules.
72
+
We'll apply these SQL review rules to`environments` or `projects`. Project-level rules take precedence over environment-level rules.
84
73
85
-
1.Follow the `README.md` to run the scripts to apply the SQL review rules to environments.
74
+
1.Run these command in 'README.md' of the repo to apply the SQL review rules to environments.
Congratulations! You can now codify SQL review rules using the Bytebase API, in addition to the Bytebase GUI, making SQL review policy as code a reality.
0 commit comments