AuthApi.md 1.4 KB

PortainerApi.AuthApi

All URIs are relative to http://portainer.domain/api

Method HTTP request Description
authenticateUser POST /auth Authenticate a user

authenticateUser

AuthenticateUserResponse authenticateUser(body)

Authenticate a user

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

Example

var PortainerApi = require('portainer_api');

var apiInstance = new PortainerApi.AuthApi();

var body = new PortainerApi.AuthenticateUserRequest(); // AuthenticateUserRequest | Credentials used for authentication


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.authenticateUser(body, callback);

Parameters

Name Type Description Notes
body AuthenticateUserRequest Credentials used for authentication

Return type

AuthenticateUserResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json