Schema download

When you generate a schema, you might want to download the file on your computer. You must use the GET method to download the schema. The schema that you want to download must be either in the JSON or XSD format.


You must have the following information before you download the file:

REST API request

To download a file that contains a schema, you must use the request with the following attributes:

Request attributes Request parameters
HTTP method GET
Endpoint https://{OneTest_Server}/onetest-data/rest/v1/otd/projects/{project_id}/schemas/{schema_id}/content
Authorization Yes
Request body Null

Response code

The response of the download request is a .zip file. The .zip file contains a schema either in the JSON or XSD format.
HTTP response code Response example
200 File with schema either in the JSON or XSD format.

Error codes

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

Example of the cURL command

You can also use the cURL command to download the file that contains the schema.

For example, you can use the following command to download a schema from your project:

curl -X GET "" -H "accept: application/octet-stream" -H "Authorization: Bearer xxxxxx"