GET | /RestApi/apiservice/services |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetServices
{
public Boolean Types = null;
public Boolean isTypes() { return Types; }
public GetServices setTypes(Boolean value) { this.Types = value; return this; }
}
public static class ServicesResponse
{
public ArrayList<ServicesProxy> Services = null;
public String ErrorMessage = null;
public ArrayList<ServicesProxy> getServices() { return Services; }
public ServicesResponse setServices(ArrayList<ServicesProxy> value) { this.Services = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public ServicesResponse setErrorMessage(String value) { this.ErrorMessage = value; return this; }
}
public static class ServicesProxy
{
public String Name = null;
public String Route = null;
public String UrlName = null;
public Boolean Enabled = null;
public String Access = null;
public String ApiKey = null;
public String AccessControlAllowOrigin = null;
public Boolean AutogenerateTypes = null;
public ArrayList<ContentsProxy> Types = null;
public String Protocol = null;
public String ErrorMessage = null;
public String getName() { return Name; }
public ServicesProxy setName(String value) { this.Name = value; return this; }
public String getRoute() { return Route; }
public ServicesProxy setRoute(String value) { this.Route = value; return this; }
public String getUrlName() { return UrlName; }
public ServicesProxy setUrlName(String value) { this.UrlName = value; return this; }
public Boolean isEnabled() { return Enabled; }
public ServicesProxy setEnabled(Boolean value) { this.Enabled = value; return this; }
public String getAccess() { return Access; }
public ServicesProxy setAccess(String value) { this.Access = value; return this; }
public String getApiKey() { return ApiKey; }
public ServicesProxy setApiKey(String value) { this.ApiKey = value; return this; }
public String getAccessControlAllowOrigin() { return AccessControlAllowOrigin; }
public ServicesProxy setAccessControlAllowOrigin(String value) { this.AccessControlAllowOrigin = value; return this; }
public Boolean isAutogenerateTypes() { return AutogenerateTypes; }
public ServicesProxy setAutogenerateTypes(Boolean value) { this.AutogenerateTypes = value; return this; }
public ArrayList<ContentsProxy> getTypes() { return Types; }
public ServicesProxy setTypes(ArrayList<ContentsProxy> value) { this.Types = value; return this; }
public String getProtocol() { return Protocol; }
public ServicesProxy setProtocol(String value) { this.Protocol = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public ServicesProxy setErrorMessage(String value) { this.ErrorMessage = 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 .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /RestApi/apiservice/services HTTP/1.1 Host: www.asg.com.au Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Services: [ { "Name": "String", "Route": "String", "UrlName": "String", "Enabled": false, "Access": "String", "ApiKey": "String", "AccessControlAllowOrigin": "String", "AutogenerateTypes": false, "Types": null, "Protocol": "String", "ErrorMessage": "String" } ], ErrorMessage: String }