POST | /RestApi/apiservice/createService |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CreateService extends ServiceBaseRequest
{
}
public static class ServiceBaseRequest
{
public String Route = null;
public String Name = null;
public String UrlName = null;
public Boolean Enabled = null;
public String ApiKey = null;
public String AccessControlAllowOrigin = null;
public Boolean AutogenerateTypes = null;
public String Access = null;
public ArrayList<ContentsProxy> Types = null;
public String Protocol = null;
public String getRoute() { return Route; }
public ServiceBaseRequest setRoute(String value) { this.Route = value; return this; }
public String getName() { return Name; }
public ServiceBaseRequest setName(String value) { this.Name = value; return this; }
public String getUrlName() { return UrlName; }
public ServiceBaseRequest setUrlName(String value) { this.UrlName = value; return this; }
public Boolean isEnabled() { return Enabled; }
public ServiceBaseRequest setEnabled(Boolean value) { this.Enabled = value; return this; }
public String getApiKey() { return ApiKey; }
public ServiceBaseRequest setApiKey(String value) { this.ApiKey = value; return this; }
public String getAccessControlAllowOrigin() { return AccessControlAllowOrigin; }
public ServiceBaseRequest setAccessControlAllowOrigin(String value) { this.AccessControlAllowOrigin = value; return this; }
public Boolean isAutogenerateTypes() { return AutogenerateTypes; }
public ServiceBaseRequest setAutogenerateTypes(Boolean value) { this.AutogenerateTypes = value; return this; }
public String getAccess() { return Access; }
public ServiceBaseRequest setAccess(String value) { this.Access = value; return this; }
public ArrayList<ContentsProxy> getTypes() { return Types; }
public ServiceBaseRequest setTypes(ArrayList<ContentsProxy> value) { this.Types = value; return this; }
public String getProtocol() { return Protocol; }
public ServiceBaseRequest setProtocol(String value) { this.Protocol = value; return this; }
}
public static class ContentsProxy
{
public String Name = null;
public Boolean ReadOnly = null;
public String UrlKey = null;
public String ClrType = null;
public String Access = null;
public ArrayList<PropertiesProxy> Properties = null;
public ArrayList<ContentsProxy> Children = null;
public Boolean AutogenerateProperties = null;
public String parentId = null;
public String getName() { return Name; }
public ContentsProxy setName(String value) { this.Name = value; return this; }
public Boolean isReadOnly() { return ReadOnly; }
public ContentsProxy setReadOnly(Boolean value) { this.ReadOnly = value; return this; }
public String getUrlKey() { return UrlKey; }
public ContentsProxy setUrlKey(String value) { this.UrlKey = value; return this; }
public String getClrType() { return ClrType; }
public ContentsProxy setClrType(String value) { this.ClrType = value; return this; }
public String getAccess() { return Access; }
public ContentsProxy setAccess(String value) { this.Access = value; return this; }
public ArrayList<PropertiesProxy> getProperties() { return Properties; }
public ContentsProxy setProperties(ArrayList<PropertiesProxy> value) { this.Properties = value; return this; }
public ArrayList<ContentsProxy> getChildren() { return Children; }
public ContentsProxy setChildren(ArrayList<ContentsProxy> value) { this.Children = value; return this; }
public Boolean isAutogenerateProperties() { return AutogenerateProperties; }
public ContentsProxy setAutogenerateProperties(Boolean value) { this.AutogenerateProperties = value; return this; }
public String getParentId() { return parentId; }
public ContentsProxy setParentId(String value) { this.parentId = value; return this; }
}
public static class PropertiesProxy
{
public String Name = null;
public String PropertyType = null;
public Boolean IsPersistent = null;
public Boolean AllowSort = null;
public Boolean AllowFilter = null;
public Boolean IsKey = null;
public String getName() { return Name; }
public PropertiesProxy setName(String value) { this.Name = value; return this; }
public String getPropertyType() { return PropertyType; }
public PropertiesProxy setPropertyType(String value) { this.PropertyType = value; return this; }
public Boolean getIsPersistent() { return IsPersistent; }
public PropertiesProxy setIsPersistent(Boolean value) { this.IsPersistent = value; return this; }
public Boolean isAllowSort() { return AllowSort; }
public PropertiesProxy setAllowSort(Boolean value) { this.AllowSort = value; return this; }
public Boolean isAllowFilter() { return AllowFilter; }
public PropertiesProxy setAllowFilter(Boolean value) { this.AllowFilter = value; return this; }
public Boolean getIsKey() { return IsKey; }
public PropertiesProxy setIsKey(Boolean value) { this.IsKey = 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.
POST /RestApi/apiservice/createService HTTP/1.1
Host: www.asg.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateService xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Web.Api.Web.Services.Dto.Requests">
<Access>String</Access>
<AccessControlAllowOrigin>String</AccessControlAllowOrigin>
<ApiKey>String</ApiKey>
<AutogenerateTypes>false</AutogenerateTypes>
<Enabled>false</Enabled>
<Name>String</Name>
<Protocol>String</Protocol>
<Route>String</Route>
<Types xmlns:d2p1="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Web.Api.Web.Services.Dto.Responses" i:nil="true" />
<UrlName>String</UrlName>
</CreateService>