| GET,OPTIONS | /v1/pm/job/{JobID} |
|---|
import Foundation
import ServiceStack
public class PmJobRequest : Codable
{
public var jobID:Int
required public init(){}
}
public class PmJobResponse : Codable
{
public var job:PmJob
public var responseStatus:ResponseStatus
required public init(){}
}
public class PmJob : Codable
{
public var jobID:Int
public var name:String
public var Description:String
public var status:String
public var startDate:String
public var endDate:String
public var crewCount:Int
public var budgetedHours:Double
public var equipmentCount:Int
public var materialCount:Int
public var crewCost:Double
public var equipCost:Double
public var matCost:Double
public var cost:Double
public var noCrew:Bool
public var equipConflict:Bool
public var materialGap:Bool
public var readyPct:Int
public var priority:String
public var tags:[String] = []
public var crew:[PmJobCrew] = []
public var equipment:[PmJobResource] = []
public var materials:[PmJobResource] = []
required public init(){}
}
public class PmJobCrew : Codable
{
public var contactID:Int
public var name:String
public var rate:Double
public var budgetedHours:Double
public var isOpen:Bool
required public init(){}
}
public class PmJobResource : Codable
{
public var id:Int
public var name:String
public var amount:Double
public var qty:Int
public var unit:String
required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/pm/job/{JobID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Job":{"JobID":0,"Name":"String","Description":"String","Status":"String","StartDate":"String","EndDate":"String","CrewCount":0,"BudgetedHours":0,"EquipmentCount":0,"MaterialCount":0,"CrewCost":0,"EquipCost":0,"MatCost":0,"Cost":0,"NoCrew":false,"EquipConflict":false,"MaterialGap":false,"ReadyPct":0,"Priority":"String","Tags":["String"],"Crew":[{"ContactID":0,"Name":"String","Rate":0,"BudgetedHours":0,"IsOpen":false}],"Equipment":[{"Id":0,"Name":"String","Amount":0,"Qty":0,"Unit":"String"}],"Materials":[{"Id":0,"Name":"String","Amount":0,"Qty":0,"Unit":"String"}]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}