Limai Docs
API ReferenceValidation Scripts

Delete Validation Script

Remove a validation script and its stored results

DELETE/api/v1/deployments/{deploymentId}/validation-scripts/{key}

Deletes the script record and, by cascade, every validation result it has produced. The response reports how many results went with it.

To stop a script from running while keeping its history, use Update with enabled: false instead.

Requires the EDIT_MODELS permission (OWNER or DEVELOPER).

Parameters

NameTypeInRequiredDescription
deploymentIdstringpathYesThe model's ID. A deployment ID is refused — see Error Responses
keystringpathYesThe script key

Request

const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/validation-scripts/vin-checksum",
{
  method: "DELETE",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
}
);

Response

Response200
{
  "deleted": true,
  "key": "vin-checksum",
  "deletedResults": 128
}

Error Responses

A deployment ID in place of the model's:

Response409
{
  "error": "Schema and configuration are edited on the model, not on a deployment",
  "code": "POINTER_NOT_WRITABLE",
  "deploymentId": "dpl_prod01",
  "modelId": "dep_abc123"
}

On this page