Query paths
- Last Updated: August 31, 2022
- 1 minute read
- DataDirect Connectors
- ODBC
- Autonomous Rest Connector 8.0
- Documentation
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 Host Name (HostName) connection option.
- endpoint_path
- is the path component of the URL endpoint. The value must be
URL-encoded using valid syntax. For example, spaces in an endpoint are replaced with
%20. See "URL-encoded values" for details. - 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",