POST /session
Start User Session
POST
/session
Open a new user session after token issuance.
Called immediately after POST /auth with the same bearer token. Validates
that user_key matches the token's consumer_key and that the token context
is USER_SESSION. Creates a UserSession document and updates User.last_login
within a single ArangoDB transaction. Returns session metadata including name,
scope, and preferences for frontend initialisation.
Emits: (direct transaction — no event class)
Required scope: auth:session:start
Authorizations
OAuth2PasswordBearer
password Flow
Token URL
"/api/auth"Scopes:
"admin"User can access and edit users and system settings"library"User can access and edit products"production"User can access and edit production plans"operator"User can access the operator panel and make production declarations
Request Body
application/json
JSON "user_key": "string"
{
}
Responses
Successful Response
application/json
JSON "status": 200, "message": "string", "detail": "string"
{
}