| GET | /{Workspace}/CustomerPortal/News | ||
|---|---|---|---|
| GET, PUT, POST, DELETE | /{Workspace}/PortalNews | ||
| GET, PUT, POST, DELETE | /{Workspace}/PortalNews/{ObjectId} |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class PortalNews
{
public String ObjectId = null;
public String Workspace = null;
public String Content = null;
public String Title = null;
public String CreatedBy = null;
public String PostDate = null;
public ArrayList<String> Teams = null;
public Boolean Enabled = null;
public String ImageUrl = null;
public String getObjectId() { return ObjectId; }
public PortalNews setObjectId(String value) { this.ObjectId = value; return this; }
public String getWorkspace() { return Workspace; }
public PortalNews setWorkspace(String value) { this.Workspace = value; return this; }
public String getContent() { return Content; }
public PortalNews setContent(String value) { this.Content = value; return this; }
public String getTitle() { return Title; }
public PortalNews setTitle(String value) { this.Title = value; return this; }
public String getCreatedBy() { return CreatedBy; }
public PortalNews setCreatedBy(String value) { this.CreatedBy = value; return this; }
public String getPostDate() { return PostDate; }
public PortalNews setPostDate(String value) { this.PostDate = value; return this; }
public ArrayList<String> getTeams() { return Teams; }
public PortalNews setTeams(ArrayList<String> value) { this.Teams = value; return this; }
public Boolean isEnabled() { return Enabled; }
public PortalNews setEnabled(Boolean value) { this.Enabled = value; return this; }
public String getImageUrl() { return ImageUrl; }
public PortalNews setImageUrl(String value) { this.ImageUrl = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/PortalNews HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ObjectId":"String","Workspace":"String","Content":"String","Title":"String","CreatedBy":"String","PostDate":"String","Teams":["String"],"Enabled":false,"ImageUrl":"String"}