Skip to content

Authentication API ​

8 endpoints. Request and response schemas are described on the schemas page; the other tags are listed in the API index.

Endpoints ​

POST /api/v1/auth/change-password ​

Change password

Change the password for the current user

Request body (required)

application/json: object

FieldTypeRequiredDescription
current_passwordstringyes-
new_passwordstringyes-

Responses

StatusDescriptionBody
204Password changed successfully, no content-
400Invalid request-
401Not authenticated or invalid current password-

POST /api/v1/auth/login ​

Login

Authenticate with username and password

Authentication: none (public endpoint).

Request body (required)

application/json: object

FieldTypeRequiredDescription
passwordstringyes-
usernamestringyes-

Responses

StatusDescriptionBody
200Login successful, returns user objectapplication/json: User
400Invalid requestapplication/json: Error
401Invalid credentials-
415Unsupported media typeapplication/json: Error
429Too many requestsapplication/json: Error

POST /api/v1/auth/logout ​

Logout

Logout the current user (same-origin only). Sessions created by an OIDC provider whose IdP advertises an end_session_endpoint get 200 with the RP-initiated logout URL to navigate to.

Responses

StatusDescriptionBody
200Logged out locally; continue at the IdPapplication/json: EndSessionResponse
204Logout successful, no content-
403Cross-site request rejectedapplication/json: Error

GET /api/v1/auth/me ​

Get current user

Returns information about the currently authenticated user

Responses

StatusDescriptionBody
200Current user informationapplication/json: UserExtended
401Not authenticated-

GET /api/v1/auth/sso/providers ​

List SSO providers

List available SSO providers (public)

Authentication: none (public endpoint).

Responses

StatusDescriptionBody
200List of SSO providersapplication/json: object

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
providersarray of objectyes-
providers[].display_namestringno-
providers[].kindstringnoOne of: oidc, saml.
providers[].slugstringno-

GET /api/v1/auth/tokens ​

List own API tokens

List API tokens for the current user

Responses

StatusDescriptionBody
200List of tokensapplication/json: object
403Forbiddenapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
dataarray of Tokenno-

POST /api/v1/auth/tokens ​

Create own API token

Create a new API token for the current user

Request body (required)

application/json: object

FieldTypeRequiredDescription
expires_atstring (date-time)no-
kindstringyesOne of: access, deploy.
namestringyes-
scopesarray of stringno-

Responses

StatusDescriptionBody
201Token createdapplication/json: TokenCreateResponse
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error

DELETE /api/v1/auth/tokens/{id} ​

Revoke own API token

Revoke an API token for the current user

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
204Token revoked-
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Token not found-

Free software under the AGPL-3.0-or-later.