Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Access to the Open Data API is subject to rate limiting: any user who submits too many requests within a short period of time will be unable to submit further requests until their limit resets. This is to ensure that the API performs well for all users and that it is not possible for a single application to overload the server.By default, the the Open Data API allows any given API key to submit up to 100 requests per hour. You can change this limit by editing a setting

From version 9.9.1 there are three individual rate limit settings:

  • A global setting that applies to all endpoints.
  • A rate limit for the /schema endpoint.
  • A rate limit for the /table endpoint.

If you do not want to apply any rate limits, you can set one or more of these to -1. Otherwise, set them to the number of requests you want to allow per hour from a particular API key.

If multiple limits apply to a given query (for example, you have set different values for the global rate limit and the table rate limit) then a request will be limited as soon as the lower of the two limits is reached.

To change the limits, you need to edit the settings in the Open Data API's configuration.properties file:

  1. Open the configuration file in a text editor. It is located at <tomcat_home>\webapps\webapi#rest#v1\WEB-INF\classes\configuration.properties

    Note
    iconfalse

    The Open Data API has its own copy of this configuration file. You must make the change in this file, not the equivalent file in the SuperWEB2 directory.

  2. Locate the following settingsettings:

    Code Block
    openDataApi.rateLimit.global=
    Code Block
    openDataApi.rateLimit.schema.numberOfRateLimitPerPeriod==
    Code Block
    openDataApi.rateLimit.table=100
  3. Change the setting settings to your preferred number of allowed requests per hour. For example, to allow each API key to make 200 requests per hour, change it to the following:

     

    Code Block
    openDataApi.schemarateLimit.numberOfRateLimitPerPeriodtable=200
  4. Save your changes, and restart Tomcat.

...