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
Ensure to click the Save button after configuring each panel in the steps below.
-
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.
-
In the Products panel in the Apps section, create a product naming "CurrencyConvertorSampleProduct" and add the WSDLCurrencyConvertor project to the CurrencyConvertorSampleProduct product.
-
In the Clients panel, create 2 clients with names:
-
CurrencyConvertorClient1@gmail.com
-
CurrencyConvertorClient2@gmail.com
-
-
Create 2 Client Subscriptions with names:
-
CurrencyConvertorClientSub1 selecting CurrencyConvertorClient1@gmail.com as the client
-
CurrencyConvertorClientSub2 selecting CurrencyConvertorClient2@gmail.com as the client
-
-
In the Client Subscriptions panel, add the CurrencyConvertorSampleProduct product to both the Client Subscriptions.
Creating Client Subscriptions -
After saving the client subscriptions, click the Product Name and note the API Consumer Key in a notepad.
Copying Consumer Keys pertaining to Client Subscriptions -
Deploy the project on the server group on which the above attributes are created.
-
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>http://192.168.2.33:2160/wcc/1.0/conversionrate?FromCurrency=INR&ToCurrency=USD&apiKey=XsJpxVqUjXCRyRTuASTKVxWF
Result of Sending an API request -
Analyze traffic pertaining to both clients in the Analytics view.
Traffic information of the CurrencyConvertorClientSub1 and CurrencyConvertorClientSub2 API requests