ProjectPlans_GetListOfResources Operation

Applies to QAComplete 12.71 SaaS & On-Premises, last modified on April 26, 2021

Returns an array of PPResource objects that store information on resources (users) used to perform tasks in project plans.

Requirements

  • The user must belong to a security group that has the Read privilege for Project Plan Maintenance (Project Manager).

  • The plug-in to MS Project that allows importing project plans to and exporting them from Microsoft Project must be installed.

Parameters

The operation uses the following parameters:

AuthenticationData  :  , required

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

Entity  :  string, required

Reserved.

Result

An array of the PPResource objects that describe the resources used to perform tasks in specified project plans.

Example

Sample Code

C#

string login = "[email protected]";
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;

// Get the array of resources
PPResource[] resources = service.ProjectPlans_GetListOfResources(authData, "");
foreach (PPResource resource in resources)
{
  Console.WriteLine("{0}: {1}", resource.UserId, resource.PersonName);
}

Java

String login = "[email protected]";
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());

// Get the array of resources
List<PPResource> resources;
resources = service.projectPlansGetListOfResources(authData, "").getPPResource();
for (PPResource resource : resources)
{
  System.out.format("%d: %s%n", resource.getUserId(), resource.getPersonName());
}

Sample Request XML

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

<?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>
    <ProjectPlans_GetListOfResources xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>8162</DeptId>
        <ProjId>11873</ProjId>
        <UserId>24661</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Entity></Entity>
    </ProjectPlans_GetListOfResources>
  </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: 532 {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>
    <ProjectPlans_GetListOfResources xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>8162</DeptId>
        <ProjId>11873</ProjId>
        <UserId>24661</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Entity></Entity>
    </ProjectPlans_GetListOfResources>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 666 {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>
    <ProjectPlans_GetListOfResourcesResponse xmlns="http://www.pragmaticsw.com/">
      <ProjectPlans_GetListOfResourcesResult>
        <PPResource>
          <UserId>24661</UserId>
          <PersonName>Doe, John</PersonName>
          <StandardRate>0</StandardRate>
        </PPResource>
        <PPResource>
          <UserId>24667</UserId>
          <PersonName>Doe, Jane</PersonName>
          <StandardRate>0</StandardRate>
        </PPResource>
      </ProjectPlans_GetListOfResourcesResult>
    </ProjectPlans_GetListOfResourcesResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 676 {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>
    <ProjectPlans_GetListOfResourcesResponse xmlns="http://www.pragmaticsw.com/">
      <ProjectPlans_GetListOfResourcesResult>
        <PPResource>
          <UserId>24661</UserId>
          <PersonName>Doe, John</PersonName>
          <StandardRate>0</StandardRate>
        </PPResource>
        <PPResource>
          <UserId>24667</UserId>
          <PersonName>Doe, Jane</PersonName>
          <StandardRate>0</StandardRate>
        </PPResource>
      </ProjectPlans_GetListOfResourcesResult>
    </ProjectPlans_GetListOfResourcesResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

ProjectPlans_ExportMSProject
ProjectPlans_GetListOfProjectPlans
ProjectPlans_ImportMSProject
Project Plan Operations
Project Operations
SOAP API Reference

Highlight search results