2FA state: Request

Prev Next

To get the two-factor authentication state for a specific user, send the following request:

GET https://<IA_IP_address>:<port_number>/config/v1/auth/x509/state

Required headers:

Cookie: px=<token> X-Username: <user> X-Role: <role>

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.

  • token—This token authenticates the session. By default, the session times out after 24 hours.

  • user—The user ID.

  • role—The user's role.

Example

GET https://xxx.xxx.xxx.xxx:443/config/v1/auth/x509/state

Required headers:

Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > X-Username: wheel X-Role: wheel

2FA state: Response

HTTP/1.1 [Response Code] [Response Message]				
Date: [Date]				
Content-Type: [Content Type]
{
  "state": "<state>"
}
Response fields
  • Response code—A standard HTTP response code.

    • 200—Request successful; the configuration was successful.

  • Response message—A standard HTTP response message.

    • OK—Request successful; the configuration was successful.

  • Date—Standard HTML date format.

  • Content type—The response format.

  • state—The two-factor authentication state of the specified user.

Example
HTTP/1.1 200 OK
Date: Thu, 15 Aug 2019 17:33:11 GMT
Content-Type: application/json; charset=utf-8
{
  "state": "disabled"
}

cURL code sample: 2FA state

curl -k --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
-H "X-Username: wheel" -H "X-Role: wheel" 
https://xxx.xxx.xxx.xxx:443/config/v1/auth/x509/state

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.

  • --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This option specifies the authentication token for this session.

  • -H "X-Username: wheel"—User name.

  • -H "X-Role: wheel"—User role.

  • https://xxx.xxx.xxx.xxx:443/config/v1/auth/x509/state—The license request URL. Replace xxx.xxx.xxx.xxx with the IP address of your NDR appliance.

Results

This example retrieves the 2FA state.