| GET,OPTIONS | /v1/me/navigation |
|---|
<?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 GetMyNavigationRequest implements IGet, JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
class AppNavItem implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Id=null,
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Href=null,
/** @var string[]|null */
public ?array $RequiresAll=null,
/** @var string[]|null */
public ?array $RequiresAny=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Href'])) $this->Href = $o['Href'];
if (isset($o['RequiresAll'])) $this->RequiresAll = JsonConverters::fromArray('string', $o['RequiresAll']);
if (isset($o['RequiresAny'])) $this->RequiresAny = JsonConverters::fromArray('string', $o['RequiresAny']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Href)) $o['Href'] = $this->Href;
if (isset($this->RequiresAll)) $o['RequiresAll'] = JsonConverters::toArray('string', $this->RequiresAll);
if (isset($this->RequiresAny)) $o['RequiresAny'] = JsonConverters::toArray('string', $this->RequiresAny);
return empty($o) ? new class(){} : $o;
}
}
class GetMyNavigationResponse implements JsonSerializable
{
public function __construct(
/** @var AppNavItem[]|null */
public ?array $Items=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Items'])) $this->Items = JsonConverters::fromArray('AppNavItem', $o['Items']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Items)) $o['Items'] = JsonConverters::toArray('AppNavItem', $this->Items);
return empty($o) ? new class(){} : $o;
}
}
PHP GetMyNavigationRequest DTOs
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 /v1/me/navigation HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetMyNavigationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal.Rbac">
<d2p1:AppNavItem>
<d2p1:Href>String</d2p1:Href>
<d2p1:Id>String</d2p1:Id>
<d2p1:RequiresAll xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:RequiresAll>
<d2p1:RequiresAny xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:RequiresAny>
<d2p1:Title>String</d2p1:Title>
</d2p1:AppNavItem>
</Items>
</GetMyNavigationResponse>