DigiOffice API Services Services

<back to all web services

GetUserConfig

Requires Authentication
The following routes are available for this service:
GET/api/users/me/config
<?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 Permissions implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $DefaultGridProfiles=null
    ) {
    }

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

class UserConfig implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Theme=null,
        /** @var string|null */
        public ?string $ZoomLevel=null,
        /** @var string|null */
        public ?string $InterfaceCulture=null,
        /** @var bool|null */
        public ?bool $Autocomplete=null,
        /** @var Permissions|null */
        public ?Permissions $Permissions=null
    ) {
    }

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

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

PHP GetUserConfig DTOs

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

HTTP + CSV

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

GET /api/users/me/config HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Theme":"String","ZoomLevel":"String","InterfaceCulture":"String","Autocomplete":false,"Permissions":{"DefaultGridProfiles":false}}