api referenceGET
GET
Auth
Check the current session and log out.
GET/api/session
Current session: who's signed in (if anyone), the org, client config, and the caller's expanded permission set. Returns 200 with "user": null when logged out rather than 401 — this endpoint always answers.
Response
{
"user": { "id": 12, "name": "Jane Doe", "email": "[email protected]", "groups": [1, 4], "digest_enabled": true },
"org": { "id": 1, "name": "Acme", "slug": "acme" },
"client_config": {
"disable_public_urls": false,
"ai_sql_generation": true
},
"permissions": ["view_query", "create_query", "edit_query"],
"is_admin": false
}GET/api/logout
Clear the session cookie and log out. Also available as POST /api/logout for clients that can't send a GET with side effects. Returns 204 with no body either way.