<back to all web services

GetService

The following routes are available for this service:
GET/RestApi/apiservice/services/{Route}/{UrlName}
import Foundation
import ServiceStack

public class GetService : Codable
{
    public var urlName:String
    public var route: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(){}
}


Swift GetService DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /RestApi/apiservice/services/{Route}/{UrlName} HTTP/1.1 
Host: www.asg.com.au 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ServicesProxy xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Web.Api.Web.Services.Dto.Responses">
  <Access>String</Access>
  <AccessControlAllowOrigin>String</AccessControlAllowOrigin>
  <ApiKey>String</ApiKey>
  <AutogenerateTypes>false</AutogenerateTypes>
  <Enabled>false</Enabled>
  <ErrorMessage>String</ErrorMessage>
  <Name>String</Name>
  <Protocol>String</Protocol>
  <Route>String</Route>
  <Types i:nil="true" />
  <UrlName>String</UrlName>
</ServicesProxy>