| All Verbs | /api/quadrantupdate/token | ||
|---|---|---|---|
| All Verbs | /api/quadrantupdate |
<?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 SettingModel implements JsonSerializable
{
public function __construct(
/** @var string */
public string $SettingId='',
/** @var string|null */
public ?string $SettingName=null,
/** @var string|null */
public ?string $SettingValue=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SettingId'])) $this->SettingId = $o['SettingId'];
if (isset($o['SettingName'])) $this->SettingName = $o['SettingName'];
if (isset($o['SettingValue'])) $this->SettingValue = $o['SettingValue'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SettingId)) $o['SettingId'] = $this->SettingId;
if (isset($this->SettingName)) $o['SettingName'] = $this->SettingName;
if (isset($this->SettingValue)) $o['SettingValue'] = $this->SettingValue;
return empty($o) ? new class(){} : $o;
}
}
class UpdateQuadrantResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $PerspectiveSessionId='',
/** @var array<SettingModel>|null */
public ?array $Settings=null,
/** @var array<string>|null */
public ?array $Permissions=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PerspectiveSessionId'])) $this->PerspectiveSessionId = $o['PerspectiveSessionId'];
if (isset($o['Settings'])) $this->Settings = JsonConverters::fromArray('SettingModel', $o['Settings']);
if (isset($o['Permissions'])) $this->Permissions = JsonConverters::fromArray('Guid', $o['Permissions']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PerspectiveSessionId)) $o['PerspectiveSessionId'] = $this->PerspectiveSessionId;
if (isset($this->Settings)) $o['Settings'] = JsonConverters::toArray('SettingModel', $this->Settings);
if (isset($this->Permissions)) $o['Permissions'] = JsonConverters::toArray('Guid', $this->Permissions);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class SessionModel implements JsonSerializable
{
public function __construct(
/** @description Create user session for the specified user name */
// @ApiMember(Description="Create user session for the specified user name", IsRequired=true, Name="UserName")
/** @var string */
public string $UserName='',
/** @description Local or External account */
// @ApiMember(Description="Local or External account", IsRequired=true, Name="AuthProvider")
/** @var string */
public string $AuthProvider='',
/** @description Current user profile context */
// @ApiMember(Description="Current user profile context", IsRequired=true, Name="UserProfileId")
/** @var string */
public string $UserProfileId='',
/** @description Current appliance context */
// @ApiMember(Description="Current appliance context", IsRequired=true, Name="Appliance")
/** @var string */
public string $ApplianceId='',
/** @description Current role context */
// @ApiMember(Description="Current role context", IsRequired=true, Name="RoleId")
/** @var string */
public string $RoleId='',
/** @description Current licensee context */
// @ApiMember(Description="Current licensee context", IsRequired=true, Name="LicenseeConnectionId")
/** @var string */
public string $LicenseeConnectionId='',
/** @description Has 'Remember Me' option been selected? */
// @ApiMember(Description="Has 'Remember Me' option been selected?", Name="IsPersistent")
/** @var bool|null */
public ?bool $IsPersistent=null,
/** @description Licensee contact id of the current licensee context */
// @ApiMember(Description="Licensee contact id of the current licensee context", IsRequired=true, Name="LicenseeContactId")
/** @var string */
public string $LicenseeContactId='',
/** @description Connection Id linking the current user profile to the current licensee context */
// @ApiMember(Description="Connection Id linking the current user profile to the current licensee context", IsRequired=true, Name="UserContactRoleConnectionId")
/** @var string */
public string $UserContactRoleConnectionId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['UserName'])) $this->UserName = $o['UserName'];
if (isset($o['AuthProvider'])) $this->AuthProvider = $o['AuthProvider'];
if (isset($o['UserProfileId'])) $this->UserProfileId = $o['UserProfileId'];
if (isset($o['ApplianceId'])) $this->ApplianceId = $o['ApplianceId'];
if (isset($o['RoleId'])) $this->RoleId = $o['RoleId'];
if (isset($o['LicenseeConnectionId'])) $this->LicenseeConnectionId = $o['LicenseeConnectionId'];
if (isset($o['IsPersistent'])) $this->IsPersistent = $o['IsPersistent'];
if (isset($o['LicenseeContactId'])) $this->LicenseeContactId = $o['LicenseeContactId'];
if (isset($o['UserContactRoleConnectionId'])) $this->UserContactRoleConnectionId = $o['UserContactRoleConnectionId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->UserName)) $o['UserName'] = $this->UserName;
if (isset($this->AuthProvider)) $o['AuthProvider'] = $this->AuthProvider;
if (isset($this->UserProfileId)) $o['UserProfileId'] = $this->UserProfileId;
if (isset($this->ApplianceId)) $o['ApplianceId'] = $this->ApplianceId;
if (isset($this->RoleId)) $o['RoleId'] = $this->RoleId;
if (isset($this->LicenseeConnectionId)) $o['LicenseeConnectionId'] = $this->LicenseeConnectionId;
if (isset($this->IsPersistent)) $o['IsPersistent'] = $this->IsPersistent;
if (isset($this->LicenseeContactId)) $o['LicenseeContactId'] = $this->LicenseeContactId;
if (isset($this->UserContactRoleConnectionId)) $o['UserContactRoleConnectionId'] = $this->UserContactRoleConnectionId;
return empty($o) ? new class(){} : $o;
}
}
/** @description Update quadrant context - create a new session, retrieve settings and return new JWT Token */
// @Api(Description="Update quadrant context - create a new session, retrieve settings and return new JWT Token")
class UpdateQuadrant implements JsonSerializable
{
public function __construct(
/** @var SessionModel|null */
public ?SessionModel $Session=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Session'])) $this->Session = JsonConverters::from('SessionModel', $o['Session']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Session)) $o['Session'] = JsonConverters::to('SessionModel', $this->Session);
return empty($o) ? new class(){} : $o;
}
}
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.
POST /api/quadrantupdate/token HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UpdateQuadrant xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<Session xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.Models">
<d2p1:ApplianceId>00000000-0000-0000-0000-000000000000</d2p1:ApplianceId>
<d2p1:AuthProvider>String</d2p1:AuthProvider>
<d2p1:IsPersistent>false</d2p1:IsPersistent>
<d2p1:LicenseeConnectionId>00000000-0000-0000-0000-000000000000</d2p1:LicenseeConnectionId>
<d2p1:LicenseeContactId>00000000-0000-0000-0000-000000000000</d2p1:LicenseeContactId>
<d2p1:RoleId>00000000-0000-0000-0000-000000000000</d2p1:RoleId>
<d2p1:UserContactRoleConnectionId>00000000-0000-0000-0000-000000000000</d2p1:UserContactRoleConnectionId>
<d2p1:UserName>String</d2p1:UserName>
<d2p1:UserProfileId>00000000-0000-0000-0000-000000000000</d2p1:UserProfileId>
</Session>
</UpdateQuadrant>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<UpdateQuadrantResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<Permissions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</Permissions>
<PerspectiveSessionId>00000000-0000-0000-0000-000000000000</PerspectiveSessionId>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Settings xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.Models">
<d2p1:SettingModel>
<d2p1:SettingId>00000000-0000-0000-0000-000000000000</d2p1:SettingId>
<d2p1:SettingName>String</d2p1:SettingName>
<d2p1:SettingValue>String</d2p1:SettingValue>
</d2p1:SettingModel>
</Settings>
</UpdateQuadrantResponse>