Other API routes definition (1.0.0)

Download OpenAPI specification:Download

Health

Get Knot services status

Get the current status of all Knot services.

Responses

Response samples

Content type
application/json
{
  • "backend": {
    }
}

OAuth2Authorize

OAuth2 login webview

Show the webview to allow user to connect to its Knot account.

query Parameters
client_id
required
string

The oauth2 client id.

response_type
required
string

The oauth2 response type (the only one supported for now is 'code').

redirect_uri
required
string

The uri to redirect on success (must be registered for the given client).

scope
string

A permission scope to require (none available for now).

state
required
string

A value that will be forwarded in the redirect's query.

Responses

Get an OAuth2 authorization code

Begin an oauth2 authentication by getting an authorization code.

Request Body schema: application/json
required

Client information for the connection.

One of
client_id
required
string

The oauth2 client id.

response_type
required
string

The oauth2 response type (the only one supported for now is 'code').

redirect_uri
required
string

The uri to redirect on success (must be registered for the given client).

scope
string

A permission scope to require (none available for now).

state
string

A value that will be forwarded in the redirect's query.

email
required
string <email>

The user's email address.

password
required
string [ 8 .. 255 ] characters

The user's password.

Responses

Request samples

Content type
application/json
Example
{
  • "client_id": "string",
  • "response_type": "string",
  • "redirect_uri": "string",
  • "scope": "string",
  • "state": "string",
  • "email": "user@example.com",
  • "password": "stringst"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "error_description": "string"
}

OAuth2Token

Get an OAuth2 access token

End an oauth2 authentication by getting an access token with an authorization code or a refresh token.

Request Body schema: application/json
required

Token information.

One of
grant_type
required
string
Enum: "authorization_code" "refresh_token"

Type of grant used to get an access token.

client_id
required
string

The oauth2 client id.

client_secret
required
string

The oauth2 client secret.

code
required
string

The code given by the authorize route.

redirect_uri
required
string^[a-zA-Z][a-zA-Z0-9+.-]+:

The redirect uri used by the authorize route.

Responses

Request samples

Content type
application/json
Example
{
  • "grant_type": "authorization_code",
  • "client_id": "string",
  • "client_secret": "string",
  • "code": "string",
  • "redirect_uri": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "access_token": "string",
  • "token_type": "string",
  • "expires_in": 0,
  • "refresh_token": "string",
  • "scope": "string"
}