| GET,OPTIONS | /v1/pm/catalog |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class PmCatalogRequest
{
}
public static class PmCatalogResponse
{
public ArrayList<PmCatalogItem> Statuses = new ArrayList<PmCatalogItem>();
public ArrayList<PmCatalogItem> Crew = new ArrayList<PmCatalogItem>();
public ArrayList<PmCatalogCrew> Crews = new ArrayList<PmCatalogCrew>();
public ArrayList<PmCatalogItem> Equipment = new ArrayList<PmCatalogItem>();
public ArrayList<PmCatalogItem> Materials = new ArrayList<PmCatalogItem>();
public ResponseStatus ResponseStatus = null;
public ArrayList<PmCatalogItem> getStatuses() { return Statuses; }
public PmCatalogResponse setStatuses(ArrayList<PmCatalogItem> value) { this.Statuses = value; return this; }
public ArrayList<PmCatalogItem> getCrew() { return Crew; }
public PmCatalogResponse setCrew(ArrayList<PmCatalogItem> value) { this.Crew = value; return this; }
public ArrayList<PmCatalogCrew> getCrews() { return Crews; }
public PmCatalogResponse setCrews(ArrayList<PmCatalogCrew> value) { this.Crews = value; return this; }
public ArrayList<PmCatalogItem> getEquipment() { return Equipment; }
public PmCatalogResponse setEquipment(ArrayList<PmCatalogItem> value) { this.Equipment = value; return this; }
public ArrayList<PmCatalogItem> getMaterials() { return Materials; }
public PmCatalogResponse setMaterials(ArrayList<PmCatalogItem> value) { this.Materials = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public PmCatalogResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class PmCatalogItem
{
public Integer Id = null;
public String Name = null;
public Double Amount = null;
public Integer getId() { return Id; }
public PmCatalogItem setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public PmCatalogItem setName(String value) { this.Name = value; return this; }
public Double getAmount() { return Amount; }
public PmCatalogItem setAmount(Double value) { this.Amount = value; return this; }
}
public static class PmCatalogCrew
{
public Integer Id = null;
public String Name = null;
public ArrayList<Integer> MemberIds = new ArrayList<Integer>();
public Integer getId() { return Id; }
public PmCatalogCrew setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public PmCatalogCrew setName(String value) { this.Name = value; return this; }
public ArrayList<Integer> getMemberIds() { return MemberIds; }
public PmCatalogCrew setMemberIds(ArrayList<Integer> value) { this.MemberIds = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PmCatalogResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Crew>
<PmCatalogItem>
<Amount>0</Amount>
<Id>0</Id>
<Name>String</Name>
</PmCatalogItem>
</Crew>
<Crews>
<PmCatalogCrew>
<Id>0</Id>
<MemberIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</MemberIds>
<Name>String</Name>
</PmCatalogCrew>
</Crews>
<Equipment>
<PmCatalogItem>
<Amount>0</Amount>
<Id>0</Id>
<Name>String</Name>
</PmCatalogItem>
</Equipment>
<Materials>
<PmCatalogItem>
<Amount>0</Amount>
<Id>0</Id>
<Name>String</Name>
</PmCatalogItem>
</Materials>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Statuses>
<PmCatalogItem>
<Amount>0</Amount>
<Id>0</Id>
<Name>String</Name>
</PmCatalogItem>
</Statuses>
</PmCatalogResponse>