DigiOffice API Services Services

<back to all web services

GetDocumentStorageSystemStatus

Check storagesystem status for a document and update if necessary.

Requires Authentication
The following routes are available for this service:
GET/api/documents/{DocumentID}/checkstoragesystem
<?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};


enum CheckStorageSystemStatus : string
{
    case Error = 'Error';
    case Waiting = 'Waiting';
    case NoAction = 'NoAction';
    case Busy = 'Busy';
}

class GetDocumentStorageSystemStatusResponse implements JsonSerializable
{
    public function __construct(
        /** @var CheckStorageSystemStatus|null */
        public ?CheckStorageSystemStatus $CheckStorageSystemStatus=null
    ) {
    }

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

/** @description Check storagesystem status for a document and update if necessary. */
// @Api(Description="Check storagesystem status for a document and update if necessary.")
// @ApiResponse(Description="Status of the document (Error,NotAvailable,IsAvailable,NotAvailableBeingUpdated) ", IsDefaultResponse=true, StatusCode=200)
// @ApiResponse(Description="Document is moved to recycle bin", StatusCode=204)
// @ApiResponse(Description="Unauthorized to read document", StatusCode=401)
// @ApiResponse(Description="Document not found", StatusCode=410)
class GetDocumentStorageSystemStatus implements JsonSerializable
{
    public function __construct(
        /** @description DocumentID to be checked */
        // @ApiMember(Description="DocumentID to be checked", IsRequired=true)
        /** @var string */
        public string $DocumentID=''
    ) {
    }

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

PHP GetDocumentStorageSystemStatus 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/documents/{DocumentID}/checkstoragesystem HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"CheckStorageSystemStatus":"Error"}