API Operations for Automation Jobs
Starting October 11, 2024 (Zephyr Enterprise 8.2), the Zephyr Enterprise documentation moved from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise documentation page. Please see: https://support.smartbear.com/zephyr-enterprise/docs/en/zephyr-enterprise/zephyr-user-guide/zephyr-test-automation/api-operations-for-automation-jobs.html
Base URL, authentication, data formats
The operations described below work for both Cloud and On-Premise instances of Zephyr Enterprise. They use the same authentication parameters and data formats that other Zephyr API operations use. For complete information on these, see Zephyr REST API.
Respose codes
The API operations described below use the following response codes:
Response code | Description |
---|---|
200 | The operation has been completed successfully. |
400 | Error in request data or parameters. For instance, the project or job with the specified id doesn’t exist. |
401 | Authentication error (authentication token is missing). |
403 | Error. You don’t have permissions to perform this operation. |
500 | Internal server error. |
Create an automation job
To create a new automation job, use this operation:
POST http://<zephyr-server-address>/flex/services/rest/v4/upload-file/automation/create-job-detail
Request data
The request body specifies proeprties of the job to be created.
Response data
If the operation succeeded, the response has the 200 OK
status and the response body contains the created job properties. The id
property is the job's identifier. You can use it later in operations that update job properties or delete a job.
If the operation failed, it returns one of the error codes.
Schedule a job run
To schedule the run of one or multiple jobs, use the following operation:
POST http://<zephyr-server-address>/flex/services/rest/v4/upload-file/automation/execute-job
Request data
The request body contains an object with the ids
property that is an array of job identifiers to be used for the run. You can find this identifier in the response of the operation that created the automation job.
{"ids":[1, 2, 3]}
Response data
If the operation succeeds, the response code is 200 OK
and the response body contains information on the scheduled run. The id
property is the identifier of the run. You can use it later to check the job status, or to stop or cancel a job.
If the operation fails, it returns of the error codes.
Create and execute a job
The following operation creates a new job and commands the test engine to run it:
POST http://<zephyr-server-address>/flex/services/rest/v4/upload-file/automation/create-and-execute-job
Request data
The request body specifies the name, project, release, cycle, and other properties of the created job. These are the values described above.
Response data
If the operation succeeds, the response status is 200 OK
and the response body contains information on the scheduled run:
If the operation fails, it returns of the error codes.
Starting Release 8.2, Zephyr Enterprise documentation is moving from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise Documentation page. https://support.smartbear.com/zephyr-enterprise/docs/en/welcome-to-zephyr-enterprise.html