Schema deletion

When you no longer want a schema in your project, you can delete the existing schema by using the DELETE method.


You must have the following information before you delete a schema:

REST API request

To delete a schema, you must use the request with the following attributes:

Request attributes Request parameters
Endpoint https://{OneTest_Server}/onetest-data/rest/v1/otd/projects/{project_id}/schemas/{schema_id}?force=true
Note: When you set the force attribute as true, the schema is deleted even if it is locked.
Authorization Yes
Request body Null

Response code

You can view the following response after you run the request:
HTTP response code Response example
  "message":" Schema deleted successfully",

Error codes

The following table lists the error codes that can generate on the failure of the request:
HTTP error codes Response examples
401 (Invalid Token)
  "messages":["Invalid token."]
401 (Session Expired)
  "messages":["Session expired."]
  "messages":["A schema with id 5f141c681846b5009d92f9a0 does not exist in project 1150."]

Example of the cURL command

You can also use the following cURL command to delete a schema from your HCL® OneTest Data project:

curl -X DELETE '' \
--header 'Accept: application/json;charset=utf-8' \
--header 'Content-Type: application/json;charset=utf-8' \
--header 'Authorization: Bearer XXXX'