Skip to content
← All documentation

Dashier documentation

Generated REST API: endpoints and authentication

Use Dashier’s per-source REST routes, API keys, policies, and pagination safely.

Dashier exposes a REST route for each data source. If a source slug is members, its collection path is /api/v1/members. Collection requests list or create records; append a record ID for a single-record read, update, or delete.

Endpoint map

  • GET /api/v1/{slug} lists records. Query options include page, perpage (up to 100), search, sort, dir, and filter{field} filters.
  • POST /api/v1/{slug} creates a record after field validation.
  • GET /api/v1/{slug}/{id} reads one record.
  • PUT /api/v1/{slug}/{id} updates a record after validation.
  • DELETE /api/v1/{slug}/{id} deletes a record.
  • GET /api/v1/{slug}/schema returns this source’s JSON Schema, create-body schema, TypeScript interface, and a field summary.

Collection responses include data, total, page, and per_page. Errors are JSON with an HTTP status. Invalid queries return 400; invalid record values can return 422; authentication and policy failures use authorization-related statuses.

Authenticate requests

The API accepts a project API key in x-api-key or Authorization: Bearer. Keys have read, write, or admin scopes. The raw key is shown at creation and only its SHA-256 hash is stored. Without a key, route resolution requires org and project query parameters; a signed-in organization member can also be checked against project membership policy.

curl -H "x-api-key: $DASHIER_API_KEY" "$DASHIER_ORIGIN/api/v1/members?page=1&per_page=20"

Keep DASHIERAPIKEY in a server-side secret manager or environment variable. Never put a private key in frontend JavaScript, a public repository, a mobile app, or a shared example. A public endpoint is a separate, deliberate choice: configure its policy narrowly and expose only data safe to disclose.

Configure endpoint policy

Every route starts disabled and withheld from the API channel, so a new data source answers 403 until someone exposes it deliberately. Switch endpoints on in the API Endpoints screen, per method or with one master switch per table.

Routes can use Public, Authenticated, or Role access. Rate limits apply per key or IP according to policy. Test every method you use, including a denied case. See Permissions and Integrate with existing apps.

Read the schema first

GET /api/v1/{slug}/schema describes a source instead of listing it: a JSON Schema for a record, a second schema containing only writable fields (what a create request may send), a TypeScript interface, and a field summary. It follows the same policy as GET /api/v1/{slug}, so expose the GET route first. The same documents appear in a source’s Schema tab, where you can copy or download them.