Open topic with navigation

# Resources (Get all resource folders)

## Description

Retrieves a list of all existing resource folders in the project.

## URL

    /LoadTest/rest/domains/{domainName}/projects/{projectName}/resourcefolders

## HTTP Method

GET: Returns the folders in the body of the response.

## Request

Headers:

Accept: application/xml

Cookies:

Version 2020 (or later) | LWSSO_COOKIE_KEY={LwssoCookie};
Versions earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request Body:

None

Request Example

    GET http://<LRE_Server>/LoadTest/rest/domains/MyDomain/projects/MyProject/resourcefolders

## Response

Headers:

One of:

- Content-Type: application/xml

- Content-Type: application/json

Cookies:

None

HTML Return Code:

One of the HTTP Return Codes

HTML Body:

The XML containing the resource folders.

Response Example

     <ResourceFolders xmlns="http://www.hp.com/PC/REST/API">
     <ResourceFolder>
        <Name>Resources</Name>
        <ParentFolderID>0</ParentFolderID>
        <Description />
        <ID>1</ID>
     </ResourceFolder>
     <ResourceFolder>
        <Name>Dynatrace<</Name>
        <ParentFolderID>1</ParentFolderID>
        <Description />
        <ID>1001</ID>
     </ResourceFolder>
     <ResourceFolder>
        <Name>MONS_OFW</Name>
        <ParentFolderID>1</ParentFolderID>
        <Description />
        <ID>1002</ID>
     </ResourceFolder>
     <ResourceFolder>
        <Name>Resources</Name>
        <ParentFolderID>1002</ParentFolderID>
        <Description />
        <ID>1003</ID>
     </ResourceFolder>
     <ResourceFolder>
        <Name>mofs_sub_sub_folder</Name>
        <ParentFolderID>1003</ParentFolderID>
        <Description />
        <ID>1004</ID>
     </ResourceFolder>
    </ResourceFolders>

Example query that retrieves folder names with parent IDs greater that 1002

    GET http://my-vm2468>/LoadTest/rest/domains/MyDomain/projects/MyProject/resourcefolders?fields=Name&query={ID[>1002]}

    <ResourceFolders xmlns="http://www.hp.com/PC/REST/API">
     <ResourceFolder>
        <Name>mofs_sub_folder</Name>
     </ResourceFolder>
     <ResourceFolder>
        <Name>mofs_sub_sub_folder</Name>
     </ResourceFolder>
     <ResourceFolder>
        <Name>mofs_sub_sub_sub_folder</Name>
     </ResourceFolder>
     <ResourceFolder>
        <Name>Created_By_Rest</Name>
     </ResourceFolder>
    </ResourceFolders>

## See Also

Resources (Get resource folders by ID)
Resources (Add resource folder)
Resources (Delete resource folder)