GET | /RestApi/apiservice/services/{Route}/{UrlName} |
---|
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 GetService
{
public virtual string UrlName { get; set; }
public virtual string Route { 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; }
}
public partial class ServicesProxy
{
public virtual string Name { get; set; }
public virtual string Route { get; set; }
public virtual string UrlName { get; set; }
public virtual bool Enabled { get; set; }
public virtual string Access { get; set; }
public virtual string ApiKey { get; set; }
public virtual string AccessControlAllowOrigin { get; set; }
public virtual bool AutogenerateTypes { get; set; }
public virtual IEnumerable<ContentsProxy> Types { get; set; }
public virtual string Protocol { get; set; }
public virtual string ErrorMessage { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>