localhost:8080
. Register the first admin account which will be granted Workspace Admin
.
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.
env-template.local
to .env.local
.Update the variables.
NEXT_PUBLIC_BB_URL
: http://localhost:8080
NEXT_PUBLIC_BB_SERVICE_ACCOUNT
: api-example
NEXT_PUBLIC_BB_SERVICE_KEY
: service key copied in previous stepaudit-log
, and run the following commands to start the demo application.
page.tsx
, we fetch all projects by calling the /v1/projects API before any project selection.
startTime
and endTime
in the request body via filter
.
db-fetch-user-permission.tsx
, if the user select a speicifc project, we fetch the project-level audit log via /v1/projects/PROJECT_ID/auditLogs:search API. The time range filter is the same as the workspace-level audit log.