Databricks Machine Learning Professional Question 121
Single answerYou are managing a Databricks workspace and need to clean up unused webhooks associated with your MLflow tracking server. First, you want to list all existing webhooks and then delete a specific webhook by its ID. Which of the following sequence of steps correctly accomplishes this task?
- A
Use the MLflow CLI command
mlflow webhooks listto list all webhooks, then usemlflow webhooks delete --id <webhook-id>to delete the specified webhook. - B
Use the Databricks REST API endpoint
/api/2.0/mlflow/webhooks/listto retrieve all webhooks, then use/api/2.0/mlflow/webhooks/deletewith the webhook ID to delete the specified webhook. - C
Use the Databricks SQL interface to query the
webhookstable to list all webhooks, then delete the webhook record directly from the table. - D
Use the MLflow Python client
mlflow.list_webhooks()to list all webhooks, then callmlflow.delete_webhook(<webhook-id>)to delete the specified webhook.
Show answer and explanation
Correct answer: B
Explanation
Managing webhooks in Databricks requires the use of the MLflow REST API. The /api/2.0/mlflow/webhooks/list endpoint is used to retrieve all webhooks, and the /api/2.0/mlflow/webhooks/delete endpoint is used to delete a webhook by specifying its ID. Other interfaces, such as the MLflow CLI or Python client, do not currently support webhook management.
- A. Incorrect.
This option is incorrect because the MLflow CLI does not currently support webhook management commands like
mlflow webhooks listormlflow webhooks delete. These tasks must be performed using the REST API. - B. Correct.
This option is correct because the Databricks REST API provides dedicated endpoints for listing and deleting webhooks. The
/api/2.0/mlflow/webhooks/listendpoint retrieves all webhooks, and/api/2.0/mlflow/webhooks/deletedeletes a webhook by its ID. - C. Incorrect.
This option is incorrect because Databricks SQL cannot be used to manage webhooks. Webhooks are managed programmatically via the REST API or other supported interfaces, not through querying tables.
- D. Incorrect.
This option is incorrect because the MLflow Python client does not provide functions like
mlflow.list_webhooks()ormlflow.delete_webhook(). These operations must be carried out using the REST API.