auth

Authenticate

Access policy: public Use this environment(endpoint) to authenticate against Portainer using a username and password.

post/auth

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/auth
  • Auth
    none declared

Request body

Passwordstring required

Password

Usernamestring required

Username

Example request

{
  "Password": "mypassword",
  "Username": "admin"
}

Response

Success

jwtstring

JWT token used to authenticate against the API

Example response

{
  "jwt": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzAB"
}

Changes

No recorded changes to this operation across all 21 revisions of this API.