URL Query Parameters

Dari provides URL query parameters to facilitate debugging. A query parameter is appended to a URL with a question mark (?) if it’s the first parameter in the query string, or an ampersand (&) if it is not the first parameter in the query string.

There are Dari query parameters to invoke the Contextual Debugger and Reloader. In addition, the following query parameters are available.

Cache

http://{yoursite.com}/{page}/?_cache=false

Dari automatically provides SQL query caching when returning objects. When the same content is requested in separate SQL queries, caching limits the number of queries to one, thereby consolidating queries.

To turn caching off, add ?_cache=false to the page request.

To see the difference between caching and not caching, use the Contextual Debugger, first with caching on (?_debug=true&_cache=true), and then with caching off (?_debug=true&_cache=false). Scroll down to the Dari Profile table, and examine the count for SQL with and without caching.

Output Format

http://{yoursite.com}/{page}/?_format=json
http://{yoursite.com}/{page}/?_format-json&_result=html
http://{yoursite.com}/{page}/?_format=jsonp&_callback="{value}"
http://{yoursite.com}/{page}/?_format=jsonp&_callback="{value}"&_result=html
http://{yoursite.com}/{page}/?_format=js

Use the ?_format= parameter to change the output format for the page, such as JSON (json) or Javascript (js). Add &_result=html to present the frame response inside JSON.

To return a specified value in JSON format, add jsonp&_callback="{value}" to the URL.

Output formats are regularly updated. For all available formats, see HtmlApiFilter.