REST API
Learn how to use the Squadbase REST API.
Squadbase REST API
The Squadbase REST API lets your app fetch user information and implement access control or RBAC with minimal effort.
This guide explains how to call the API.
In development, you can use the SDKs below to work with mock data, allowing you to test even when the cookie is absent:
- Streamlit: squadbase-streamlit
- Next.js: @squadbase/nextjs
- Server-side JavaScript: @squadbase/server
Fetching user information
Endpoint:
Request
Pass the authentication token from the __Host-squadbase-session
cookie in the Authorization header:
Response
The API returns the user information in JSON:
Prop | Type | Default |
---|---|---|
username? | string | - |
email? | string | - |
firstName? | string | - |
lastName? | string | - |
iconUrl? | string | null | - |
roles? | string[] | - |