| GET,PUT,POST,DELETE,OPTIONS | /v1/SiteContent/{Category} | ||
|---|---|---|---|
| GET,PUT,POST,DELETE,OPTIONS | /v1/SiteContent | ||
| GET,PUT,DELETE,POST,OPTIONS | /v1/SiteContent/{Category}/{SortOrder} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class SiteContentRequest
{
public String Category = null;
public String SortOrder = null;
public SiteContent SiteContent = null;
public String getCategory() { return Category; }
public SiteContentRequest setCategory(String value) { this.Category = value; return this; }
public String getSortOrder() { return SortOrder; }
public SiteContentRequest setSortOrder(String value) { this.SortOrder = value; return this; }
public SiteContent getSiteContent() { return SiteContent; }
public SiteContentRequest setSiteContent(SiteContent value) { this.SiteContent = value; return this; }
}
public static class SiteContent
{
public Integer Id = null;
public String ContentHeader = null;
public String ContentBody = null;
public Date BeginDate = null;
public Date EndDate = null;
public Integer SortOrder = null;
public String Category = null;
public Integer getId() { return Id; }
public SiteContent setId(Integer value) { this.Id = value; return this; }
public String getContentHeader() { return ContentHeader; }
public SiteContent setContentHeader(String value) { this.ContentHeader = value; return this; }
public String getContentBody() { return ContentBody; }
public SiteContent setContentBody(String value) { this.ContentBody = value; return this; }
public Date getBeginDate() { return BeginDate; }
public SiteContent setBeginDate(Date value) { this.BeginDate = value; return this; }
public Date getEndDate() { return EndDate; }
public SiteContent setEndDate(Date value) { this.EndDate = value; return this; }
public Integer getSortOrder() { return SortOrder; }
public SiteContent setSortOrder(Integer value) { this.SortOrder = value; return this; }
public String getCategory() { return Category; }
public SiteContent setCategory(String value) { this.Category = value; return this; }
}
}
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.
POST /v1/SiteContent/{Category} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Category: String,
SortOrder: String,
SiteContent:
{
Id: 0,
ContentHeader: String,
ContentBody: String,
BeginDate: 0001-01-01,
EndDate: 0001-01-01,
SortOrder: 0,
Category: String
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Id: 0,
ContentHeader: String,
ContentBody: String,
BeginDate: 0001-01-01,
EndDate: 0001-01-01,
SortOrder: 0,
Category: String
}