Update Testcase API

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-rest-api/update-testcase-api.html

You can use the API to update a testcase in Zephyr Enterprise.
It takes the testcaseId and releaseId as mandatory parameters. It updates the parameters such as name, description, tags, estimated time, priority, and Custom fields of a test case.

Request URL:

http://localhost/flex/services/rest/latest/testcase?forceCreateNewVersion=false

HTTP Method:

PUT
http://localhost:80/flex/services/rest/latest/testcase/id?forceCreateNewVersion=

Authentication

You can authenticate your requests by using one of the methods described in the Zephyr REST API topic.

Headers

Content-Type:application/json application/xml

Sample Request

{ "testcase": { "testcaseId": 2016, "name": "Name update", "description": "ss1", "tag": "tg1 tg2 tg4 tg7", "estimatedTime": 300000, "priority": "3" }, "releaseId": 1 }

Sample Response

{ "id": 2025, "tcrCatalogTreeId": 1, "revision": 0, "stateFlag": 0, "lastModifiedOn": 1680530497228, "versionNumber": 1, "createDatetime": 1680530450000, "createdById": 1, "modifiedById": 1, "testcase": { "customProperties": {}, "customProcessedProperties": {}, "id": 2024, "name": "Name update", "description": "ss1", "priority": "3", "tag": "tg1 tg2 tg4 tg7", "lastModifiedOn": 1680530497228, "creationDate": 1680460200000, "createDatetime": 1680530450000, "tcCreationDate": "04/03/2023", "isComplex": false, "estimatedTime": 300000, "writerId": 0, "creatorId": 1, "lastUpdaterId": 1, "oldId": 0, "automated": false, "customFieldProcessed": true, "customFieldValues": [], "testcaseSequence": { "seqNumber": 2016 }, "testcaseId": 2016, "versionNumber": 1, "projectId": 1, "testcaseType": "ORIGINAL", "requirementIds": [], "requirementIdsNew": [], "creatorName": "Test Manager", "testcaseShared": false, "automatedDefault": false }, "projectId": 1, "releaseId": 1, "isDerivedFromBDD": false, "orderId": 2020, "maxVersionNumber": 1, "projectIdParam": 1, "original": true }

Response Codes

HTTP Status Code

Description

HTTP Status Code

Description

200

The request completed successfully.

400

Bad request. The requirement does not match.

401

The authentication token is missing.

403

The user has no permissions to perform this operation.

500

Unknown internal error.