Set and View a Hive Bootstrap in a QDS Account using API version 2
Use these APIs to set and view a Hive bootstrap in a QDS account. Refer to Managing Hive Bootstrap for more information on how to set a bootstrap using the bootstrap editor.
Required Role
The following users can make this API call:
Users who belong to the system-user/system-admin groups.
Users who belong to a group associated with a role that allows editing an account. See Managing Groups and Managing Roles for more information.
Set a Hive Bootstrap
- PUT /api/v2/accounts/bootstrap
Use this API to set a Hive bootstrap in a QDS account.
Parameters
Note
Parameters marked in bold below are mandatory. Others are optional and have default values.
Parameter |
Description |
---|---|
script |
Add Hive bootstrap content using this parameter. |
is_user_bootstrap |
Use this parameter to personalize the user-level Hive bootstrap. Set it to |
Note
The user-level Hive bootstrap is loaded after the account-level Hive bootstrap. In case of duplicate entries in user-level and account-level bootstraps, only the user-level Hive bootstrap becomes valid.
Request API Syntax
curl -X PUT -H "X-AUTH-TOKEN:<AUTH-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"script":"<new-bootstrap>", "is_user_bootstrap":"true"}' "https://api.qubole.com/api/v2/accounts/bootstrap"
Note
The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.
Sample API Request
Here is a sample API request to set a Hive bootstrap.
curl -X PUT -H "X-AUTH-TOKEN:<AUTH-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{ "script": "add jar s3://qubole/jars/loc1/stringutils-1.0-SNAPSHOT.jar;
add jar s3://qubole/jars/loc1/udftest-1.0-SNAPSHOT.jar;
create temporary function udftest as 'com.qubole.hive.udftest.UDFTest';"
}' "https://api.qubole.com/api/v2/accounts/bootstrap"
View a Bootstrap
- GET /api/v2/accounts/bootstrap
Use this API to view a Hive bootstrap and a personalized Hive bootstrap (if any set at the user-level) set in a QDS account.
Parameters
Note
Parameters marked in bold below are mandatory. Others are optional and have default values.
Parameter |
Description |
---|---|
is_user_bootstrap |
This parameter is set to |
Required Role
The following users can make this API call:
Users who belong to the system-user/system-admin groups.
Users who belong to a group associated with a role that allows viewing an account’s details. See Managing Groups and Managing Roles for more information.
Request API Syntax
curl -X GET -H "X-AUTH-TOKEN:<AUTH-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"is_user_bootstrap":"true"}' "https://api.qubole.com/api/v2/accounts/bootstrap"
Note
The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.