PUT | /RestApi/apiservice/updateService/{OldUrlName} |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Telerik.Sitefinity.Web.Api.Web.Services.Dto.Requests;
using Telerik.Sitefinity.Web.Api.Web.Services.Dto.Responses;
namespace Telerik.Sitefinity.Web.Api.Web.Services.Dto.Requests
{
public partial class ServiceBaseRequest
{
public virtual string Route { get; set; }
public virtual string Name { get; set; }
public virtual string UrlName { get; set; }
public virtual bool Enabled { get; set; }
public virtual string ApiKey { get; set; }
public virtual string AccessControlAllowOrigin { get; set; }
public virtual bool AutogenerateTypes { get; set; }
public virtual string Access { get; set; }
public virtual IEnumerable<ContentsProxy> Types { get; set; }
public virtual string Protocol { get; set; }
}
public partial class UpdateService
: ServiceBaseRequest
{
public virtual string OldUrlName { get; set; }
}
}
namespace Telerik.Sitefinity.Web.Api.Web.Services.Dto.Responses
{
public partial class ContentsProxy
{
public virtual string Name { get; set; }
public virtual bool ReadOnly { get; set; }
public virtual string UrlKey { get; set; }
public virtual string ClrType { get; set; }
public virtual string Access { get; set; }
public virtual IEnumerable<PropertiesProxy> Properties { get; set; }
public virtual IEnumerable<ContentsProxy> Children { get; set; }
public virtual bool AutogenerateProperties { get; set; }
public virtual string parentId { get; set; }
}
public partial class PropertiesProxy
{
public virtual string Name { get; set; }
public virtual string PropertyType { get; set; }
public virtual bool IsPersistent { get; set; }
public virtual bool AllowSort { get; set; }
public virtual bool AllowFilter { get; set; }
public virtual bool IsKey { get; set; }
}
}
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.
PUT /RestApi/apiservice/updateService/{OldUrlName} HTTP/1.1
Host: www.asg.com.au
Accept: application/json
Content-Type: application/json
Content-Length: length
{"OldUrlName":"String","Route":"String","Name":"String","UrlName":"String","Enabled":false,"ApiKey":"String","AccessControlAllowOrigin":"String","AutogenerateTypes":false,"Access":"String","Protocol":"String"}