| POST | /system_entities |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class SystemEntitiesAdd
{
@DataMember(Order=2)
@Validate(Validator="NotNull")
public String entity = null;
@DataMember(Order=3)
@Validate(Validator="NotNull")
public String longDescription = null;
public String getEntity() { return entity; }
public SystemEntitiesAdd setEntity(String value) { this.entity = value; return this; }
public String getLongDescription() { return longDescription; }
public SystemEntitiesAdd setLongDescription(String value) { this.longDescription = value; return this; }
}
public static class SystemEntitiesAddResponse
{
@DataMember(Order=2)
public String entity = null;
@DataMember(Order=3)
public String longDescription = null;
@DataMember(Order=5)
public ResponseStatus responseStatus = null;
public String getEntity() { return entity; }
public SystemEntitiesAddResponse setEntity(String value) { this.entity = value; return this; }
public String getLongDescription() { return longDescription; }
public SystemEntitiesAddResponse setLongDescription(String value) { this.longDescription = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public SystemEntitiesAddResponse setResponseStatus(ResponseStatus value) { this.responseStatus = 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 /system_entities HTTP/1.1
Host: sfgboxapi.dev.scadsoftware.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
entity: String,
longDescription: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
entity: String,
longDescription: String,
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}