| GET,OPTIONS | /v1/pm/catalog |
|---|
"use strict";
export class PmCatalogItem {
/** @param {{Id?:number,Name?:string,Amount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Name;
/** @type {number} */
Amount;
}
export class PmCatalogCrew {
/** @param {{Id?:number,Name?:string,MemberIds?:number[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Name;
/** @type {number[]} */
MemberIds = [];
}
export class PmCatalogResponse {
/** @param {{Statuses?:PmCatalogItem[],Crew?:PmCatalogItem[],Crews?:PmCatalogCrew[],Equipment?:PmCatalogItem[],Materials?:PmCatalogItem[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {PmCatalogItem[]} */
Statuses = [];
/** @type {PmCatalogItem[]} */
Crew = [];
/** @type {PmCatalogCrew[]} */
Crews = [];
/** @type {PmCatalogItem[]} */
Equipment = [];
/** @type {PmCatalogItem[]} */
Materials = [];
/** @type {ResponseStatus} */
ResponseStatus;
}
export class PmCatalogRequest {
constructor(init) { Object.assign(this, init) }
}
JavaScript PmCatalogRequest DTOs
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
}
}
}