This section illustrates checking traffic related to multiple consumers with unique APIKeys assigned to each consumer.
Scenario Steps
- Create an API Project with an apiKey policy.
- Create an API Product with API Projects.
- Create 2 API Clients.
- Create an API Client Subscription each for the above clients.
- Invoke API requests from both subscriptions using apiKeys.
- 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:
Create a Currency Convertor API Project with name "WSDLCurrencyConvertor" using the From WSDL option in the API Projects section.
- 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.
- In the Clients panel, create 2 clients with names:
- CurrencyConvertorClient1
- CurrencyConvertorClient2
Figure 2: Creating Clients - Create 2 Client Subscriptions with names:
- CurrencyConvertorClientSub1
- CurrencyConvertorClientSub2
- In the API Products panel in the Client Subscriptions panel, add the CurrencyConvertorSampleProduct product to both the Client Subscriptions.
Figure 3: Creating Client Subscriptions - 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
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>
Figure 5: Result of Sending an API request- Analyze traffic pertaining to both clients in the Analytics view.
Figure 6: Traffic information of the CurrencyConvertorClientSub1 and CurrencyConvertorClientSub2 API requests
Overview
Content Tools
ThemeBuilder