Updates a folder in QAComplete.
Use the operation to update the needed fields of an existing folder of the specified entity type in QAComplete.
To update all the fields of the folder, use the …/{EntityCode}/folders/{Id} (PUT)
operation.
To add a new folder, use the …/{EntityCode}/folders (POST)
operation.
Authentication
Basic authentication using a user’s login and password. See Authentication for details.
Security Rights
The authenticating user must belong to a security group that has the Update privilege for the specified entity type.
Request Format
To update the folder’s fields, send a PATCH request to the following URL:
URL parameters
ProjectId : integer, required
The ID of the project, which folder you need to update.
EntityCode : string, required
The entity, which folder you need to update. Possible values:
- Releases
- Bugs (defects)
- FunctionalSpecs (requirements)
- Tests
- TestSets
- TestSteps
Id : integer, required
The ID of the folder you need to update.
Body parameters
In the request body, pass the RequestFolderPatch
JSON object that specifies the folder’s fields to be updated:
{
"FolderName": "string",
"Description": "string",
"IsPublic": "boolean",
"ParentName": "string",
"IsActive": "boolean"
}
The property values you do not specify remain unchanged.
FolderName : string, required
The folder’s name.
Description : string
The short description of the folder.
IsPublic : boolean
Defines whether the folder is public or private.
ParentName : string
The parent folder’s name.
IsActive : boolean
Defines whether the folder is active or hidden.
A sample request:
PATCH http://yourserver.com/rest-api/service/api/v2/projects/11873/FunctionalSpecs/folders/77 HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Length: 112
{
"Description": "This folder’s description will be changed after this request."
}
A sample request made by using cURL:
curl -u [email protected]:p@ssword -d @folder.txt -H "Content-Type: application/json" -H "Accept: application/json" http://yourserver.com/service/api/v2/projects/11873/FunctionaSpecs/folders/87
Response Format
If successful, the operation responds with HTTP status code 200 and returns a JSON object with the updated folder information.
A sample response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 563
{
"id": 77,
"parent_id": 0,
"project_id": 11873,
"entity_code": "Requirements",
"folder_name": "Sample Folder",
"description: "This folder’s description will be changed after this request.",
"is_active": true,
"is_public": false,
"date_created": "2013-09-14T13:53:53.4230000",
"date_updated": "2013-09-14T13:53:53.4230000",
"update_user_id": 24663,
"owner_user_id": 24663,
"full_folder_name": "Sample Folder",
"updated_user_name": "Smith, John",
"created_user_name": "Smith, John"
}
The project’s unique identifier.
The folder’s unique identifier.
The code of the entity the folder belongs to.
The ID of the last user who updated the folder.
The ID of the user who owns the folder.
The date and time when the folder was created.
The date and time when the folder was last updated.
True if the folder is active and False if hidden.
True if the folder is public and False if private.
The name of the last user, who updated the folder, in the Lastname, Firstname format.
The name of the user, who created the folder, in the Lastname, Firstname format.
The ID of the folder in which the selected folder resides.
The parent folder’s name.
The folder’s name.
The folder’s short description.
The full path to the folder.
Error responses
If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.
If the project with the specified ProjectId does not exist or the authenticating user does not have rights to access the project, the operation returns the Access is denied
error.
If a folder with the specified Id does not exist, the operation returns the File or directory not found
error.