Returns the array of ProjectPlan
objects that store information on plans in specified projects.
Requirements
-
The user must belong to a security group that has the Read privilege for Project Plan Maintenance (Project Manager).
Parameters
The operation uses the following parameters:
AuthenticationData : , required
An AuthenticationData
object containing the login information and the ID of the projects whose plans you want to get.
IncludeInactive : boolean, required
Specifies whether you want to get inactive project plans.
Result
The array of ProjectPlan
objects that store information on plans in projects specified by the authentication data.
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 plans
ProjectPlan[] projectPlans = service.ProjectPlans_GetListOfProjectPlans(authData, false);
foreach (ProjectPlan plan in projectPlans)
{
Console.WriteLine("{0}: {1}", plan.ProjPlanId, plan.Name);
}
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 plans
List<ProjectPlan> projectPlans;
projectPlans = service.projectPlansGetListOfProjectPlans(authData, false).getProjectPlan();
for (ProjectPlan plan : projectPlans)
{
System.out.format("%d: %s%n", plan.getProjPlanId(), plan.getName());
}
Sample Request XML
POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 553 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/ProjectTasks_GetListOfProjectPlans"
<?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>
<ProjectTasks_GetListOfProjectPlans xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>8162</DeptId>
<ProjId>11873</ProjId>
<UserId>24661</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<IncludeInactive>false</IncludeInactive>
</ProjectTasks_GetListOfProjectPlans>
</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: 561 {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>
<ProjectTasks_GetListOfProjectPlans xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>8162</DeptId>
<ProjId>11873</ProjId>
<UserId>24661</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<IncludeInactive>false</IncludeInactive>
</ProjectTasks_GetListOfProjectPlans>
</soap12:Body>
</soap12:Envelope>
Sample Response XML
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 1061 {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>
<ProjectTasks_GetListOfProjectPlansResponse xmlns="http://www.pragmaticsw.com/">
<ProjectTasks_GetListOfProjectPlansResult>
<ProjectPlan>
<ProjPlanId>2</ProjPlanId>
<Name>Application BETA Schedule</Name>
<OwnerUserId>24661</OwnerUserId>
<OwnerName>Doe, John</OwnerName>
<AssigneeUserId>24661</AssigneeUserId>
<AssignedToName>Doe, John</AssignedToName>
<StatusCode>Active</StatusCode>
<ActPctComplete>15</ActPctComplete>
</ProjectPlan>
<ProjectPlan>
<ProjPlanId>3</ProjPlanId>
<Name>Application Testing Schedule</Name>
<OwnerUserId>24661</OwnerUserId>
<OwnerName>Doe, John</OwnerName>
<AssigneeUserId>24667</AssigneeUserId>
<AssignedToName>Doe, Jane</AssignedToName>
<StatusCode>Active</StatusCode>
<ActPctComplete>25</ActPctComplete>
</ProjectPlan>
</ProjectTasks_GetListOfProjectPlansResult>
</ProjectTasks_GetListOfProjectPlansResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1071 {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>
<ProjectTasks_GetListOfProjectPlansResponse xmlns="http://www.pragmaticsw.com/">
<ProjectTasks_GetListOfProjectPlansResult>
<ProjectPlan>
<ProjPlanId>2</ProjPlanId>
<Name>Application BETA Schedule</Name>
<OwnerUserId>24661</OwnerUserId>
<OwnerName>Doe, John</OwnerName>
<AssigneeUserId>24661</AssigneeUserId>
<AssignedToName>Doe, John</AssignedToName>
<StatusCode>Active</StatusCode>
<ActPctComplete>15</ActPctComplete>
</ProjectPlan>
<ProjectPlan>
<ProjPlanId>3</ProjPlanId>
<Name>Application Testing Schedule</Name>
<OwnerUserId>24661</OwnerUserId>
<OwnerName>Doe, John</OwnerName>
<AssigneeUserId>24667</AssigneeUserId>
<AssignedToName>Doe, Jane</AssignedToName>
<StatusCode>Active</StatusCode>
<ActPctComplete>25</ActPctComplete>
</ProjectPlan>
</ProjectTasks_GetListOfProjectPlansResult>
</ProjectTasks_GetListOfProjectPlansResponse>
</soap12:Body>
</soap12:Envelope>
See Also
ProjectPlans_ExportMSProject
ProjectPlans_GetListOfResources
ProjectPlans_ImportMSProject
Project Plan Operations
Project Operations
SOAP API Reference