All Verbs | /RestApi/sitefinity/sitemap/settings | ||
---|---|---|---|
All Verbs | /RestApi/sitefinity/sitemap/settings/{Id} |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Telerik.Sitefinity.SitemapGenerator.Data;
namespace Telerik.Sitefinity.SitemapGenerator.Data
{
public enum SitemapGenerationCondition
{
Daily,
Weekly,
Manual,
}
public partial class SitemapSettings
{
public virtual bool IsEnabled { get; set; }
public virtual int UrlLimit { get; set; }
public virtual bool Compress { get; set; }
public virtual SitemapGenerationCondition Condition { get; set; }
public virtual int DayToStart { get; set; }
public virtual DateTime TimeToStart { get; set; }
public virtual Guid SiteId { get; set; }
public virtual string LastExecutionTime { get; set; }
public virtual string LastError { get; set; }
public virtual bool PingGoogle { get; set; }
}
public partial class SitemapSettingsContext
{
public virtual SitemapSettings Item { get; set; }
}
public partial class SitemapSettingsMessage
{
public virtual Guid Id { get; set; }
public virtual SitemapSettings Item { get; set; }
}
}
C# SitemapSettingsMessage DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /RestApi/sitefinity/sitemap/settings HTTP/1.1
Host: www.asg.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Item:
{
IsEnabled: False,
UrlLimit: 0,
Compress: False,
Condition: Daily,
DayToStart: 0,
TimeToStart: 0001-01-01,
LastExecutionTime: String,
LastError: String,
PingGoogle: False
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Item: { IsEnabled: False, UrlLimit: 0, Compress: False, Condition: Daily, DayToStart: 0, TimeToStart: 0001-01-01, LastExecutionTime: String, LastError: String, PingGoogle: False } }