GET/projects/{ProjectId}/{EntityCode}/folders

Applies to QAComplete 14.5, last modified on August 06, 2024

Returns information on folders of the specified entity.

Use the operation to return a list of folders that the specified entity (Defects, Tests and so on) has in the specified project.

Authentication

Basic authentication using a user’s login and password. See Authentication for details.

Security Rights

The authenticating user must have the Read privilege for the needed entity.

Request Format

To get information on folders, send a GET request to the following URL:

http://{server}/rest-api/service/api/v2/projects/{ProjectId}/{EntityCode}/folders?Filter={filter}

ProjectId  :  integer, required

The ID of the needed project.

EntityCode  :  string, required

The type of the item, whose folders you want to get. Possible values:

  • Releases
  • Bugs (defects)
  • FunctionalSpecs (requirements)
  • Tests
  • TestSets
  • TestSteps

filter  :  string

The filter expression to apply to the returned list. See Search Filters.

A sample request:

GET http://yourserver.com/rest-api/service/api/v2/projects/11873/Bugs/folders HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==

A sample request made by using cURL:

curl -u [email protected]:p@ssword -H "Accept: application/json" http://yourserver.com/service/api/v2/projects/11873/Bugs/folders

Response Format

If successful, the operation responds with HTTP status code 200 and returns a JSON object with the folders information.

A sample response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 797


{
    "metadata": {
       "result_set": {
          "count": 2,
          "offset": 0,
          "limit": 25,
          "total": 2
       },
        "permissions": {
            "acl": 7
       }
    },
    "results": [
       {
          "id": 254,
          "parent_id": 0,
          "project_id": 11873,
          "folder_name": "version 11",
          "is_active": true,
          "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": "version 11",
          "updated_user_name": "Smith, John",
          "created_user_name": "Smith, John"
       },
       {
          "id": 257,
          "parent_id": 254,
          "project_id": 11873,
          "folder_name": "build 2",
          "is_active": true,
          "date_created": "2013-10-01T00:05:51.8400000",
          "date_updated": "2013-10-01T00:07:38.0000000",
          "update_user_id": 24661,
          "owner_user_id": 24664,
          "full_folder_name": "version 11/build 2",
          "updated_user_name": "Mann, Porter",
          "created_user_name": "Franco, Cole"
        }
    }
  ]
}

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 the specified entity does not exist, the operation returns the 'Invalid entity code' error.

See Also

Folders REST API Reference

Highlight search results