Platform API

<back to all web services

GetDocumentationAutomation

Get details of a specific documentation automation

Requires Authentication
The following routes are available for this service:
GET/api/automation/{AutomationId}/documentation
<?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 AutomationModel implements JsonSerializable
{
    public function __construct(
        /** @description The unique automation Id */
        // @ApiMember(Description="The unique automation Id", ParameterType="query")
        /** @var string */
        public string $AutomationId='',

        /** @description The automation type Id */
        // @ApiMember(Description="The automation type Id", ParameterType="query")
        /** @var string */
        public string $AutomationTypeId='',

        /** @description The automation type */
        // @ApiMember(Description="The automation type", ParameterType="query")
        /** @var string|null */
        public ?string $AutomationType=null,

        /** @description The object this automation applies to */
        // @ApiMember(Description="The object this automation applies to", ParameterType="query")
        /** @var string */
        public string $ObjectId='',

        /** @description The object name this automation applies to */
        // @ApiMember(Description="The object name this automation applies to", ParameterType="query")
        /** @var string|null */
        public ?string $ObjectName=null,

        /** @description The Id of the object type that this automation applies to.  */
        // @ApiMember(Description="The Id of the object type that this automation applies to. ", ParameterType="query")
        /** @var string */
        public string $RmsTableCtxIdObject='',

        /** @description The name of the object type that this automation applies to. */
        // @ApiMember(Description="The name of the object type that this automation applies to.", ParameterType="query")
        /** @var string|null */
        public ?string $RmsTableCtxName=null,

        /** @description A guid list containing the selected system action Id's that trigger this automation. */
        // @ApiMember(Description="A guid list containing the selected system action Id's that trigger this automation.", ParameterType="query")
        /** @var array<string>|null */
        public ?array $ActionList=null,

        /** @description A comma separated string of the selected system action names that trigger this automation. */
        // @ApiMember(Description="A comma separated string of the selected system action names that trigger this automation.", ParameterType="query")
        /** @var string|null */
        public ?string $Actions=null,

        /** @description Name of the automation. */
        // @ApiMember(Description="Name of the automation.", ParameterType="query")
        /** @var string|null */
        public ?string $Name=null,

        /** @description Description of the automation */
        // @ApiMember(Description="Description of the automation", ParameterType="query")
        /** @var string|null */
        public ?string $Description=null,

        /** @description Owner Contact Id */
        // @ApiMember(Description="Owner Contact Id", ParameterType="query")
        /** @var string */
        public string $OwnerContactId='',

        /** @description Record Status of the automation. */
        // @ApiMember(Description="Record Status of the automation.", ParameterType="query")
        /** @var string|null */
        public ?string $RecordStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AutomationId'])) $this->AutomationId = $o['AutomationId'];
        if (isset($o['AutomationTypeId'])) $this->AutomationTypeId = $o['AutomationTypeId'];
        if (isset($o['AutomationType'])) $this->AutomationType = $o['AutomationType'];
        if (isset($o['ObjectId'])) $this->ObjectId = $o['ObjectId'];
        if (isset($o['ObjectName'])) $this->ObjectName = $o['ObjectName'];
        if (isset($o['RmsTableCtxIdObject'])) $this->RmsTableCtxIdObject = $o['RmsTableCtxIdObject'];
        if (isset($o['RmsTableCtxName'])) $this->RmsTableCtxName = $o['RmsTableCtxName'];
        if (isset($o['ActionList'])) $this->ActionList = JsonConverters::fromArray('Guid', $o['ActionList']);
        if (isset($o['Actions'])) $this->Actions = $o['Actions'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['OwnerContactId'])) $this->OwnerContactId = $o['OwnerContactId'];
        if (isset($o['RecordStatus'])) $this->RecordStatus = $o['RecordStatus'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AutomationId)) $o['AutomationId'] = $this->AutomationId;
        if (isset($this->AutomationTypeId)) $o['AutomationTypeId'] = $this->AutomationTypeId;
        if (isset($this->AutomationType)) $o['AutomationType'] = $this->AutomationType;
        if (isset($this->ObjectId)) $o['ObjectId'] = $this->ObjectId;
        if (isset($this->ObjectName)) $o['ObjectName'] = $this->ObjectName;
        if (isset($this->RmsTableCtxIdObject)) $o['RmsTableCtxIdObject'] = $this->RmsTableCtxIdObject;
        if (isset($this->RmsTableCtxName)) $o['RmsTableCtxName'] = $this->RmsTableCtxName;
        if (isset($this->ActionList)) $o['ActionList'] = JsonConverters::toArray('Guid', $this->ActionList);
        if (isset($this->Actions)) $o['Actions'] = $this->Actions;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->OwnerContactId)) $o['OwnerContactId'] = $this->OwnerContactId;
        if (isset($this->RecordStatus)) $o['RecordStatus'] = $this->RecordStatus;
        return empty($o) ? new class(){} : $o;
    }
}

