| 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 .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Projects:
[
{
ProjectID: 0,
ProjectUID: String,
Name: String,
Client: String,
ProjectType: String,
Status: String,
Branch: String,
StartDate: String,
EndDate: String,
Budget: 0,
Spent: 0,
EstimatedCost: 0,
HealthPct: 0,
JobCount: 0,
OpenJobs: 0,
GapCount: 0,
OverBudget: False,
ProgressPct: 0
}
],
Totals:
{
Projects: 0,
Budget: 0,
Spent: 0,
OverBudget: 0,
WithGaps: 0
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}