Skip to content

Options

url string substitution

This feature allows to replace part of the url with string defined in query parameter.
Visit this documentation page for detailed explanation.


sort

This feature allows to sort the output of query. The original SQL statement is wrapped in additional SQL for efficient sorting in database. Visit this documentation page for detailed explanation.


distinct

This feature allows to remove duplicate rows of the output. The original SQL statement is wrapped in additional SQL for efficient distinct filtering in database. Visit this documentation page for detailed explanation.


limit and offset

This feature allows to limit and skip rows of returned data. Visit this documentation page for detailed explanation.


transpose

This feature transposes output by converting column to rows and rows to columns. Visit this documentation page on transpose for detailed explanation.


stream

This feature allows to run queries using streaming data transfer mechanism of HTTP. It comes handy when requesting large amount of data. Visit this documentation page on stream for detailed explanation.


count

When using this query string argument in request the response will contain also additional header SlashDB-All-Record-Count that tells what's the total count of rows returned by the query. Useful when using limit and offset with.

Usage:

?count

Response Header:

SlashDB-All-Record-Count:2

Value type: (no value)

Default: (not used)

Examples:

/query/customers-in-city/city/Paris.json?count - response contains header with total number of rows returned by query (header SlashDB-All-Record-Count: 2)

/query/customers-in-city/city/Paris.json?count&limit=1 - like above example but with additional limit=1, header SlashDB-All-Record-Count still is 2, even though we're using limit.

$ curl -v 'https://demo.slashdb.com/query/customers-in-city/city/Paris.json?count&limit=1'
* Hostname was NOT found in DNS cache
*   Trying 50.19.250.51...
* Connected to demo.slashdb.com (50.19.250.51) port 443 (#0)

[...]

> GET /query/customers-in-city/city/Paris.json?count&limit=1 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: demo.slashdb.com
> Accept: */*
>
< HTTP/1.1 200 OK
* Server nginx/1.4.6 (Ubuntu) is not blacklisted
< Server: nginx/1.4.6 (Ubuntu)
< Date: Thu, 12 Jul 2018 15:00:22 GMT
< Content-Type: application/json
< Content-Length: 139
< Connection: keep-alive
< SlashDB-All-Record-Count: 2
<
[
    {
        "LastName": "Bernard",
        "State": null,
        "FirstName": "Camille",
        "Phone": "+33 01 49 70 65 65"
    }
]

Options (XML)

nil visible

This feature allows to force showing empty tags.

Usage:

?nil_visible=[True_or_False]

Value type: boolean (True or False)

Default: False

Examples:

/query/customers-in-city/city/Paris.xml - not showing empty tags by default

/query/customers-in-city/city/Paris.xml?nil_visible=False - not showing empty tags

/query/customers-in-city/city/Paris.xml?nil_visible=True - showint empty tags


xmlType

This feature allows to adjust XML output.

Usage:

?xmlType=[name_of_xml_type]

Value type: string

Value options:

Default: (not used)

Examples:

/query/customers-in-city/city/Paris.xml?xmlType=adPersistXML - rendering XML in Persistance Format.