Trendsic Platform Service

<back to all web services

PmProjectsRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/pm/projects
import Foundation
import ServiceStack

public class PmProjectsRequest : Codable
{
    public var search:String

    required public init(){}
}

public class PmProjectsResponse : Codable
{
    public var projects:[PmProjectRow] = []
    public var totals:PmPortfolioTotals
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class PmProjectRow : Codable
{
    public var projectID:Int
    public var projectUID:String
    public var name:String
    public var client:String
    public var projectType:String
    public var status:String
    public var branch:String
    public var startDate:String
    public var endDate:String
    public var budget:Double
    public var spent:Double
    public var estimatedCost:Double
    public var healthPct:Int
    public var jobCount:Int
    public var openJobs:Int
    public var gapCount:Int
    public var overBudget:Bool
    public var progressPct:Int

    required public init(){}
}

public class PmPortfolioTotals : Codable
{
    public var projects:Int
    public var budget:Double
    public var spent:Double
    public var overBudget:Int
    public var withGaps:Int

    required public init(){}
}


Swift PmProjectsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + 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
		}
	}
}