api: add v3

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-09-02 17:40:02 +02:00
parent 5e200655d9
commit f0db408699
13 changed files with 323 additions and 1416 deletions

View File

@ -2,9 +2,9 @@
title: API
---
Starting with 2021.3.5, every authentik instance has a built-in API browser, which can be accessed at https://authentik.company/api/v2beta/.
Starting with 2021.3.5, every authentik instance has a built-in API browser, which can be accessed at https://authentik.company/api/v3/.
To generate an API client, you can use the OpenAPI v3 schema at https://authentik.company/api/v2beta/schema/.
To generate an API client, you can use the OpenAPI v3 schema at https://authentik.company/api/v3/schema/.
While testing, the API requests are authenticated by your browser session.

View File

@ -10,13 +10,13 @@ However, any flow can be executed via an API from anywhere, in fact that is what
Because the flow executor stores its state in the HTTP Session, so you need to ensure cookies between flow executor requests are persisted.
:::
The main endpoint for flow execution is `/api/v2beta/flows/executor/:slug`.
The main endpoint for flow execution is `/api/v3/flows/executor/:slug`.
This endpoint accepts a query parameter called `query`, in which the flow executor sends the full Query-string.
To initiate a new flow, execute a GET request.
## `GET /api/v2beta/flows/executor/test-flow/`
## `GET /api/v3/flows/executor/test-flow/`
Below is the response, for example for an Identification stage.
@ -45,7 +45,7 @@ Below is the response, for example for an Identification stage.
To respond to this challenge, send a response:
## `POST /api/v2beta/flows/executor/test-flow/`
## `POST /api/v3/flows/executor/test-flow/`
With this body
@ -63,7 +63,7 @@ Depending on the flow, you'll either get a 200 Response with another challenge,
Depending also on the stage, a response might take longer to be returned (especially with the Duo Authenticator validation).
To see the data layout for every stage possible, see the [API Browser](https://goauthentik.io/api/#get-/api/v2beta/flows/executor/-flow_slug-/)
To see the data layout for every stage possible, see the [API Browser](https://goauthentik.io/api/#get-/api/v3/flows/executor/-flow_slug-/)
## Result