<back to all web services

SitemapSettingsMessage

The following routes are available for this service:
All Verbs/RestApi/sitefinity/sitemap/settings
All Verbs/RestApi/sitefinity/sitemap/settings/{Id}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


class SitemapGenerationCondition(str, Enum):
    DAILY = 'Daily'
    WEEKLY = 'Weekly'
    MANUAL = 'Manual'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SitemapSettings:
    is_enabled: bool = False
    url_limit: int = 0
    compress: bool = False
    condition: Optional[SitemapGenerationCondition] = None
    day_to_start: int = 0
    time_to_start: datetime.datetime = datetime.datetime(1, 1, 1)
    site_id: Optional[str] = None
    last_execution_time: Optional[str] = None
    last_error: Optional[str] = None
    ping_google: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SitemapSettingsMessage:
    id: Optional[str] = None
    item: Optional[SitemapSettings] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SitemapSettingsContext:
    item: Optional[SitemapSettings] = None

Python SitemapSettingsMessage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Item":{"IsEnabled":false,"UrlLimit":0,"Compress":false,"Condition":"Daily","DayToStart":0,"TimeToStart":"\/Date(-62135596800000-0000)\/","LastExecutionTime":"String","LastError":"String","PingGoogle":false}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Item":{"IsEnabled":false,"UrlLimit":0,"Compress":false,"Condition":"Daily","DayToStart":0,"TimeToStart":"\/Date(-62135596800000-0000)\/","LastExecutionTime":"String","LastError":"String","PingGoogle":false}}