auth
Vesta API · 6.0.82 · Community with mTLS
POST/api/v1/auth/loginLogin
Login endpoint - returns JWT token
Request body
Required
application/x-www-form-urlencoded
Schema
Body_login_api_v1_auth_login_post
Authentication
Anonymous access
Responses
200
Successful response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"access_token": {
"type": "string"
},
"token_type": {
"const": "bearer",
"type": "string"
},
"user": {
"additionalProperties": false,
"properties": {
"org_id": {
"type": "string"
},
"role": {
"type": "string"
},
"username": {
"type": "string"
}
},
"required": [
"username",
"role",
"org_id"
],
"type": "object"
}
},
"required": [
"access_token",
"token_type",
"user"
],
"type": "object"
}401
Request refused or failed
Headers
{
"WWW-Authenticate": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"anyOf": [
{
"additionalProperties": false,
"properties": {
"detail": {
"const": "Invalid credentials",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"detail": {
"const": "Invalid tenant credentials",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}
]
}403
Only in demo deployment mode: ordinary API surface is denied before handlers
Headers
{
"X-Vnbui-Environment": {
"schema": {
"type": "string"
}
},
"X-Vnbui-Simulated": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"additionalProperties": false,
"properties": {
"code": {
"const": "DEMO_POLICY_DENIED",
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"environment": {
"const": "demo",
"type": "string"
},
"simulated": {
"const": true,
"type": "boolean"
}
},
"required": [
"detail",
"environment",
"simulated"
],
"type": "object"
}500
Unhandled exception outside route-level conversion; body is plain text
text/plain
Schema
{
"const": "Internal Server Error",
"type": "string"
}POST/api/v1/auth/logoutLogout
Logout endpoint. JWT is stateless so this is a no-op server-side; the client clears its token.
Authentication
Responses
200
Successful response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
}401
Bearer absent, invalid, disabled, stale or organization unavailable
Headers
{
"WWW-Authenticate": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"anyOf": [
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"detail": {
"const": "Invalid tenant credentials",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}
]
}403
Only in demo deployment mode: ordinary API surface is denied before handlers
Headers
{
"X-Vnbui-Environment": {
"schema": {
"type": "string"
}
},
"X-Vnbui-Simulated": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"additionalProperties": false,
"properties": {
"code": {
"const": "DEMO_POLICY_DENIED",
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"environment": {
"const": "demo",
"type": "string"
},
"simulated": {
"const": true,
"type": "boolean"
}
},
"required": [
"detail",
"environment",
"simulated"
],
"type": "object"
}500
Unhandled exception outside route-level conversion; body is plain text
text/plain
Schema
{
"const": "Internal Server Error",
"type": "string"
}GET/api/v1/auth/meGet Current User Info
Persisted profile only. Optional display fields are explicit JSON nulls.
Authentication
Responses
200
Successful response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"auth_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"can_manage_installation": {
"type": "boolean"
},
"created_at": {
"anyOf": [
{
"description": "ISO 8601 timestamp as serialized by the handler; legacy values may omit a UTC offset.",
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"is_platform_admin": {
"type": "boolean"
},
"last_login": {
"anyOf": [
{
"description": "ISO 8601 timestamp as serialized by the handler; legacy values may omit a UTC offset.",
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"org_id": {
"type": "string"
},
"role": {
"type": "string"
},
"role_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"username": {
"type": "string"
}
},
"required": [
"id",
"username",
"role",
"org_id",
"auth_source",
"role_source",
"full_name",
"email",
"oidc_issuer",
"is_platform_admin",
"can_manage_installation",
"is_active",
"last_login",
"created_at"
],
"type": "object"
}401
Bearer absent, invalid, disabled, stale or organization unavailable
Headers
{
"WWW-Authenticate": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"anyOf": [
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"detail": {
"const": "Invalid tenant credentials",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}
]
}403
Only in demo deployment mode: ordinary API surface is denied before handlers
Headers
{
"X-Vnbui-Environment": {
"schema": {
"type": "string"
}
},
"X-Vnbui-Simulated": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"additionalProperties": false,
"properties": {
"code": {
"const": "DEMO_POLICY_DENIED",
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"environment": {
"const": "demo",
"type": "string"
},
"simulated": {
"const": true,
"type": "boolean"
}
},
"required": [
"detail",
"environment",
"simulated"
],
"type": "object"
}500
Unhandled exception outside route-level conversion; body is plain text
text/plain
Schema
{
"const": "Internal Server Error",
"type": "string"
}GET/api/v1/auth/oidc/callbackOidc Callback
Handle OIDC callback after authentication. Exchanges code for tokens, creates/updates user, returns JWT. Redirects to frontend with token in URL fragment.
Parameters
code · query · Optional
{
"title": "Code",
"type": "string"
}state · query · Optional
{
"title": "State",
"type": "string"
}error · query · Optional
{
"title": "Error",
"type": "string"
}error_description · query · Optional
{
"title": "Error Description",
"type": "string"
}Authentication
Responses
302
Redirect to frontend with access token in URL fragment
Headers
{
"Location": {
"schema": {
"type": "string"
}
},
"Set-Cookie": {
"description": "Login sets oidc_state and oidc_pkce cookies; callback deletes both cookies on success and failure.",
"schema": {
"type": "string"
}
}
}400
Provider rejection, exchange failure, invalid local state/code/PKCE and request validation failure use HTML; browser custody cookies are deleted.
Headers
{
"Set-Cookie": {
"schema": {
"type": "string"
}
}
}text/html
Schema
{
"type": "string"
}401
If a Bearer header is supplied, middleware may reject malformed tenant credentials before route dispatch
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"const": "Invalid tenant credentials",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}403
Only in demo deployment mode: ordinary API surface is denied before handlers
Headers
{
"X-Vnbui-Environment": {
"schema": {
"type": "string"
}
},
"X-Vnbui-Simulated": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"additionalProperties": false,
"properties": {
"code": {
"const": "DEMO_POLICY_DENIED",
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"environment": {
"const": "demo",
"type": "string"
},
"simulated": {
"const": true,
"type": "boolean"
}
},
"required": [
"detail",
"environment",
"simulated"
],
"type": "object"
}500
Callback or user provisioning transaction failed; browser custody cookies are deleted
Headers
{
"Set-Cookie": {
"schema": {
"type": "string"
}
}
}text/html
Schema
{
"type": "string"
}text/plain
Schema
{
"const": "Internal Server Error",
"type": "string"
}503
OIDC organization binding unavailable; browser custody cookies are deleted
Headers
{
"Set-Cookie": {
"schema": {
"type": "string"
}
}
}text/html
Schema
{
"type": "string"
}GET/api/v1/auth/oidc/loginOidc Login
Initiate OIDC login flow. Redirects user to OIDC provider. Frontend should redirect to this URL or fetch it and redirect client-side. Returns: 302 redirect to OIDC provider, or 400 if OIDC not configured
Authentication
Anonymous access
Responses
302
Redirect to issuer authorization URL
Headers
{
"Location": {
"schema": {
"type": "string"
}
},
"Set-Cookie": {
"description": "Login sets oidc_state and oidc_pkce cookies; callback deletes both cookies on success and failure.",
"schema": {
"type": "string"
}
}
}400
Request refused or failed
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}401
If a Bearer header is supplied, middleware may reject malformed tenant credentials before route dispatch
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"const": "Invalid tenant credentials",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}403
Only in demo deployment mode: ordinary API surface is denied before handlers
Headers
{
"X-Vnbui-Environment": {
"schema": {
"type": "string"
}
},
"X-Vnbui-Simulated": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"additionalProperties": false,
"properties": {
"code": {
"const": "DEMO_POLICY_DENIED",
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"environment": {
"const": "demo",
"type": "string"
},
"simulated": {
"const": true,
"type": "boolean"
}
},
"required": [
"detail",
"environment",
"simulated"
],
"type": "object"
}500
Request refused or failed
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}text/plain
Schema
{
"const": "Internal Server Error",
"type": "string"
}503
Request refused or failed
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}GET/api/v1/auth/oidc/statusGet Oidc Status
Check if OIDC is enabled and configured. Public endpoint - no auth required. Frontend uses this to show/hide SSO login button.
Authentication
Anonymous access
Responses
200
Successful response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"enabled",
"issuer"
],
"type": "object"
}400
Request refused or failed
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}401
If a Bearer header is supplied, middleware may reject malformed tenant credentials before route dispatch
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"const": "Invalid tenant credentials",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}403
Only in demo deployment mode: ordinary API surface is denied before handlers
Headers
{
"X-Vnbui-Environment": {
"schema": {
"type": "string"
}
},
"X-Vnbui-Simulated": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"additionalProperties": false,
"properties": {
"code": {
"const": "DEMO_POLICY_DENIED",
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"environment": {
"const": "demo",
"type": "string"
},
"simulated": {
"const": true,
"type": "boolean"
}
},
"required": [
"detail",
"environment",
"simulated"
],
"type": "object"
}500
Unhandled exception outside route-level conversion; body is plain text
text/plain
Schema
{
"const": "Internal Server Error",
"type": "string"
}503
Request refused or failed
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}POST/api/v1/auth/oidc/testTest Oidc Configuration
Test OIDC configuration by fetching discovery document. Requires persisted installation authority. Tests that the issuer URL is accessible and returns valid OIDC discovery metadata.
Request body
Required
application/json
Schema
{
"additionalProperties": false,
"properties": {
"client_id": {
"default": "",
"type": "string"
},
"issuer": {
"type": "string"
}
},
"required": [
"issuer"
],
"type": "object"
}Authentication
Responses
200
Successful response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"authorization_endpoint": {
"type": "string"
},
"check": {
"const": "discovery_only",
"type": "string"
},
"credentials_verified": {
"const": false,
"type": "boolean"
},
"issuer": {
"type": "string"
},
"jwks_uri": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"const": "ok",
"type": "string"
},
"token_endpoint": {
"type": "string"
},
"userinfo_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"status",
"check",
"credentials_verified",
"issuer",
"authorization_endpoint",
"token_endpoint",
"userinfo_endpoint",
"jwks_uri"
],
"type": "object"
}400
Request refused or failed
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}401
Bearer absent, invalid, disabled, stale or organization unavailable
Headers
{
"WWW-Authenticate": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"anyOf": [
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"detail": {
"const": "Invalid tenant credentials",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}
]
}403
Persisted identity lacks required role or installation/platform authority
Headers
{
"X-Vnbui-Environment": {
"schema": {
"type": "string"
}
},
"X-Vnbui-Simulated": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"anyOf": [
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"detail": {
"additionalProperties": false,
"properties": {
"code": {
"const": "DEMO_POLICY_DENIED",
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"environment": {
"const": "demo",
"type": "string"
},
"simulated": {
"const": true,
"type": "boolean"
}
},
"required": [
"detail",
"environment",
"simulated"
],
"type": "object"
}
]
}500
Request refused or failed
application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}text/plain
Schema
{
"const": "Internal Server Error",
"type": "string"
}POST/api/v1/auth/refreshRefresh Token
Refresh access token. Issues a new JWT for the current user.
Authentication
Responses
200
Successful response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"access_token": {
"type": "string"
},
"token_type": {
"const": "bearer",
"type": "string"
}
},
"required": [
"access_token",
"token_type"
],
"type": "object"
}401
Bearer absent, invalid, disabled, stale or organization unavailable
Headers
{
"WWW-Authenticate": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"anyOf": [
{
"additionalProperties": false,
"properties": {
"detail": {
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"detail": {
"const": "Invalid tenant credentials",
"type": "string"
}
},
"required": [
"detail"
],
"type": "object"
}
]
}403
Only in demo deployment mode: ordinary API surface is denied before handlers
Headers
{
"X-Vnbui-Environment": {
"schema": {
"type": "string"
}
},
"X-Vnbui-Simulated": {
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"additionalProperties": false,
"properties": {
"detail": {
"additionalProperties": false,
"properties": {
"code": {
"const": "DEMO_POLICY_DENIED",
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"environment": {
"const": "demo",
"type": "string"
},
"simulated": {
"const": true,
"type": "boolean"
}
},
"required": [
"detail",
"environment",
"simulated"
],
"type": "object"
}500
Unhandled exception outside route-level conversion; body is plain text
text/plain
Schema
{
"const": "Internal Server Error",
"type": "string"
}