| GET,OPTIONS | /v1/pm/projects |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class PmProjectsRequest
{
public String Search = null;
public String getSearch() { return Search; }
public PmProjectsRequest setSearch(String value) { this.Search = value; return this; }
}
public static class PmProjectsResponse
{
public ArrayList<PmProjectRow> Projects = new ArrayList<PmProjectRow>();
public PmPortfolioTotals Totals = null;
public ResponseStatus ResponseStatus = null;
public ArrayList<PmProjectRow> getProjects() { return Projects; }
public PmProjectsResponse setProjects(ArrayList<PmProjectRow> value) { this.Projects = value; return this; }
public PmPortfolioTotals getTotals() { return Totals; }
public PmProjectsResponse setTotals(PmPortfolioTotals value) { this.Totals = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public PmProjectsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class PmProjectRow
{
public Integer ProjectID = null;
public String ProjectUID = null;
public String Name = null;
public String Client = null;
public String ProjectType = null;
public String Status = null;
public String Branch = null;
public String StartDate = null;
public String EndDate = null;
public Double Budget = null;
public Double Spent = null;
public Double EstimatedCost = null;
public Integer HealthPct = null;
public Integer JobCount = null;
public Integer OpenJobs = null;
public Integer GapCount = null;
public Boolean OverBudget = null;
public Integer ProgressPct = null;
public Integer getProjectID() { return ProjectID; }
public PmProjectRow setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getProjectUID() { return ProjectUID; }
public PmProjectRow setProjectUID(String value) { this.ProjectUID = value; return this; }
public String getName() { return Name; }
public PmProjectRow setName(String value) { this.Name = value; return this; }
public String getClient() { return Client; }
public PmProjectRow setClient(String value) { this.Client = value; return this; }
public String getProjectType() { return ProjectType; }
public PmProjectRow setProjectType(String value) { this.ProjectType = value; return this; }
public String getStatus() { return Status; }
public PmProjectRow setStatus(String value) { this.Status = value; return this; }
public String getBranch() { return Branch; }
public PmProjectRow setBranch(String value) { this.Branch = value; return this; }
public String getStartDate() { return StartDate; }
public PmProjectRow setStartDate(String value) { this.StartDate = value; return this; }
public String getEndDate() { return EndDate; }
public PmProjectRow setEndDate(String value) { this.EndDate = value; return this; }
public Double getBudget() { return Budget; }
public PmProjectRow setBudget(Double value) { this.Budget = value; return this; }
public Double getSpent() { return Spent; }
public PmProjectRow setSpent(Double value) { this.Spent = value; return this; }
public Double getEstimatedCost() { return EstimatedCost; }
public PmProjectRow setEstimatedCost(Double value) { this.EstimatedCost = value; return this; }
public Integer getHealthPct() { return HealthPct; }
public PmProjectRow setHealthPct(Integer value) { this.HealthPct = value; return this; }
public Integer getJobCount() { return JobCount; }
public PmProjectRow setJobCount(Integer value) { this.JobCount = value; return this; }
public Integer getOpenJobs() { return OpenJobs; }
public PmProjectRow setOpenJobs(Integer value) { this.OpenJobs = value; return this; }
public Integer getGapCount() { return GapCount; }
public PmProjectRow setGapCount(Integer value) { this.GapCount = value; return this; }
public Boolean isOverBudget() { return OverBudget; }
public PmProjectRow setOverBudget(Boolean value) { this.OverBudget = value; return this; }
public Integer getProgressPct() { return ProgressPct; }
public PmProjectRow setProgressPct(Integer value) { this.ProgressPct = value; return this; }
}
public static class PmPortfolioTotals
{
public Integer Projects = null;
public Double Budget = null;
public Double Spent = null;
public Integer OverBudget = null;
public Integer WithGaps = null;
public Integer getProjects() { return Projects; }
public PmPortfolioTotals setProjects(Integer value) { this.Projects = value; return this; }
public Double getBudget() { return Budget; }
public PmPortfolioTotals setBudget(Double value) { this.Budget = value; return this; }
public Double getSpent() { return Spent; }
public PmPortfolioTotals setSpent(Double value) { this.Spent = value; return this; }
public Integer getOverBudget() { return OverBudget; }
public PmPortfolioTotals setOverBudget(Integer value) { this.OverBudget = value; return this; }
public Integer getWithGaps() { return WithGaps; }
public PmPortfolioTotals setWithGaps(Integer value) { this.WithGaps = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/pm/projects HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PmProjectsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Projects>
<PmProjectRow>
<Branch>String</Branch>
<Budget>0</Budget>
<Client>String</Client>
<EndDate>String</EndDate>
<EstimatedCost>0</EstimatedCost>
<GapCount>0</GapCount>
<HealthPct>0</HealthPct>
<JobCount>0</JobCount>
<Name>String</Name>
<OpenJobs>0</OpenJobs>
<OverBudget>false</OverBudget>
<ProgressPct>0</ProgressPct>
<ProjectID>0</ProjectID>
<ProjectType>String</ProjectType>
<ProjectUID>String</ProjectUID>
<Spent>0</Spent>
<StartDate>String</StartDate>
<Status>String</Status>
</PmProjectRow>
</Projects>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Totals>
<Budget>0</Budget>
<OverBudget>0</OverBudget>
<Projects>0</Projects>
<Spent>0</Spent>
<WithGaps>0</WithGaps>
</Totals>
</PmProjectsResponse>