Skip to main content
Skip table of contents

API Cache

The Open Data API automatically caches table, schema and authentication results, as well as any data from metadata server where applicable (such as dataset and field labels). The API will return the results from the cache rather than requerying the server where possible.

The API provides very flexible configuration options that allow you to control exactly how long data is cached for (see Configure the Cache for more details). In addition, the cache will automatically be cleared in situations where you make changes to datasets, saved tables, and user permissions that invalidate the current contents. For example, if you remove a user's access to a dataset entirely, then any cached results for that dataset will be cleared for the corresponding user. Similarly, changes to Field Level Security will cause any affected cached contents to be cleared.

However, you may still find you need to manually clear the cache in some cases. You can use the /cache endpoint to manually clear:

  • The entire Open Data API cache.
  • The table, schema or authentication cache for a specific user. 
  • The table or schema cache for a specific dataset.
  • The metadata cache. You may need to clear this cache if you change the dataset, field and valueset labels in your metadata database.

Overview

Endpoint
https://<server>/webapi/rest/v1/table/cache

Clear the entire table cache.

 
https://<server>/webapi/rest/v1/table/cache?userId=<user_id>
Clear the table cache for the specified user.
 
https://<server>/webapi/rest/v1/table/cache?datasetId=<dataset_id>
Clear the table cache for the specified dataset.
 
https://<server>/webapi/rest/v1/table/cache?userId=<user_id>&datasetId=<dataset_id>
Clear the table cache for the specified dataset for the specified user.
 
https://<server>/webapi/rest/v1/schema/cache
Clear the entire schema cache.
 
https://<server>/webapi/rest/v1/schema/cache?userId=<user_id>
Clear the schema cache for the specified user.
 
https://<server>/webapi/rest/v1/schema/cache?datasetId=<dataset_id>
Clear the schema cache for the specified dataset.
 
https://<server>/webapi/rest/v1/schema/cache?userId=<user_id>&datasetId=<dataset_id>
Clear the schema cache for the specified dataset for the specified user.
 
https://<server>/webapi/rest/v1/auth/cache
Clear the entire authentication cache
 
https://<server>/webapi/rest/v1/auth/cache?userId=<user_id>
https://<server>/webapi/rest/v1/auth/cache?apiKey=<key>
Clear the authentication cache for the specified user. You can either use the user ID or their API Key.
 
https://<server>/webapi/rest/v1/auth/cache?userId=<user_id1>&userId=<user_id2>
https://<server>/webapi/rest/v1/auth/cache?apiKey=<key1>&apiKey=<key2>
Clear the authentication cache for multiple users.
 
https://<server>/webapi/rest/v1/metadata/cache
Clear the metadata cache.
HTTP MethodDELETE 

Request Headers

APIKey
The API Key to use to authenticate this request. You can obtain your API key from the Account page in SuperWEB2.Required in all requests. Must be an administrator account.

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.