Trendsic Platform Service

<back to all web services

EngineErrorsRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/engine/errors
<?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 WorkflowErrorGroupView implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ErrorGroupId=0,
        /** @var int */
        public int $WorkflowId=0,
        /** @var string|null */
        public ?string $WorkflowName=null,
        /** @var string|null */
        public ?string $NodeId=null,
        /** @var string|null */
        public ?string $Kind=null,
        /** @var string|null */
        public ?string $Message=null,
        /** @var string|null */
        public ?string $FixText=null,
        /** @var int */
        public int $Count=0,
        /** @var DateTime */
        public DateTime $FirstSeen=new DateTime(),
        /** @var DateTime */
        public DateTime $LastSeen=new DateTime(),
        /** @var string|null */
        public ?string $Status=null,
        /** @var array<string>|null */
        public ?array $Records=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ErrorGroupId'])) $this->ErrorGroupId = $o['ErrorGroupId'];
        if (isset($o['WorkflowId'])) $this->WorkflowId = $o['WorkflowId'];
        if (isset($o['WorkflowName'])) $this->WorkflowName = $o['WorkflowName'];
        if (isset($o['NodeId'])) $this->NodeId = $o['NodeId'];
        if (isset($o['Kind'])) $this->Kind = $o['Kind'];
        if (isset($o['Message'])) $this->Message = $o['Message'];
        if (isset($o['FixText'])) $this->FixText = $o['FixText'];
        if (isset($o['Count'])) $this->Count = $o['Count'];
        if (isset($o['FirstSeen'])) $this->FirstSeen = JsonConverters::from('DateTime', $o['FirstSeen']);
        if (isset($o['LastSeen'])) $this->LastSeen = JsonConverters::from('DateTime', $o['LastSeen']);
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['Records'])) $this->Records = JsonConverters::fromArray('string', $o['Records']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ErrorGroupId)) $o['ErrorGroupId'] = $this->ErrorGroupId;
        if (isset($this->WorkflowId)) $o['WorkflowId'] = $this->WorkflowId;
        if (isset($this->WorkflowName)) $o['WorkflowName'] = $this->WorkflowName;
        if (isset($this->NodeId)) $o['NodeId'] = $this->NodeId;
        if (isset($this->Kind)) $o['Kind'] = $this->Kind;
        if (isset($this->Message)) $o['Message'] = $this->Message;
        if (isset($this->FixText)) $o['FixText'] = $this->FixText;
        if (isset($this->Count)) $o['Count'] = $this->Count;
        if (isset($this->FirstSeen)) $o['FirstSeen'] = JsonConverters::to('DateTime', $this->FirstSeen);
        if (isset($this->LastSeen)) $o['LastSeen'] = JsonConverters::to('DateTime', $this->LastSeen);
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->Records)) $o['Records'] = JsonConverters::toArray('string', $this->Records);
        return empty($o) ? new class(){} : $o;
    }
}

class EngineErrorsResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<WorkflowErrorGroupView>|null */
        public ?array $Errors=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

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

class EngineErrorsRequest implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

PHP EngineErrorsRequest DTOs

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

HTTP + XML

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

GET /v1/engine/errors HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<EngineErrorsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Errors>
    <WorkflowErrorGroupView>
      <Count>0</Count>
      <ErrorGroupId>0</ErrorGroupId>
      <FirstSeen>0001-01-01T00:00:00</FirstSeen>
      <FixText>String</FixText>
      <Kind>String</Kind>
      <LastSeen>0001-01-01T00:00:00</LastSeen>
      <Message>String</Message>
      <NodeId>String</NodeId>
      <Records xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </Records>
      <Status>String</Status>
      <WorkflowId>0</WorkflowId>
      <WorkflowName>String</WorkflowName>
    </WorkflowErrorGroupView>
  </Errors>
  <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>
</EngineErrorsResponse>