ADC

API traffic visibility using API specification validation

NetScaler provides an option to export additional information as part of the HTTP transactions related to the HTTP APIs when it determines the traffic as API traffic.

For more information on exporting the HTTP transaction logs, see Export transaction logs directly from NetScaler to Splunk.

Enable API traffic visibility with the API specification using the CLI

  1. Create the API profile

    At the command prompt, type:

    add api profile <name>

  2. Enable the API visibility

    At the command prompt, type

    set api profile <name> -apiVisibility <ENABLED/DISABLED>

  3. Bind the specification to the profile

    At the command prompt, type:

    bind -apiprofile <name> -apiSpec <name>

  4. Assign the profile to a virtual server At the command prompt, type: set cs vserver <name> -apiprofile <name>

Example:

add api profile test_apiprofile1
set api profile test_apiprofile1 -apiVisibility enabled
bind api profile test_apiprofile1 -apispec testapi spec name
set cs verser vserver_test1 -apiprofile test_apiprofile1
<!--NeedCopy-->

If the incoming traffic matches the endpoint in the API specification, then apiEndpoint, apiSpecName, and isApi parameters are sent in the HTTP transaction logs.

Enable API traffic visibility without the API Specification using the CLI

  1. Create the API profile

    At the command prompt, type:

    add api profile <name>

  2. Enable the API visibility

    At the command prompt, type:

    set api profile <name> -apiVisibility <ENABLED/DISABLED>

  3. Assign the profile to virtual server

    At the command prompt, type:

    set cs vserver <name> -apiprofile <name>

Example:

add api profile test_apiprofile
set api profile <test_apiprofile> -apiVisibility enabled
set cs verser vserver_test -apiprofile test_apiprofile
<!--NeedCopy-->

If the incoming traffic is API traffic, then isApi parameter is sent in the HTTP transaction logs.

Enable API traffic visibility using GUI

  1. Navigate to System > Profiles > API Profiles.
  2. Click Add.
  3. On the API Profiles page, enter a Name for the API profile.
  4. Select API Visibility, and click OK.
  5. To enable API traffic visibility, bind the API Specification file.
    1. On the API Profiles page, under Advanced Settings, click API Spec.
    2. In the API SPEC Binding section, click > and select the required API specification.
    3. Click Bind and then click Close.
  6. Click Done.
API traffic visibility using API specification validation