Add resource folder
Description
Adds a resource folder.
URL
/LoadTest/rest/domains/{domainName}/projects/{projectName}/resourcefolders
Remarks
Body of the request should contain a resource folder description in XML or JSON format.
HTTP method
POST: Creates a resource folder.
Request
Headers:
One of the following:
Content-Type: application/xml
Content-Type: application/json
Cookies:
Version | Cookie |
---|---|
2020 or later | LWSSO_COOKIE_KEY={LwssoCookie}; |
Earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie}; |
Request body:
POST: An XML or JSON containing the resource folder ID. The mandatory fields in the request are as follows.
Element | Description |
---|---|
Name | Name of the resource folder. |
ParentFolderID | ID of the resource folder |
Request examples:
POST http://<LRE_Server>/LoadTest/rest/domains/{domainName}/projects/{projectName}/resourcefolders
Content-Type: application/xml
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
<ResourceFolder xmlns="http://www.hp.com/PC/REST/API">
<Name>Created_By_Rest</Name>
<ParentFolderID>1002</ParentFolderID>
<Description>blah</Description>
</ResourceFolder>
POST http://<LRE_Server>/LoadTest/rest/domains/{domainName}/projects/{projectName}/resourcefolders
Content-Type: application/json
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
{ "Name": "demo_test",
"ParentFolderID": 1,
"Description": "auto"
}
Response
Headers:
One of:
Accept: application/xml
Accept: application/json
Cookies:
None
HTML return code:
One of the HTTP return codes
HTML body:
The data on the entity in the response.
Response examples:
<ResourceFolder xmlns="http://www.hp.com/PC/REST/API">
<Name>Created_By_Rest</Name>
<ParentFolderID>1002</ParentFolderID>
<Description>blah</Description>
<ID>1008</ID>
</ResourceFolder>
{ "ID": 1006,
"Name": "demo_test",
"ParentFolderID": 1,
"Description": "auto"
}
See also: