With step 1 to 5, you now have set up the following configuration:
The PrivateEchoAPI can now be consumed by Spring Corp.. To calls from Spring Corp. the Gold rate limiting will be applied. It needs to supply an API Key to be able to consume the PrivateEchoAPI.
Now, you are going to test if your API is accessible.
Open the details page of client Spring Corp. and go to tab Contracts. Click Try . | ||
As displayed in section Curl, the API Key is provided correctly with the cURL call. In the Response body section, you can see the actual response of the service. The call returned the string Hello World! along with the current timestamp. Now you know that the PrivateEchoAPI is invokable. Next, you are going to test if the Rate Limiting Policy is applied correctly. | ||
As configured in tutorial step 2, clients using plan Gold should be able to execute 20 requests per minute. Click Execute more than 20 times in succession. In section Server response an error is displayed:
The API can be consumed as intended.
|
David Stringer wants to test the API from the customer's perspective. |
To consume the API, the customer Spring Corp. would access it via its client in the Developer Portal.
Open the Developer Portal and go to tab My Clients. | ||
Click API Documentation. | ||
| ||
You are testing with your personal client and API Key. Therefore, each test decreases the rate limit that is set by the rate limiting policy.
|
|