# ◉ Run Endpoints

## Add a test run

 - [POST /scripts/{script_id}/runs](https://api-docs.testpad.com/openapi/run-endpoints/paths/~1scripts~1%7Bscript_id%7D~1runs/post.md): Adds a test run to the script script_id.

The test run will be appended to the set of test runs already present.

Both headers and results are optional, so you can add an empty run,
a run with only headers, or a run with results.

To record a retest of an existing run rather than a fresh run, pass the
retest query parameter (see below).

This endpoint cannot be used to create new header fields that have not already been defined for the script.
Any unrecognized header fields will be ignored.

### POST data
The test run is defined by supplying a test run object as defined in Supplying Test Runs.

### Including Results
To include results with the test run, the test run object can include the results field, which has the choice of format defined in Supplying Test Results.

### Returns
JSON response payload containing:

run object — A summary of test run that was created, including its new id field.

### Defaults for common parameters
(no common parameters are used).

## Get a test run

 - [GET /scripts/{script_id}/runs/{run_id}](https://api-docs.testpad.com/openapi/run-endpoints/paths/~1scripts~1%7Bscript_id%7D~1runs~1%7Brun_id%7D/get.md): Returns a single test run from the script script_id, including its headers and
its results.

