Details
-
Story
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
-
R3.1.0 S2
-
Description
As a machine, the REST API should provide an endpoint for create, update, remove operations on the Test Repository, including:
- obtain info
- create folder
- remove folder (including sub-folders)
- rename folder
- change folder rank
- change the list of tests contained within the folder
GET|POST|PUT|DELETE/PATCH /rest/raven/1.0/api/testrepository/FP/folders
Examples
// Folder create in root: POST /rest/raven/1.0/api/testrepository/FP/folders { "name": "Folder1" } // returns self: { "id": 6, "rank": 1, "name": "Folder1", "testRepositoryPath": "/Folder1" "testCount": 0, "totalTestCount": 0 }
// Folder create within folder: POST /rest/raven/1.0/api/testrepository/FP/folders/6 { "name": "Folder1" } // returns self: { "id": 6, "rank": 1, "name": "Folder1", "testRepositoryPath": "/Folder1" "testCount": 0, "totalTestCount": 0 }
// Folder Get info: GET /rest/raven/1.0/api/testrepository/FP/folders/6 { "id": 6, "rank": 1, "name": "Folder1", "testRepositoryPath": "/Folder1" "testCount": 0, "totalTestCount": 0 }
// Folder delete: DELETE /rest/raven/1.0/api/testrepository/FP/folders/6
HTTP 200 ok (status code standard) ou HTTP 204 (without content)
// Folder update/rename: PUT /rest/raven/1.0/api/testrepository/FP/folders/6 // "name" and "rank" can be used together or individually { "name": "Folder1", "rank": 4 }
// add/remove tests to a folder: PATCH /rest/raven/1.0/api/testrepository/FP/folders/9/tests { "add": [ "CALC-33", "CALC-75" ], "remove": [ "CALC-25", "CALC-45" ] }