Endpoint: /admin/v1/authentication

Creates a session for the user and stores the authentication token. This token will be required for any subsequent REST API requests.

There are several supported Authentication types, EFT and AD. When using a Windows or AD account, configure your authentication type to “AD” instead of “EFT”.

  • POST

Method & URL

POST https://[server URL]:[port]/admin/v2/server

POST Body Sample

Copy
@host = 192.168.1.206:4450
@AdminUser = API_admin
@password = APIADMIN_Password!
###
# @name login
POST https://{{host}}/admin/v1/authentication HTTP/1.1
Content-Type: application/json
{"userName": "{{AdminUser}}", "password": "{{password}}", "authType": "EFT"}
###
@AuthToken = {{login.response.body.$.authToken}}
###

POST Response Body Sample

Copy
HTTP/1.1 200 OK Date: Tue, 10 May 2022 14:02:47 GMT 
Content-Type: application/vnd.api+json Content-Length: 215 
Set-Cookie: csrftoken=6FF1EF51-9771-E2EF-9227-79C73F660B20; 
path=/; secure; 
SameSite=Lax Cache-Control: no-cache, no-store, must-revalidate 
Expires: -1 X-Content-Type-Options: nosniff 
X-XSS-Protection: 1; mode=block 
Content-Security-Policy: default-src 'self' 'unsafe-inline' 
'unsafe-eval' data:; 
Referrer-Policy: no-referrer { "authToken": 
"95267D88A45EBA20B858CA8C4EB15B00F27F1FBBC6BC0B2F13DDE25889FF2C9E", 
"permissions": [ { "policy": "ServerManagement" }, 
{ "policy": "COMManagement" }, 
{ "policy": "ReportManagement" }, 
{ "policy": "ManagePersonalData" } ] }

POST PowerShell Sample

Copy
$baseURL = "https://192.168.100.165:4450/admin"
$AdminUser = "admin"
$password = "alaska"
 
# Only to ignore certificates errors
add-type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
 
        public class IDontCarePolicy : ICertificatePolicy {
        public IDontCarePolicy() {}
        public bool CheckValidationResult(
            ServicePoint sPoint, X509Certificate cert,
            WebRequest wRequest, int certProb) {
            return true;
        }
    }
"@
[System.Net.ServicePointManager]::CertificatePolicy = new-object IDontCarePolicy 
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
 
 
# authentication
$authBody = "{""userName"": ""$AdminUser"", ""password"": ""$password"", ""authType"": ""EFT""}"
$auth = Invoke-RestMethod -Uri "$baseURL/v1/authentication" -Method 'POST' -Body $authBody
 
$authToken = $auth.authToken
$authHeader = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$authHeader.Add("Authorization", "EFTAdminAuthToken $authToken")