Skip to content

Endpoint

One endpoint of an API on a plate: method, path, what it does and how to authenticate.

import Endpoint from '@sypnia/ui/astro/Endpoint.astro'

On this page
  1. Read, write, delete
  2. When to use it
  3. For everyone

Read, write, delete

The method has its colour; the slot badges holds a version or where it exists.

GET /v1/tables/{table}/rows
The rows of a table, 20 at a time, newest first.
Authentication
API token (read)
POST /v1/tables/{table}/rows v1.4
Adds rows; up to 500 in one call.
Authentication
API token (write)
DELETE /v1/tables/{table}
Deletes the table and its rows.
Authentication
API token (admin)
Code
---
import Endpoint from '@sypnia/ui/astro/Endpoint.astro';
import VersionBadge from '@sypnia/ui/astro/VersionBadge.astro';
---
<div class="sy-docs sy-stack" style="min-height:0;background:none;--gap:var(--s-4)">
  <Endpoint method="GET" path="/v1/tables/{table}/rows" auth="API token (read)">The rows of a table, 20 at a time, newest first.</Endpoint>
  <Endpoint method="POST" path="/v1/tables/{table}/rows" auth="API token (write)"><VersionBadge slot="badges" version="1.4" status="new" />Adds rows; up to 500 in one call.</Endpoint>
  <Endpoint method="DELETE" path="/v1/tables/{table}" auth="API token (admin)">Deletes the table and its rows.</Endpoint>
</div>

When to use it

Use it when

  • API reference pages, followed by Params, RequestExample, ResponseExample and ErrorList.

Do not use it when

  • Mentioning an endpoint inside a sentence: write it as code.

For everyone

  • The method is written, not only coloured.
  • With title it gets a heading, so it shows in «On this page».
  1. Read, write, delete
  2. When to use it
  3. For everyone

    Search pages, sections and terms