class AutoDocumentationModel extends AutomationModel implements JsonSerializable
{
    /**
     * @param string $AutomationId
     * @param string $AutomationTypeId
     * @param string|null $AutomationType
     * @param string $ObjectId
     * @param string|null $ObjectName
     * @param string $RmsTableCtxIdObject
     * @param string|null $RmsTableCtxName
     * @param array<string>|null $ActionList
     * @param string|null $Actions
     * @param string|null $Name
     * @param string|null $Description
     * @param string $OwnerContactId
     * @param string|null $RecordStatus
     */
    public function __construct(
        string $AutomationId='',
        string $AutomationTypeId='',
        ?string $AutomationType=null,
        string $ObjectId='',
        ?string $ObjectName=null,
        string $RmsTableCtxIdObject='',
        ?string $RmsTableCtxName=null,
        ?array $ActionList=null,
        ?string $Actions=null,
        ?string $Name=null,
        ?string $Description=null,
        string $OwnerContactId='',
        ?string $RecordStatus=null,
        /** @description Report Id */
        // @ApiMember(Description="Report Id", ParameterType="query")
        /** @var string */
        public string $ReportId='',

        /** @description Report Name */
        // @ApiMember(Description="Report Name", ParameterType="query")
        /** @var string|null */
        public ?string $Report=null,

        /** @description Document Type Id */
        // @ApiMember(Description="Document Type Id", ParameterType="query")
        /** @var string */
        public string $DocumentTypeId='',

        /** @description Document Type */
        // @ApiMember(Description="Document Type", ParameterType="query")
        /** @var string|null */
        public ?string $DocumentType=null,

        /** @description Document Status Id */
        // @ApiMember(Description="Document Status Id", ParameterType="query")
        /** @var string */
        public string $DocumentStatusId='',

        /** @description The Document Status */
        // @ApiMember(Description="The Document Status", ParameterType="query")
        /** @var string|null */
        public ?string $DocumentStatus=null
    ) {
        parent::__construct($AutomationId,$AutomationTypeId,$AutomationType,$ObjectId,$ObjectName,$RmsTableCtxIdObject,$RmsTableCtxName,$ActionList,$Actions,$Name,$Description,$OwnerContactId,$RecordStatus);
    }

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

// @ApiResponse(Description="Returns a documentation automation")
class GetDocumentationAutomationResponse implements JsonSerializable
{
    public function __construct(
        /** @description Documentation Automation */
        // @ApiMember(Description="Documentation Automation")
        /** @var AutoDocumentationModel|null */
        public ?AutoDocumentationModel $Automation=null,

        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

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

/** @description Get details of a specific documentation automation */
// @Api(Description="Get details of a specific documentation automation")
class GetDocumentationAutomation implements JsonSerializable
{
    public function __construct(
        /** @description Automation Id. */
        // @ApiMember(Description="Automation Id.", ParameterType="path")
        /** @var string */
        public string $AutomationId=''
    ) {
    }

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

PHP GetDocumentationAutomation DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /api/automation/{AutomationId}/documentation HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Automation":{"ReportId":"00000000-0000-0000-0000-000000000000","Report":"String","DocumentTypeId":"00000000-0000-0000-0000-000000000000","DocumentType":"String","DocumentStatusId":"00000000-0000-0000-0000-000000000000","DocumentStatus":"String","AutomationId":"00000000-0000-0000-0000-000000000000","AutomationTypeId":"00000000-0000-0000-0000-000000000000","AutomationType":"String","ObjectId":"00000000-0000-0000-0000-000000000000","ObjectName":"String","RmsTableCtxIdObject":"00000000-0000-0000-0000-000000000000","RmsTableCtxName":"String","ActionList":["00000000-0000-0000-0000-000000000000"],"Actions":"String","Name":"String","Description":"String","OwnerContactId":"00000000-0000-0000-0000-000000000000","RecordStatus":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}