GET | /RestApi/apiservice/services |
---|
import Foundation
import ServiceStack
public class GetServices : Codable
{
public var types:Bool?
required public init(){}
}
public class ServicesResponse : Codable
{
public var services:[ServicesProxy] = []
public var errorMessage:String
required public init(){}
}
public class ServicesProxy : Codable
{
public var name:String
public var route:String
public var urlName:String
public var enabled:Bool
public var access:String
public var apiKey:String
public var accessControlAllowOrigin:String
public var autogenerateTypes:Bool
public var types:[ContentsProxy] = []
public var `protocol`:String
public var errorMessage:String
required public init(){}
}
public class ContentsProxy : Codable
{
public var name:String
public var readOnly:Bool
public var urlKey:String
public var clrType:String
public var access:String
public var properties:[PropertiesProxy] = []
public var children:[ContentsProxy] = []
public var autogenerateProperties:Bool
public var parentId:String
required public init(){}
}
public class PropertiesProxy : Codable
{
public var name:String
public var propertyType:String
public var isPersistent:Bool
public var allowSort:Bool
public var allowFilter:Bool
public var isKey:Bool
required public init(){}
}
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.
GET /RestApi/apiservice/services HTTP/1.1 Host: www.asg.com.au Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json 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"}