README
QuickStart
Walkthrough
# Start PostgreSQL + PostgREST (port 3000)
cd portal-db
make portal-db-up
# Add test data
make postgrest-hydrate-testdata
# Admin token (copy export command)
make postgrest-gen-jwt admin
# Reader token (optional)
make postgrest-gen-jwt reader
# Paste the export commands here
export JWT_TOKEN_ADMIN="..."
export JWT_TOKEN_READER="..."
# Test the API
curl http://localhost:3000/networks -H "Authorization: Bearer $JWT_TOKEN_READER" | jq
curl http://localhost:3000/organizations -H "Authorization: Bearer $JWT_TOKEN_READER" | jq
curl http://localhost:3000/portal_accounts -H "Authorization: Bearer $JWT_TOKEN_READER" | jq
curl -X POST http://localhost:3000/portal_applications \
-H "Authorization: Bearer $JWT_TOKEN_ADMIN" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{"portal_account_id":"10000000-0000-0000-0000-000000000004","portal_application_name":"CLI Quickstart App","secret_key_hash":"demo","secret_key_required":false}' \
| jq
# Refresh OpenAPI spec before launching Swagger UI
make postgrest-generate-openapi
# Launch Swagger UI
make postgrest-swagger-uiAuthentication
Auth Summary
Database Roles Roles
Testing auth locally
JWT Generation
How it Works
📚 Resources
Was this helpful?
