Trendsic Platform Service

<back to all web services

FormZipListRequest

Requires Authentication
The following routes are available for this service:
GET/v1/forms/submissions/zips
<?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 FormZipJobView implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $ZipUID='',
        /** @var string */
        public string $FormUID='',
        /** @var string|null */
        public ?string $FormName=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var string|null */
        public ?string $StatusText=null,
        /** @var string|null */
        public ?string $Message=null,
        /** @var string|null */
        public ?string $FileName=null,
        /** @var int */
        public int $Submissions=0,
        /** @var int */
        public int $Files=0,
        /** @var int */
        public int $Bytes=0,
        /** @var int */
        public int $LeftOut=0,
        /** @var int|null */
        public ?int $FilesIn=null,
        /** @var int|null */
        public ?int $BytesIn=null,
        /** @var int|null */
        public ?int $LeftOutIn=null,
        /** @var int|null */
        public ?int $ZipBytes=null,
        /** @var string|null */
        public ?string $SizeText=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null,
        /** @var string|null */
        public ?string $CreatedText=null,
        /** @var DateTime|null */
        public ?DateTime $CompletedAt=null,
        /** @var DateTime|null */
        public ?DateTime $ExpiresAt=null,
        /** @var string|null */
        public ?string $ExpiresText=null,
        /** @var int */
        public int $Downloads=0,
        /** @var string|null */
        public ?string $LastDownloadText=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ZipUID'])) $this->ZipUID = $o['ZipUID'];
        if (isset($o['FormUID'])) $this->FormUID = $o['FormUID'];
        if (isset($o['FormName'])) $this->FormName = $o['FormName'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['StatusText'])) $this->StatusText = $o['StatusText'];
        if (isset($o['Message'])) $this->Message = $o['Message'];
        if (isset($o['FileName'])) $this->FileName = $o['FileName'];
        if (isset($o['Submissions'])) $this->Submissions = $o['Submissions'];
        if (isset($o['Files'])) $this->Files = $o['Files'];
        if (isset($o['Bytes'])) $this->Bytes = $o['Bytes'];
        if (isset($o['LeftOut'])) $this->LeftOut = $o['LeftOut'];
        if (isset($o['FilesIn'])) $this->FilesIn = $o['FilesIn'];
        if (isset($o['BytesIn'])) $this->BytesIn = $o['BytesIn'];
        if (isset($o['LeftOutIn'])) $this->LeftOutIn = $o['LeftOutIn'];
        if (isset($o['ZipBytes'])) $this->ZipBytes = $o['ZipBytes'];
        if (isset($o['SizeText'])) $this->SizeText = $o['SizeText'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
        if (isset($o['CreatedText'])) $this->CreatedText = $o['CreatedText'];
        if (isset($o['CompletedAt'])) $this->CompletedAt = JsonConverters::from('DateTime', $o['CompletedAt']);
        if (isset($o['ExpiresAt'])) $this->ExpiresAt = JsonConverters::from('DateTime', $o['ExpiresAt']);
        if (isset($o['ExpiresText'])) $this->ExpiresText = $o['ExpiresText'];
        if (isset($o['Downloads'])) $this->Downloads = $o['Downloads'];
        if (isset($o['LastDownloadText'])) $this->LastDownloadText = $o['LastDownloadText'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ZipUID)) $o['ZipUID'] = $this->ZipUID;
        if (isset($this->FormUID)) $o['FormUID'] = $this->FormUID;
        if (isset($this->FormName)) $o['FormName'] = $this->FormName;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->StatusText)) $o['StatusText'] = $this->StatusText;
        if (isset($this->Message)) $o['Message'] = $this->Message;
        if (isset($this->FileName)) $o['FileName'] = $this->FileName;
        if (isset($this->Submissions)) $o['Submissions'] = $this->Submissions;
        if (isset($this->Files)) $o['Files'] = $this->Files;
        if (isset($this->Bytes)) $o['Bytes'] = $this->Bytes;
        if (isset($this->LeftOut)) $o['LeftOut'] = $this->LeftOut;
        if (isset($this->FilesIn)) $o['FilesIn'] = $this->FilesIn;
        if (isset($this->BytesIn)) $o['BytesIn'] = $this->BytesIn;
        if (isset($this->LeftOutIn)) $o['LeftOutIn'] = $this->LeftOutIn;
        if (isset($this->ZipBytes)) $o['ZipBytes'] = $this->ZipBytes;
        if (isset($this->SizeText)) $o['SizeText'] = $this->SizeText;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        if (isset($this->CreatedText)) $o['CreatedText'] = $this->CreatedText;
        if (isset($this->CompletedAt)) $o['CompletedAt'] = JsonConverters::to('DateTime', $this->CompletedAt);
        if (isset($this->ExpiresAt)) $o['ExpiresAt'] = JsonConverters::to('DateTime', $this->ExpiresAt);
        if (isset($this->ExpiresText)) $o['ExpiresText'] = $this->ExpiresText;
        if (isset($this->Downloads)) $o['Downloads'] = $this->Downloads;
        if (isset($this->LastDownloadText)) $o['LastDownloadText'] = $this->LastDownloadText;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

class FormZipListRequest implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $FormUID=''
    ) {
    }

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

PHP FormZipListRequest 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 /v1/forms/submissions/zips HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Jobs: 
	[
		{
			ZipUID: 00000000000000000000000000000000,
			FormUID: 00000000000000000000000000000000,
			FormName: String,
			Status: String,
			StatusText: String,
			Message: String,
			FileName: String,
			Submissions: 0,
			Files: 0,
			Bytes: 0,
			LeftOut: 0,
			FilesIn: 0,
			BytesIn: 0,
			LeftOutIn: 0,
			ZipBytes: 0,
			SizeText: String,
			CreatedAt: 0001-01-01,
			CreatedText: String,
			CompletedAt: 0001-01-01,
			ExpiresAt: 0001-01-01,
			ExpiresText: String,
			Downloads: 0,
			LastDownloadText: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}