If you are building complex table queries for use in the API, then you may find it easier to build the tables you want in SuperWEB2 first. You can then either:
- Download your table in JSON format as an Open Data API Query.
- Save the table to the User Data Repository and then submit a query for the saved table.
Download Table in JSON Format
Simply build the table that you want and then select Open Data API Query from the Download Table drop-down menu:
SuperWEB2 will download a text file containing the JSON query you will need to request the same table from the Open Data API.
- Create your table in SuperWEB2 and select the Open Data API Query (.json) download format:
- Click Go.
SuperWEB2 downloads a text file containing the JSON for your query:
- You can now POST this JSON query to the
Limitations of Open Data API Query Downloads
Please note that some features are not supported by the JSON download option.
The following items will not be included in the downloaded JSON query:
- User Defined Fields
- Any settings applied in SuperWEB2 (such as percentages or zero suppression)
Disable Open Data API Query Downloads
The Open Data API download option will be available to all users by default, but if you wish you can disable this by changing the
download.enableOpenDataApiQuery property in the configuration.properties file.
Query Saved Table
As an alternative to downloading the table query as JSON, you can also use the API to query for tables that have been saved to the User Data Repository (as long as the account connecting to the API has permission to access the saved table).
- Create your table in SuperWEB2 and save it:
Send a GET request to the
/schemaendpoint to get the ID of the saved table. For example:
Submit a GET request to the
/table/savedendpoint containing your table ID value. For example, for the above table you would send a GET request to