Skip to main content
Skip table of contents

Analyzing Multiple Client Traffic

This section illustrates checking traffic related to multiple consumers with unique APIKeys assigned to each consumer.

Scenario Steps

  1. Create an API Project with an apiKey policy.
  2. Create an API Product with API Projects.
  3. Create 2 API Clients.
  4. Create an API Client Subscription each for the above clients.
  5. Invoke API requests from both subscriptions using apiKeys.
  6. Analyze Traffic changes in the Analytics view.

Sample UseCase

Perform the actions below ensuring that Save button is clicked on each panel after adding the attributes required:

  1. Create a Currency Convertor API Project with name "WSDLCurrencyConvertor" using the From WSDL option in the API Projects section.

    Secure the project with API Key while creating the project.

  2. In the Products panel in the Apps section, create a product naming "CurrencyConvertorSampleProduct" and add the WSDLCurrencyConvertor project to the CurrencyConvertorSampleProduct product.

     
    Figure 1: Creating the CurrencyConvertorSampleProduct and assigning the WSDLCurrencyConvertor project to it.
     
  3. In the Clients panel, create 2 clients with names:
    1. CurrencyConvertorClient1
    2. CurrencyConvertorClient2
       

    Figure 2: Creating Clients

  4. Create 2 Client Subscriptions with names:
    1. CurrencyConvertorClientSub1
    2. CurrencyConvertorClientSub2
       
  5. In the API Products panel in the Client Subscriptions panel, add the CurrencyConvertorSampleProduct product to both the Client Subscriptions.


    Figure 3: Creating Client Subscriptions

  6. Copy the API Consumer Key from the Client Subscriptions by clicking the Product Name and save the keys to a Clip Board or Notepad.

     
    Figure 4: Copying Consumer Keys pertaining to Client Subscriptions
     
  7. Open a browser and invoke API requests randomly from both clients using the URL in the format below:
     http://IPAddress:PortName/<ProxyContextPath>/<Version>/conversionrate?FromCurrency=INR&ToCurrency=USD&apiKey=<ConsumerKey>

    Example

    http://192.168.2.33:2160/wcc/1.0/conversionrate?FromCurrency=INR&ToCurrency=USD&apiKey=XsJpxVqUjXCRyRTuASTKVxWF


    Figure 5: Result of Sending an API request

  8. Analyze traffic pertaining to both clients in the Analytics view.


    Figure 6: Traffic information of the CurrencyConvertorClientSub1 and CurrencyConvertorClientSub2 API requests
     
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.