Nav
You are viewing an older version of this topic. To go to a different version, use the version menu at the upper-right. +

Testing the Policy

To test the policy:

  1. Click the 1.0development version of the vending API.

    The API version details page for the vending API appears.

  2. In the Status section click Configure Endpoint.

    The Configure endpoint dialog shows that the Autodiscovery process deployed the API to a basic endpoint. The implementation URI shows the URL of the endpoint, which contains your local IP address.

    apikit-tutorial-d664e
  3. In a browser, go to the IP address and port shown in the implementation URI. For example:

    http://192.168.1.127:8081/remote-vending/api/*

    The following message appears because you added no logic other than APIkit simulation logic to the flow used by the vending API:

    { "message": "Resource not found" }

  4. Refresh the browser three times.

    The rate limiting policy is enforced, as indicated by the output:

    API calls exceeded

  5. In a browser, go to the implementation URI for the test-policy API. For example:

    http://192.168.1.127:8081/remote-vending/test-policy

    test policy appears.

  6. Refresh the browser three times.

    The rate limiting policy is enforced, as indicated by the output:

    API calls exceeded

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+