Disable a User in a Qubole Account
- POST /api/v1.2/accounts/disable_qbol_user
This API is used to disable a user in a particular Qubole account.
Required Role
The following users can make this API call:
Users who belong to the system-user or system-admin group.
Users who belong to a group associated with a role that allows disabling users. See Managing Groups and Managing Roles for more information.
Parameters
Note
Parameters marked in bold are mandatory. Others are optional and have default values.
Parameter |
Description |
---|---|
qbol_user_id |
ID of the user, who should be disabled. Or, it can also be the email address of the user.
View Users of a QDS Account describes how to get the
users of a Qubole account. Send the get_users API request. From the successful
response, trace the |
Note
Once a user has been disabled, while all their active scheduled jobs continue to be triggered, they start failing. Qubole e-mails the system-admin users of the account with details of the active scheduled jobs owned by the disabled user. Qubole recommends that the system-admin users change the ownership of these jobs after disabling the user. For more information, see Changing the Owner of a Schedule.
Request API Syntax
Here is the Request API syntax.
curl -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"qbol_user_id" : "<id>/<user-email-address>"}' "https://api.qubole.com/api/v1.2/accounts/disable_qbol_user"
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.
To get the qbol_user_id
, perform the following steps:
Send the GET API request, GET /api/v1.2/accounts/get_users as described in View Users of a QDS Account.
A successful API response contains multiple values. For example, the values may look like
{ id: xyz, ... user_id: abcd, email:abc@.. }
. Use the value that is with theid
parameter.
Sample Request
Here is a sample request.
curl -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"qbol_user_id" : "4"}' "https://api.qubole.com/api/v1.2/accounts/disable_qbol_user"
Here is a sample request with the user’s email address.
curl -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"qbol_user_id" : "[email protected]"}' "https://api.qubole.com/api/v1.2/accounts/disable_qbol_user"