skip to main content
Input REST file syntax : Table definition entries : Query paths
  

Try DataDirect Drivers Now

Query paths

The query path is the endpoint(s) against which requests are issued. The path can be specified as a single endpoint or an array of endpoints (see "Array of endpoints" for details). You can specify the endpoints as a table name-endpoint pair ("<table_name>":"<endpoint>") or by using the #path property in a table definition. The following types of paths are supported:
*Unparametrized paths
*Parametrized paths
*Paths with query parameters
By default, query paths are issued as GET requests unless they are specified in a POST entry. See "POST requests" for details.
The basic syntax of a query path takes the following form:
"<host_name>/<endpoint_path> <json_root>"
host_name
(optional) is the protocol and host name components of the URL endpoint. For example, http://example.com. You can omit this value by specifying the host name using the ServerName connection property.
endpoint_path
is the path component of the URL endpoint.
json_root
(optional) is a simple path to the element containing the results. If the results are returned in a top-level array, nothing needs to be stated. For nested elements, separate the element names with forward slashes (/).
For example, the following demonstrates a query path for an unparamaterized GET request with a JSON root of countries.
#path:"http://example.com/countries/ countries",
* Requests with unparameterized paths
* Requests with parameterized paths
* Requests with query parameters
* Arrays of endpoints