get_url_data¶
GET_URL_DATA
Retrieve Http Response from URL see get_url_data_agg for build p_JSONs
Parameters:
p_JSON (
List|str) – JSON Block- JSON Parameters –
EXA-CONNECTION: Exasol Connection
URL: URL - source of data
VERIFY: verify SSL Certificate
TOKENKEY: Tokenkey Authorization if not specified
TOKEN: Access Token
ERROR_JSON: JSON String in case an error has occurred
METHOD: http method (get, post, delete, put, patch)
ENCODING: Encoding (default utf8)
BODY: http body
HEADERS: http headers
RESULT: ALL|None to get all response results or just body
COOKIES: Cookies
RETRY_EXPRESSION: Expression if true no further retry is done
RETRY_SLEEP: Sleep in Seconds between retries
RETRY_MAX: Max Retries attempts. -1 for infinity
TIMEOUT: timeout=5 or (Connecting timeout, Reading timeout)
ALLOW_REDIRECTS: Allows redirects to be handled by http.
PROXIES*: Settings proxies {“protocol”: “schema://ip:port”}
CERT: Certificate path
FILES: Files
FILES_BASE64: Enable Base64 encoded input data
returns: str – JSON String
raises RequestException: In case of a network or HTTP error.
Examples¶
No auth
1select get_url_data('{"URL": "https://endoflife.date/api/v1/products/cert-manager", "TIMEOUT": "(10,10)"}') a;
2select get_url_data('{"URL": "https://endoflife.date/api/v1/products/cert-manager1"}');
Basic auth
1select get_url_data('{"EXA-CONNECTION": "EXASOL_REST_API","URL": "https://10.0.3.4/api/v1/databases", "VERIFY": false}');
Token
1select GET_URL_DATA('{"URL": "...", "TOKENKEY": "Authorization", "TOKEN": ""}')