Delete Evaluation Target#
To delete an evaluation target, send a DELETE
request to the targets endpoint. You must provide both the namespace and ID of the target as shown in the following code.
Caution
Before you delete a target, ensure that no jobs use it. If a job uses the target, you must delete the job first.To find all jobs that use a target, refer to Example: Filter Jobs by Target.
curl -X "DELETE" "${EVALUATOR_SERVICE_URL}/v1/evaluation/targets/<my-namespace>/<my-target-id>" \
-H 'accept: application/json'
endpoint = f"{EVALUATOR_SERVICE_URL}/v1/evaluation/targets/<my-namespace>/<my-target-id>"
response = requests.delete(endpoint).json()
response
When you delete a target, the response is similar to the following.
{
"message": "Resource deleted successfully.",
"id": "eval-target-ABCD1234EFGH5678",
"deleted_at": null
}