All self-hosted PowerSync Service instances ship with a Diagnostics API. This API provides the following diagnostic information:
  • Connections → Connected source backend database and any active errors associated with the connection.
  • Active Sync Rules → Currently deployed sync rules and the status of the sync rules.

Configuration

  1. To enable the Diagnostics API, specify an API token in your PowerSync YAML file:
powersync.yaml
api:
  tokens:
    - YOUR_API_TOKEN
Make sure to use a secure API token as part of this configuration
  1. Restart the PowerSync service.
  2. Once configured, send an HTTP request to your PowerSync Service Diagnostics API endpoint. Include the API token set in step 1 as a Bearer token in the Authorization header.
curl -X POST http://localhost:8080/api/admin/v1/diagnostics \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"