To get a token to authenticate your requests within a 24-hour period, send the following request:
POST https://<IA_IP_address>:<port_number>/login
Required header:
--user <username>:<password>
Options
IA_IP_address—The IP address of the NDR appliance running the NDR API.
port_number—The port number of the NDR appliance running the NDR API.
username—The user name for your NDR appliance.
password—The password for your NDR appliance.
Example
POST https://xxx.xxx.xxx.xxx:443/login
Required header:
--user npadmin:hammerhead
Authentication: Response
Set-Cookie: px=[Token]
Response fields
Token—This token authenticates a session. By default, the session times out after 24 hours.
Example
HTTP/1.1 200 OK Date: Wed, 16 Nov 2016 00:23:15 GMT
Note
The
;at the end of the token is not part of the token.
cURL code sample: Authentication
curl -k -I --user npadmin:hammerhead https://xxx.xxx.xxx.xxx:443/login -X POST
This cURL sample includes the following options:
-k—This option explicitly allows cURL to perform insecure SSL connections and transfers, which allows you to test your SSL connection without installing a CA certificate.-I—This option returns the HTTP header of the response.--user npadmin:hammerhead—Replacenpadminwith the user name for your NDR appliance. Replacehammerheadwith the password for your NDR appliance.https://xxx.xxx.xxx.xxx:443/login—The authentication URL. Replacexxx.xxx.xxx.xxxwith the IP address of your NDR appliance.-X POST—This option changes the HTTP method to POST.
Result
This example returns the authentication token in the response header.