API7 Docs

Log in to API7 Enterprise using the built-in username and password

POST /api/login

POST /api/login

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Request Body

application/json

Response Body

application/json

curl -X POST "$API_BASE_URL/api/login" \  -H "Content-Type: application/json" \  -d '{    "username": "john",    "password": "safe-password"  }'

Successful operation.

{
  "value": {}
}
Complete operation details and schema variants

POST /api/login

Log in to API7 Enterprise using the built-in username and password

Authenticate a dashboard user with built-in username and password credentials and create a session.

Parameters

Request body

Content type: application/json

  • username (string, required): The username of the user.
  • password (string, required): The password of the user.
  • otp (string, optional): The two-factor authentication code. Required only when the account has 2FA enabled. Accepts a TOTP code from an authenticator app or a one-time recovery code.

Responses

  • 200: Successful operation.
  • value (object, optional): The specific resource.
  • 400: Invalid arguments. Error details will be provided in the response.

cURL

curl -X POST '$API_BASE_URL/api/login'