View Automatic Statistics Commands
- GET api/v1.2/admin_commands
Use this API to view automatic statistics commands that are running or queued for a Hive table.
Required Role
Users who belong to the system-admin group can make this API call.
See Managing Groups and Managing Roles for more information.
Parameters
Note
Parameters marked in bold below are mandatory. Others are optional and have default values.
Parameter |
Description |
---|---|
per_page |
It denotes the number of the statistics command that you can retrieve per page.
Its default value is |
start_date |
The date from which you want the command history (inclusive). Its default value is 7 days before
the end date. This parameter also supports timestamp in the UTC timezone (YYYY-MM-DDTHH:MM:SSZ)
format. It cannot be earlier than 60 days from the |
end_date |
The date until which you want the command history (inclusive). Its default value is today. This parameter also supports timestamp in the UTC timezone (YYYY-MM-DDTHH:MM:SSZ) format. |
Request API Syntax
Here is the API syntax to view the list of automatic statistics commands using the CuRL utility.
curl -i -X GET -H "X-AUTH-TOKEN:$AUTH_TOKEN" -H "Content-Type:application/json" -H "Accepts:application/json" \
-d '{"start_date":"<start date>", "end_date":"<end date>", "per_page":"<count>"}' \
"https://api.qubole.com/api/v1.2/admin_commands"
Here is the API syntax to view a specific automatic statistics command using the CuRL utility.
curl -i -X GET -H "X-AUTH-TOKEN:$AUTH_TOKEN" -H "Content-Type:application/json" -H "Accepts:application/json" \
"https://api.qubole.com/api/v1.2/admin_commands/<command-id>"
Sample API Request
Here is a sample request to view the list of automatic statistics commands.
curl -i -X GET -H "X-AUTH-TOKEN:$AUTH_TOKEN" -H "Content-Type:application/json" -H "Accepts:application/json" \
-d '{"start_date":"2020-02-27T01:00:00Z", "end_date":"2020-02-15T01:00:00Z", "per_page":"20"}' \
"https://api.qubole.com/api/v1.2/admin_commands"
Here is a sample request to view a specific auto statistics command with 15 as its ID.
curl -i -X GET -H "X-AUTH-TOKEN:$AUTH_TOKEN" -H "Content-Type:application/json" -H "Accepts:application/json" \
"https://api.qubole.com/api/v1.2/admin_commands/15"