<back to all web services

CreateService

The following routes are available for this service:
POST/RestApi/apiservice/createService
"use strict";
export class PropertiesProxy {
    /** @param {{Name?:string,PropertyType?:string,IsPersistent?:boolean,AllowSort?:boolean,AllowFilter?:boolean,IsKey?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Name;
    /** @type {string} */
    PropertyType;
    /** @type {boolean} */
    IsPersistent;
    /** @type {boolean} */
    AllowSort;
    /** @type {boolean} */
    AllowFilter;
    /** @type {boolean} */
    IsKey;
}
export class ContentsProxy {
    /** @param {{Name?:string,ReadOnly?:boolean,UrlKey?:string,ClrType?:string,Access?:string,Properties?:PropertiesProxy[],Children?:ContentsProxy[],AutogenerateProperties?:boolean,parentId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Name;
    /** @type {boolean} */
    ReadOnly;
    /** @type {string} */
    UrlKey;
    /** @type {string} */
    ClrType;
    /** @type {string} */
    Access;
    /** @type {PropertiesProxy[]} */
    Properties;
    /** @type {ContentsProxy[]} */
    Children;
    /** @type {boolean} */
    AutogenerateProperties;
    /** @type {string} */
    parentId;
}
export class ServiceBaseRequest {
    /** @param {{Route?:string,Name?:string,UrlName?:string,Enabled?:boolean,ApiKey?:string,AccessControlAllowOrigin?:string,AutogenerateTypes?:boolean,Access?:string,Types?:ContentsProxy[],Protocol?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Route;
    /** @type {string} */
    Name;
    /** @type {string} */
    UrlName;
    /** @type {boolean} */
    Enabled;
    /** @type {string} */
    ApiKey;
    /** @type {string} */
    AccessControlAllowOrigin;
    /** @type {boolean} */
    AutogenerateTypes;
    /** @type {string} */
    Access;
    /** @type {ContentsProxy[]} */
    Types;
    /** @type {string} */
    Protocol;
}
export class CreateService extends ServiceBaseRequest {
    /** @param {{Route?:string,Name?:string,UrlName?:string,Enabled?:boolean,ApiKey?:string,AccessControlAllowOrigin?:string,AutogenerateTypes?:boolean,Access?:string,Types?:ContentsProxy[],Protocol?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}

JavaScript 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>