store_maximum_query_duration

Use this API to change the timeout value for queries and reports.

Use store_maximum_query_duration in cases where you have very large or long-running reports to increase the length of time before the report times out. You can also set this value from the Running Status Monitor pane on the administrator portal.
Note: If you set this value greater than the default, you can overload the system with query processing.

If a report (or query) continues to run past the designated timeout period, you can stop the report by using the kill_running_process API.

This API is available in Guardium V11.0 and later.

REST API syntax

This API is available as a REST service with the PUT method. Call this API as follows:
PUT https://[Guardium hostname or IP address]:8443/restAPI/store_maximum_query_duration

GuardAPI syntax

store_maximum_query_duration parameter=value

Parameters

Parameter Value type Description
durationSeconds Integer Required. Default = 180 (seconds).
api_target_host String

Specifies the target hosts where the API executes. Valid values:
  • all_managed: execute on all managed units but not the central manager
  • all: execute on all managed units and the central manager
  • group:<group name>: execute on all managed units identified by <group name>
  • host name or IP address of a managed unit: specified from the central manager to execute on a managed unit.  For example, api_target_host=10.0.1.123.
  • host name or IP address of the central manager: specified from a managed unit to execute on the central manager. For example, api_target_host=10.0.1.123.

IP addresses must conform to the IP mode of your network. For dual IP mode, use the same IP protocol with which the managed unit is registered with the central manager. For example, if the registration uses IPv6, specify an IPv6 address. The hostname is independent of IP mode and can be used with any mode.

Examples

The following GuardAPI example sets the timeout value to 200 seconds.

>grdapi store_maximum_query_duration durationSeconds="200"
ID=0

This command provides the following output:

"Query Timeout SuccessFully Updated"
ok

The following REST API sets the timeout value to 200 seconds:

curl -k --header "Authorization:Beaf8d32-f334-4a9b-976f-163a98afa32a" -i -H "Content-Type:application/json" 
-X PUT -d '{"durationSeconds":"200"}' https://localhost:8443/restAPI/store_maximum_query_duration

This command provides the following JSON output:

HTTP/1.1 200 OK
Cache-Control: private
Expires: Wed, 31 Dec 1969 19:00:00 EST
X-FRAME-OPTIONS: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
. . . 
Date: Mon, 04 Feb 2019 17:08:54 GMT
Server: SQL Guard
{ "ID": 0, "Message": "Query Timeout SuccessFully Updated" }