Trendsic Platform Service

<back to all web services

FormInboxViewsRequest

Requires Authentication
The following routes are available for this service:
GET/v1/forms/inbox-views
<?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 FormInboxViewItem implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $ViewUID='',
        /** @var string|null */
        public ?string $FormUID=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $FiltersJson=null
    ) {
    }

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

class FormInboxViewsResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<FormInboxViewItem>|null */
        public ?array $Views=null,
        /** @var FormInboxViewItem|null */
        public ?FormInboxViewItem $Saved=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

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

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

PHP FormInboxViewsRequest 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/inbox-views HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Views: 
	[
		{
			ViewUID: 00000000000000000000000000000000,
			FormUID: 00000000000000000000000000000000,
			Name: String,
			FiltersJson: String
		}
	],
	Saved: 
	{
		ViewUID: 00000000000000000000000000000000,
		FormUID: 00000000000000000000000000000000,
		Name: String,
		FiltersJson: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}