DigiOffice Gateway Web Services

<back to all web services

GetNavigationContext

Requires Authentication
The following routes are available for this service:
GET/api/navigation/context
<?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 CommonEntityIdentifier implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ID=null,
        /** @var string|null */
        public ?string $DisplayName=null,
        /** @var string|null */
        public ?string $EntityName=null
    ) {
    }

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

class NavigationContext implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Title=null,
        /** @var array<CommonEntityIdentifier>|null */
        public ?array $NavigationElements=null
    ) {
    }

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

class GetNavigationContext implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $ViewID='',
        /** @var string|null */
        public ?string $Path=null
    ) {
    }

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

PHP GetNavigationContext 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.

GET /api/navigation/context HTTP/1.1 
Host: dogw.klokgroep.nl 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Title: String,
	NavigationElements: 
	[
		{
			ID: String,
			DisplayName: String,
			EntityName: String
		}
	]
}