| GET,OPTIONS | /v1/pm/catalog |
|---|
import Foundation
import ServiceStack
public class PmCatalogRequest : Codable
{
required public init(){}
}
public class PmCatalogResponse : Codable
{
public var statuses:[PmCatalogItem] = []
public var crew:[PmCatalogItem] = []
public var crews:[PmCatalogCrew] = []
public var equipment:[PmCatalogItem] = []
public var materials:[PmCatalogItem] = []
public var responseStatus:ResponseStatus
required public init(){}
}
public class PmCatalogItem : Codable
{
public var id:Int
public var name:String
public var amount:Double
required public init(){}
}
public class PmCatalogCrew : Codable
{
public var id:Int
public var name:String
public var memberIds:[Int] = []
required public init(){}
}
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/catalog HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Statuses:
[
{
Id: 0,
Name: String,
Amount: 0
}
],
Crew:
[
{
Id: 0,
Name: String,
Amount: 0
}
],
Crews:
[
{
Id: 0,
Name: String,
MemberIds:
[
0
]
}
],
Equipment:
[
{
Id: 0,
Name: String,
Amount: 0
}
],
Materials:
[
{
Id: 0,
Name: String,
Amount: 0
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}