Retrieve automation task details
Retrieve task details by project
Delete multiple automation tasks
Upload a file for an automation task
Retrieve automation task status
This API operation creates an automation task, which is the entry point for the automation functionality.
POST https://<client server base URL>/rest/zapi/latest/automation/job/create
Content-Type: application/json
{
"projectId": "",
"automationType": "",
"taskName": "Name of the task",
"description": "",
"automationTool": "",
"versionId": "",
"cycleId": "",
"folderId": "",
"cycleName": "",
"folderName": "",
"assigneeDisplayName": ""
"cycleStartDate": "01/01/20",
"cycleEndDate": "03/01/20",
}
projectId: the ID of the project.
automationType: the type of the task to be created (UPLOAD or ZBOT).
taskName: the name of the task to be created.
description: the description of the task to be created.
automationTool: the name of the automation framework where tests are executed.
versionId: the ID of the version where the cycle will be created.
cycleId: the ID of the cycle which is created under the selected version.
folderId: the ID of the folder which is created under the selected cycle.
cycleName: the name of the cycle under which all the executions will be created.
folderName: the name of the folder under which all the executions will be created.
assigneeDisplayName: the name of the user all the executions will be assigned to.
cycleStartDate: the start date of the cycle (dd/mm/yy).
cycleEndDate: the end date of the cycle (dd/mm/yy).
{
"JOB_ID": "",
"message": ""
}
JOB_ID: the ID of the task that has been created.
message: a message sent if the task couldn’t be created.
200: The request was accepted and processed successfully.
400: Bad request or it is not configured properly. Please check the error message in the response body.
401: Unauthorized, please check your username /password and ensure that they are correct and in the expected format.
403: Forbidden, please check that you have the required permissions to execute this command.
404: API URL not found/configured properly.
500: Please ensure that the server is up and running and zephyr-squad-server is configured correctly before using the API.
This API operation updates an existing automation task.
PUT https://<client server base URL>/rest/zapi/latest/automation/job/update/{automationId}
Content-Type: application/json
Parameters:
automationId: The ID of the task to be updated.
The fields a user can update:
automationType: the type of the task to be created (UPLOAD or ZBOT).
taskName:nthe name of the task to be created.
description: the description of the task to be created.
automationTool: the name of the automation framework where tests are executed.
versionId: the ID of the version in which the cycle will be created.
cycleId: the ID of the cycle that will be created under the selected version.
folderId: the ID of the folder that will be created under the selected cycle.
cycleName: the name of the cycle under which all the executions will be created.
folderName: the name of the folder under which all the executions will be created.
assigneeDisplayName: the name of the user all the executions will be assigned to.
cycleStartDate: the start date of the cycle.
cycleEndDate: the end date of the cycle.
{
"JOB_ID": "",
"message": ""
}
JOB_ID: the ID of the task that has been updated.
message: a message sent if the task couldn’t be updated.
200: The request was accepted and processed successfully
400: Bad request or it is not configured properly. Please check the error message in the response body.
401: Unauthorized, please check your username /password and ensure that they are correct and in the expected format.
403: Forbidden, please check that you have the required permissions to execute this command.
404: API URL not found/configured properly.
500: Please ensure that the server is up and running and Zephyr is configured correctly before using the API.
This API operation retrieves information about a task by its ID.
GET https://<client server base URL>/rest/zapi/latest/automation/job /{automationId}
Parameters:
automationId: the ID of the task information about which will be retrieved.
{
"taskName": "",
"taskId": "",
"uploadFileName": "",
"automationType": "",
"taskDescription": "",
"projectId": "",
"versionId": "",
"modifiedDate": "",
"createdDate": "",
"automationTool": "",
"resultPath": "",
"cycleName": "",
"cycleId": "",
"folderName": "",
"folderId": "",
"assigneeUser": "",
"cycleStartDate": "",
"cycleEndDate": "",
"cycleStartDateFormatted": "",
"cycleEndDateFormatted": "",
"executionStatus": "",
"errorMessage": "",
"assigneeDisplayName": "",
"assigneeName": "",
"versionName": "",
"fileUploaded": ""
}
200: The request was accepted and processed successfully.
400: Bad request, the task was not found.
401: Unauthorized, please check your username /password and ensure that they are correct and in the expected format.
403: Forbidden, please check that you have the required permissions to execute this command.
404: API URL not found/configured properly.
500: Please ensure that the server is up and running and Zephyr is configured correctly before using the API.
This API operation retrieves the details of all the tasks used in a specific project.
GET https://<client server base URL>/rest/zapi/latest/automation/job/byproject/{projectId}
Parameters:
projectId: the ID of the project.
{
"taskId1": {
Task information in JSON format
},
"taskId2": {
Task information in JSON format
},
...
"taskIdN": {
Task information in JSON format
}
}
200: The request was accepted and processed successfully.
400: Bad request. The project was not found.
401: Unauthorized, please check your username /password and ensure that they are correct and in the expected format.
403: Forbidden, please check that you have the required permissions to execute this command.
404: API URL not found/configured properly.
500: Please ensure that the server is up and running and Zephyr is configured correctly before using the API.
This API operation deletes a task specified by its ID.
DELETE https://<client server base URL>/rest/zapi/latest/automation/job/delete/{automationId}
Parameters:
automationId: the ID of the task to be deleted.
{
"jobs" : []
}
{
"message": ""
}
message: a message sent if the task couldn’t be deleted.
200: The request was accepted and processed successfully.
400: Bad request. The task was not found.
401: Unauthorized, please check your username /password and ensure that they are correct and in the expected format.
403: Forbidden, please check that you have the required permissions to execute this command.
404: API URL not found/configured properly.
500: Please ensure that the server is up and running and Zephyr is configured correctly before using the API.
This API operation deletes multiple automation tasks.
DELETE https://<client server base URL>/rest/zapi/latest/automation/job /delete/{automationId}
Content-Type: application/json
{
"jobs": [id1, id2, …, idN]
}
{
"message": ""
}
message: a message sent if the tasks couldn’t be deleted.
200: The request was accepted and processed successfully.
400: Bad request. The task was not found.
401: Unauthorized, please check your username /password and ensure that they are correct and in the expected format.
403: Forbidden, please check that you have the required permissions to execute this command.
404: API URL not found/configured properly.
500: Please ensure that the server is up and running and Zephyr is configured correctly before using the API.
This API operation uploads a file and associates it with a task specified by its ID.
Note
Currently, only the XML file format is supported for upload.
POST https://<client server base URL>/rest/zapi/latest/automation/upload/{automationId}
Parameters:
automationId: the ID of the task the file will be uploaded for.
Content-Type: multipart/form-data
{
"file": "The file to be uploaded."
}
{
"JOB_ID": "",
"message": ""
}
message: a message sent if the file couldn’t be uploaded.
200: The request was accepted and processed successfully.
400: Bad request. The task was not found.
401: Unauthorized, please check your username /password and ensure that they are correct and in the expected format.
403: Forbidden, please check that you have the required permissions to execute this command.
404: API URL not found/configured properly.
500: Please ensure that the server is up and running and Zephyr is configured correctly before using the API.
This API operation executes an automation task specified by its ID.
POST https://<client server base URL>/rest/zapi/latest/automation/job/execute/{automationId}
Parameters:
automationId: the ID of the task to be executed.
{
"message": ""
}
message: a message sent if the task couldn’t be executed.
200: The request was accepted and processed successfully.
400: Bad request. The task was not found.
401: Unauthorized, please check your username /password and ensure that they are correct and in the expected format.
403: Forbidden, please check that you have the required permissions to execute this command.
404: API URL not found/configured properly.
500: Please ensure that the server is up and running and Zephyr is configured correctly before using the API.
This API operation get the status of a task specified by its ID.
GET https://<client server base URL>/rest/zapi/latest/automation/job/status/{automationId}
Parameters:
automationId: The ID of the task whose status you want to get.
{
"Status": "",
"errorMessage": ""
}
Status: the status of the task. Possible values: UNEXECUTED, SCHEDULED, IN_PROGRESS, SUCCESS, FAIL.
errorMessage: a message sent when the task status is FAIL.
200: The request was accepted and processed successfully.
400: Bad request. The task was not found.
401: Unauthorized, please check your username /password and ensure that they are correct and in the expected format.
403: Forbidden, please check that you have the required permissions to execute this command.
404: API URL not found/configured properly.
500: Please ensure that the server is up and running and Zephyr is configured correctly before using the API.