Deleting custom operators and libraries using API

If you no longer need your custom operators and libraries, you can reset the runtime environment to CDE default environment by deleting the currently active Python environment. To reset the CDE Airflow Python environment, complete the following steps.

To delete an environment, call DELETE on /admin/airflow/env:
curl -X DELETE \
"https://pmjkrgn5.cde-czlmkz4y.na-01.xvp2-7p8o.cloudera.site/dex/api/v1/admin/airflow/env" \
-H "Authorization: Bearer ${CDE_TOKEN}" \
-H "accept: application/json"
To ensure that the environment has been successfully deleted, the currently active environment status must be checked and the request must fail with a 404. This operation may take a few minutes. This indicates that the environment is not currently in use. For example:
curl -X GET \
"https://pmjkrgn5.cde-czlmkz4y.na-01.xvp2-7p8o.cloudera.site/dex/api/v1/admin/airflow/env" \
-H "Authorization: Bearer ${CDE_TOKEN}" \
-H "accept: application/json"