# Test Environment Jobs

A Test Environment Job represents an asynchronous operation initiated to refresh a Test Environment. These jobs track the status and progress of environment provisioning and refresh.


## Create a test environment job

 - [POST /test-environments/{id}/jobs](https://developer.zuora.com/v1-api-reference/api/test-environment-jobs/createtestenvironmentjob.md): Use this operation to create a new job for a specific Test Environment. 
It handles HTTP POST requests to the /test-environments/{id}/jobs endpoint, 
accepting a JobRequest object in the request body. Upon successful creation, 
it returns a JobResponse object and sets the Location header to the polling 
URL for the created job.

### User Access Permission

You must be assigned the Refresh Central Sandbox permission to run this operation.

## List all jobs of a test environment

 - [GET /test-environments/{id}/jobs](https://developer.zuora.com/v1-api-reference/api/test-environment-jobs/getalljobsoftestenvironment.md): Use this operation to retrieve a list of job responses associated 
with a specific Test Environment. It handles HTTP GET requests to 
the /test-environments/{id}/jobs endpoint and returns an ArrayResponse 
containing JobResponse objects. This method is documented in Swagger, 
including possible responses for successful retrieval and bad requests.

### User Access Permission

You must be assigned the Refresh Central Sandbox 
permission to run this operation.

## Retrieve a job of a test environment

 - [GET /test-environments/{id}/jobs/{jobId}](https://developer.zuora.com/v1-api-reference/api/test-environment-jobs/getjoboftestenvironment.md): Use this operation to retrieve a specific job associated 
with a Test Environment by its unique job ID. It handles 
HTTP GET requests to the /test-environments/{id}/jobs/{jobId} 
endpoint and returns a JobResponse object if the job is found. 
If the specified job does not exist, it returns a 404 error.

### User Access Permission

You must be assigned the Refresh Central Sandbox permission to run this operation.

## Perform an action on a test environment job

 - [POST /test-environments/{id}/jobs/{jobId}/actions](https://developer.zuora.com/v1-api-reference/api/test-environment-jobs/performactionofjob.md): Use this operation to perform a specified action 
on a Test Environment job. It handles HTTP POST 
requests to the /test-environments/{id}/jobs/{jobId}/actions 
endpoint, accepting a JobActionRequest object in the 
request body. Upon successful execution, it returns a 
JobResponse object reflecting the updated job state.

### User Access Permission

You must be assigned the Refresh Central Sandbox permission to run this operation.

