---
title: "Perform an action on a test environment job"
method: POST
path: "/test-environments/{id}/jobs/{jobId}/actions"
tags: ["Test Environment Jobs"]
---

# Perform an action on a test environment job

`POST /test-environments/{id}/jobs/{jobId}/actions`

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.

## Path parameters

- `id` string, required
- `jobId` string, required

## Headers

- `Zuora-Entity-Ids` string
- `Zuora-Track-Id` string
- `Accept-Encoding` string
- `Content-Encoding` string

## Request body

- JobActionRequest — Request for invoking a certain action on a workflow job
  - `jobAction` 'CANCEL', required — The action to perform against the workflow job

## Response `200`

Successfully submitted Test Environment job action

- JobResponse — The job response
  - `createTime` string, date-time — The date and time when the job was first synced to self service
  - `createdById` string — The automatically generated ID of the Zuora user who created the job object
  - `estimatedCompletionTime` string, date-time — The date and time when the job is estimated to be completed
  - `id` string — The unique ID (UUID) of the Test Environment job
  - `jobEndTime` string, date-time — The date and time when the job completed
  - `jobStartTime` string, date-time — The date and time when the job was started
  - `jobType` 'REFRESH' | 'CREATE' | 'DELETE' — The type of Test Environment job being performed
  - `progressPercentage` integer — The progress percentage of the job
  - `scheduledRefreshTime` string, date-time — The optional date and time for scheduling a job
  - `status` 'NEW' | 'SCHEDULED' | 'QUEUED' | 'INITIATED' | 'PROVISIONING' | 'DEPROVISIONING' | 'EXPORTING' | 'SCRUBBING' | 'RESETTING' | 'IMPORTING' | 'FINALIZING' | 'CANCELLING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' — The status of the Test Environment job
  - `testEnvironmentId` string — The Test Environment to which this job belongs
  - `updateTime` string, date-time — The date and time when the job was last synced to self-service
  - `updatedById` string — The automatically generated ID of the Zuora user who updated the job object

## Other responses

- `400` — Bad request
- `404` — The resource you were trying to reach is not found
- `500` — Internal Error

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
