mirror of
https://github.com/supabase/supabase.git
synced 2026-06-17 21:23:59 +08:00
Contributes to DOCS-1052 ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Resolves MDX linting errors related to "simple" where it applies. There was a couple cases that did not apply. For example, a product with "Simple" in the name. These changes are made in context, either by removing or using a more descriptive synonym like "minimal" or "basic". ## Tophatting 1. Read each of the diffs. 2. See that the text still makes sense in context. For extra due diligence, you can run `pnpm lint:mdx` locally and see the 'simple' errors that remain and whether they are worth addressing. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit * **Documentation** * Updated many guide, tutorial, and troubleshooting pages with clearer “basic”/“minimal” wording across setup steps, local testing instructions, security cautions, and RLS guidance. * Refined headings, example descriptions, and inline comments for consistency (including deployment, MCP, metrics API, and search/function phrasing). * Improved readability with small snippet formatting tweaks (whitespace plus import/comment ordering) and added a self-hosting debugging note for Envoy admin endpoints via a short-lived `curl` container. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Chris Chinchilla <chris.ward@supabase.io> Co-authored-by: Nik Richers <nrichers@gmail.com>
52 lines
2.1 KiB
Plaintext
52 lines
2.1 KiB
Plaintext
<Accordion
|
|
type="default"
|
|
openBehaviour="multiple"
|
|
chevronAlign="right"
|
|
justified
|
|
size="medium"
|
|
className="rounded-lg border border-foreground/10 bg-surface-100 text-foreground-light [&>div]:space-y-4 p-4"
|
|
>
|
|
|
|
<AccordionItem
|
|
header={<span className="text-foreground font-medium">What you can do with the Metrics API</span>}
|
|
id="how-do-i-check-when-a-user-went-through-mfa"
|
|
className="border-0 px-2 py-4"
|
|
>
|
|
|
|
Every Supabase project exposes a metrics feed at `https://<project-ref>.supabase.co/customer/v1/privileged/metrics`. Replace `<project-ref>` with the identifier from your project URL or from the dashboard sidebar.
|
|
|
|
1. Copy your project reference and confirm the base URL using the helper below.
|
|
|
|
<ProjectConfigVariables variable="url" />
|
|
|
|
2. Configure your collector to scrape once per minute. The endpoint already emits the full set of metrics on each request.
|
|
3. Authenticate with HTTP Basic Auth:
|
|
|
|
- **Username**: `service_role`
|
|
- **Password**: a **Secret API key** (`sb_secret_...`). You can create/copy it in [**Project Settings → API Keys**](/dashboard/project/_/settings/api-keys). For more context, see [Understanding API keys](/docs/guides/getting-started/api-keys).
|
|
|
|
To test locally, run `curl` with your Secret API key:
|
|
|
|
```bash
|
|
curl <project-url>/customer/v1/privileged/metrics \
|
|
--user 'service_role:sb_secret_...'
|
|
```
|
|
|
|
You can provision long-lived automation tokens in two ways:
|
|
|
|
- Create an account access token once at [**Account Settings > Access Tokens**](/dashboard/account/tokens) and reuse it wherever you configure observability tooling.
|
|
- **Optional**: programmatically exchange an access token for project API keys via the [Management API](/docs/reference/api/management-projects-api-keys-retrieve).
|
|
|
|
```bash
|
|
# (Optional) Exchange an account access token for project API keys
|
|
export SUPABASE_ACCESS_TOKEN="your-access-token"
|
|
export PROJECT_REF="your-project-ref"
|
|
|
|
curl -H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \
|
|
"https://api.supabase.com/v1/projects/$PROJECT_REF/api-keys?reveal=true"
|
|
```
|
|
|
|
</AccordionItem>
|
|
|
|
</Accordion>
|