Restore an Environment

POST /api/v1.2/package/<target_env_id>/activity_history

Use this API to restore the target environment to a previous success state.


This API is available in the new Package Management. Existing account users must create a ticket with Qubole Support to enable this API.

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 updating an environment. See Managing Groups and Managing Roles for more information.



Parameters marked in bold are mandatory. Others are optional and have default values.

Parameter Description
env_type The environment to restore. Valid values are python_package (default), r_package.
package_id The success row ID to which the environment should be restored. You can retrieve the ID using the see activity_history API.

Request API Syntax

curl -X POST -H "X-AUTH-TOKEN: <API-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" -d ‘{“env_type”: “<python_package or r_package>", “package_id”: <row_id>}’ \


The above syntax uses 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 call for restoring an environment to a previous success state.

curl -X POST -H "X-AUTH-TOKEN: <API-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" -d ‘{“env_type”: “r_package”, “package_id”: 123}\