<back to all web services

CreateService

The following routes are available for this service:
POST/RestApi/apiservice/createService
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Telerik.Sitefinity.Web.Api.Web.Services.Dto.Requests
Imports Telerik.Sitefinity.Web.Api.Web.Services.Dto.Responses

Namespace Global

    Namespace Telerik.Sitefinity.Web.Api.Web.Services.Dto.Requests

        Public Partial Class CreateService
            Inherits ServiceBaseRequest
        End Class

        Public Partial Class ServiceBaseRequest
            Public Overridable Property Route As String
            Public Overridable Property Name As String
            Public Overridable Property UrlName As String
            Public Overridable Property Enabled As Boolean
            Public Overridable Property ApiKey As String
            Public Overridable Property AccessControlAllowOrigin As String
            Public Overridable Property AutogenerateTypes As Boolean
            Public Overridable Property Access As String
            Public Overridable Property Types As IEnumerable(Of ContentsProxy)
            Public Overridable Property Protocol As String
        End Class
    End Namespace

    Namespace Telerik.Sitefinity.Web.Api.Web.Services.Dto.Responses

        Public Partial Class ContentsProxy
            Public Overridable Property Name As String
            Public Overridable Property ReadOnly As Boolean
            Public Overridable Property UrlKey As String
            Public Overridable Property ClrType As String
            Public Overridable Property Access As String
            Public Overridable Property Properties As IEnumerable(Of PropertiesProxy)
            Public Overridable Property Children As IEnumerable(Of ContentsProxy)
            Public Overridable Property AutogenerateProperties As Boolean
            Public Overridable Property parentId As String
        End Class

        Public Partial Class PropertiesProxy
            Public Overridable Property Name As String
            Public Overridable Property PropertyType As String
            Public Overridable Property IsPersistent As Boolean
            Public Overridable Property AllowSort As Boolean
            Public Overridable Property AllowFilter As Boolean
            Public Overridable Property IsKey As Boolean
        End Class
    End Namespace
End Namespace

VB.NET CreateService 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.

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>