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

Ensure to click the Save button after configuring each panel in the steps below.

  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.
     
  3. In the Clients panel, create 2 clients with names:
    1. CurrencyConvertorClient1@gmail.com
    2. CurrencyConvertorClient2@gmail.com

  4. Create 2 Client Subscriptions with names:
    1. CurrencyConvertorClientSub1 selecting CurrencyConvertorClient1@gmail.com as the client
    2. CurrencyConvertorClientSub2 selecting CurrencyConvertorClient2@gmail.com as the client
  5. In the Client Subscriptions panel, add the CurrencyConvertorSampleProduct product to both the Client Subscriptions.

    Figure 3: Creating Client Subscriptions
  6. After saving the client subscriptions, click the Product Name and note the API Consumer Key in a notepad.
     
    Figure 4: Copying Consumer Keys pertaining to Client Subscriptions
  7. Deploy the project on the server group on which the above attributes are created.
  8. 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

  9. 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.