<back to all web services

SitemapStatusMessage

The following routes are available for this service:
All Verbs/RestApi/sitefinity/sitemap/GetCurrentSitemapStatus
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class SitemapStatusMessage implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $CurrentSiteId=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CurrentSiteId'])) $this->CurrentSiteId = $o['CurrentSiteId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CurrentSiteId)) $o['CurrentSiteId'] = $this->CurrentSiteId;
        return empty($o) ? new class(){} : $o;
    }
}

class SitemapStatus implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $CurrentProgress=0,
        /** @var string|null */
        public ?string $StatusMessage=null,
        /** @var string|null */
        public ?string $LastGenerated=null,
        /** @var array<string>|null */
        public ?array $Links=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CurrentProgress'])) $this->CurrentProgress = $o['CurrentProgress'];
        if (isset($o['StatusMessage'])) $this->StatusMessage = $o['StatusMessage'];
        if (isset($o['LastGenerated'])) $this->LastGenerated = $o['LastGenerated'];
        if (isset($o['Links'])) $this->Links = JsonConverters::fromArray('string', $o['Links']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CurrentProgress)) $o['CurrentProgress'] = $this->CurrentProgress;
        if (isset($this->StatusMessage)) $o['StatusMessage'] = $this->StatusMessage;
        if (isset($this->LastGenerated)) $o['LastGenerated'] = $this->LastGenerated;
        if (isset($this->Links)) $o['Links'] = JsonConverters::toArray('string', $this->Links);
        return empty($o) ? new class(){} : $o;
    }
}

class SitemapStatusContext implements JsonSerializable
{
    public function __construct(
        /** @var SitemapStatus|null */
        public ?SitemapStatus $Item=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Item'])) $this->Item = JsonConverters::from('SitemapStatus', $o['Item']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Item)) $o['Item'] = JsonConverters::to('SitemapStatus', $this->Item);
        return empty($o) ? new class(){} : $o;
    }
}

PHP SitemapStatusMessage DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /RestApi/sitefinity/sitemap/GetCurrentSitemapStatus HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Item: 
	{
		CurrentProgress: 0,
		StatusMessage: String,
		LastGenerated: String
	}
}