Folders_Update Operation

Applies to QAComplete 12.84 SaaS, last modified on July 19, 2021

Gets a folder by its ID and updates its properties with specified values. All unspecified properties are cleared.

Requirements

The user must belong to a security group that has the Update privilege for Folder Maintenance of the application area to which the folder belongs.

Parameters

The operation uses the following parameters:

AuthenticationData  :  , required

An AuthenticationData object containing the login information and the ID of the project whose folder you want to update.

Folder  :  Folder, required

An updated Folder object.

Result

None.

Remarks

The Folder object has matching Id and Name properties, for example, OwnerUserId and OwnerUserName. To set them, specify the value only for the Id property. The corresponding Name property will be set automatically.

Example

Sample Code

C#

string login = "john.doe@example.com";
string password = "p@ssword";

ServiceSoapClient service = new ServiceSoapClient();

// Prepare AuthenticationData
LoginInfo loginInfo = service.GetLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.AppCode = loginInfo.AppCode;
authData.UserId = loginInfo.UserId;
authData.PassCode = password;
authData.DeptId = loginInfo.DeptId;
authData.ProjId = loginInfo.ProjId;

// Prepare the Folder object
Folder folder = new Folder();

// Specify the folder object to update
int Id = 4;

// Load existing folder data
folder = service.Folders_Load(authData, Id);

// Specify new values of the folder properties
folder.FolderName = "Product Backlogs";
folder.Description = "Recent product’s backlogs";
// Update the folder
service.Folders_Update(authData, folder);

Java

String login = "john.doe@example.com";
String password = "p@ssword";

ServiceSoap service = new Service().getServiceSoap12();

// Prepare AuthenticationData
LoginInfo loginInfo = service.getLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.setAppCode(loginInfo.getAppCode());
authData.setUserId(loginInfo.getUserId());
authData.setPassCode(password);
authData.setDeptId(loginInfo.getDeptId());
authData.setProjId(loginInfo.getProjId());

// Prepare the Folder object
Folder folder = new Folder();

// Specify the folder to update
int Id = 4;

// Load existing folder data
folder = service.foldersLoad(authData, Id);

// Specify new values of the folder properties
folder.setFolderName("Product Backlogs");
folder.setDescription("Recent product’s backlogs");
// Update the folder
service.foldersUpdate(authData, folder);

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 1040 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/Folders_Update"
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Folders_Update xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>8162</DeptId>
        <ProjId>11873</ProjId>
        <UserId>24661</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Folder>
        <FolderId>4</FolderId>
        <ProjId>11873</ProjId>
        <FolderName>Product Backlogs</FolderName>
        <Description>Recent product backlogs</Description>
        <EntityCode>Bugs</EntityCode>
        <OwnerUserId>24661</OwnerUserId>
        <DeptId>8162</DeptId>
        <ParentName>Backlogs</ParentName>
        <IsActive>Y</IsActive>
        <IsVersion>N</IsVersion>
        <FullFolderName>Backlogs/Product Backlogs</FullFolderName>
        <OwnerUserName>Doe, John</OwnerUserName>
        <DateCreated>2014-07-17T06:33:08</DateCreated>
        <DateUpdated>2014-07-20T11:23:17</DateUpdated>
        <UpdateUserId>24661</UpdateUserId>
        <UserName>Doe, John</UserName>
      </Folder>
    </Folders_Update>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1048 {Insert an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Folders_Update xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>8162</DeptId>
        <ProjId>11873</ProjId>
        <UserId>24661</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Folder>
        <FolderId>4</FolderId>
        <ProjId>11873</ProjId>
        <FolderName>Product Backlogs</FolderName>
        <Description>Recent product backlogs</Description>
        <EntityCode>Bugs</EntityCode>
        <OwnerUserId>24661</OwnerUserId>
        <DeptId>8162</DeptId>
        <ParentName>Backlogs</ParentName>
        <IsActive>Y</IsActive>
        <IsVersion>N</IsVersion>
        <FullFolderName>Backlogs/Product Backlogs</FullFolderName>
        <OwnerUserName>Doe, John</OwnerUserName>
        <DateCreated>2014-07-17T06:33:08</DateCreated>
        <DateUpdated>2014-07-20T11:23:17</DateUpdated>
        <UpdateUserId>24661</UpdateUserId>
        <UserName>Doe, John</UserName>
      </Folder>
    </Folders_Update>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 308 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Folders_UpdateResponse xmlns="http://www.pragmaticsw.com/" />
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 318 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Folders_UpdateResponse xmlns="http://www.pragmaticsw.com/" />
  </soap12:Body>
</soap12:Envelope>

See Also

Folders_Add
Folders_Delete
Folders_Load
Folders_LoadByCriteria
Folders Operations
SOAP API Reference

Highlight search results