Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titlePOST /rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>
Panel
borderColor#ccc
borderStylesolid

Creates a folder and returns a JSON object with folder information.

Request

PATH PARAMETERS
parametertypedescription
projectKeyString

project key

folderIdintegerinternal folder Id; "-1" corresponds to the root folder of the Test Repository


JSON body attributes
parametertypedescription
nameString

name of folder

Example
Code Block
titleExample Input example
{
  "name": "Folder1"
}
Tip
titleRequest example

curl -H "Content-Type: application/json" -X POST -u admin:admin --data @example.json http://yourserver/rest/raven/1.0/api/testrepository/FP/folders/-1


Responses

201 CREATED : application/json : Successful. Returns a JSON object.

Code Block
titleOutput example
{
  "id": 6,
  "rank": 1,
  "name": "Folder1",
  "testRepositoryPath": "/Folder1"
  "testCount": 0,
  "totalTestCount": 0
}


400 BAD_REQUEST : text/plain : Returns the error.

401 UNAUTHORIZED : text/plain : The Xray for JIRA license is not valid.

500  INTERNAL SERVER ERROR : text/plain : An internal error occurred getting the folder.

Expand
titlePUT /rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>
Panel
borderColor#ccc
borderStylesolid

Updates an existing folder.

Request

PATH PARAMETERS
parametertypedescription
projectKeyString

project key

folderIdintegerinternal folder Id
JSON body attributes
parametertypedescription
nameString

name of folder

rankIntegerrank within the parent folder

Example
Code Block
titleExample Input
{
  "name": "Folder1",
  "rank": 4
}
Tip
titleRequest example

curl -H "Content-Type: application/json" -X PUT -u admin:admin --data @example.json http://yourserver/rest/raven/1.0/api/testrepository/FP/folders/6


Responses

204 No content : text/plain : Successful. Does not return anything.

400 BAD_REQUEST : text/plain : Returns the error.

401 UNAUTHORIZED : text/plain : The Xray license is not valid.

500  INTERNAL SERVER ERROR : text/plain : An internal error occurred getting the folder.

...