Nephila RiskStore

<back to all web services

GetSeedRefreshStatus

Seed
Requires Authentication
Requires any of the roles:Riskstore.Read, Riskstore.Write, Riskstore.Admin
The following routes are available for this service:
GET/api/riskstore/seed/status/{RequestId}Get seed refresh status by request idReturns the current status of a seed refresh request. Status values: Queued, Processing, Successful, Failed.
<?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 SeedRefreshStatusResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $requestId='',
        /** @var string|null */
        public ?string $tableName=null,
        /** @var string|null */
        public ?string $status=null,
        /** @var DateTime */
        public DateTime $createdUtc=new DateTime(),
        /** @var DateTime */
        public DateTime $updatedUtc=new DateTime(),
        /** @var DateTime|null */
        public ?DateTime $startedUtc=null,
        /** @var DateTime|null */
        public ?DateTime $completedUtc=null,
        /** @var int|null */
        public ?int $rowCount=null,
        /** @var string|null */
        public ?string $errorMessage=null,
        /** @var string|null */
        public ?string $outputPath=null,
        /** @var int|null */
        public ?int $totalCount=null,
        /** @var int|null */
        public ?int $processedCount=null,
        /** @var int|null */
        public ?int $skippedCount=null,
        /** @var int|null */
        public ?int $failedCount=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['requestId'])) $this->requestId = $o['requestId'];
        if (isset($o['tableName'])) $this->tableName = $o['tableName'];
        if (isset($o['status'])) $this->status = $o['status'];
        if (isset($o['createdUtc'])) $this->createdUtc = JsonConverters::from('DateTime', $o['createdUtc']);
        if (isset($o['updatedUtc'])) $this->updatedUtc = JsonConverters::from('DateTime', $o['updatedUtc']);
        if (isset($o['startedUtc'])) $this->startedUtc = JsonConverters::from('DateTime', $o['startedUtc']);
        if (isset($o['completedUtc'])) $this->completedUtc = JsonConverters::from('DateTime', $o['completedUtc']);
        if (isset($o['rowCount'])) $this->rowCount = $o['rowCount'];
        if (isset($o['errorMessage'])) $this->errorMessage = $o['errorMessage'];
        if (isset($o['outputPath'])) $this->outputPath = $o['outputPath'];
        if (isset($o['totalCount'])) $this->totalCount = $o['totalCount'];
        if (isset($o['processedCount'])) $this->processedCount = $o['processedCount'];
        if (isset($o['skippedCount'])) $this->skippedCount = $o['skippedCount'];
        if (isset($o['failedCount'])) $this->failedCount = $o['failedCount'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->requestId)) $o['requestId'] = $this->requestId;
        if (isset($this->tableName)) $o['tableName'] = $this->tableName;
        if (isset($this->status)) $o['status'] = $this->status;
        if (isset($this->createdUtc)) $o['createdUtc'] = JsonConverters::to('DateTime', $this->createdUtc);
        if (isset($this->updatedUtc)) $o['updatedUtc'] = JsonConverters::to('DateTime', $this->updatedUtc);
        if (isset($this->startedUtc)) $o['startedUtc'] = JsonConverters::to('DateTime', $this->startedUtc);
        if (isset($this->completedUtc)) $o['completedUtc'] = JsonConverters::to('DateTime', $this->completedUtc);
        if (isset($this->rowCount)) $o['rowCount'] = $this->rowCount;
        if (isset($this->errorMessage)) $o['errorMessage'] = $this->errorMessage;
        if (isset($this->outputPath)) $o['outputPath'] = $this->outputPath;
        if (isset($this->totalCount)) $o['totalCount'] = $this->totalCount;
        if (isset($this->processedCount)) $o['processedCount'] = $this->processedCount;
        if (isset($this->skippedCount)) $o['skippedCount'] = $this->skippedCount;
        if (isset($this->failedCount)) $o['failedCount'] = $this->failedCount;
        return empty($o) ? new class(){} : $o;
    }
}

class GetSeedRefreshStatus implements IGet, JsonSerializable
{
    public function __construct(
        /** @description Request id returned by the POST /seed/refresh/{TableName} call */
        // @ApiMember(DataType="string", Description="Request id returned by the POST /seed/refresh/{TableName} call", Format="uuid", IsRequired=true)
        /** @var string */
        public string $requestId=''
    ) {
    }

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

PHP GetSeedRefreshStatus DTOs

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

HTTP + XML

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

GET /api/riskstore/seed/status/{RequestId} HTTP/1.1 
Host: riskstoreng-dev.nephila.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SeedRefreshStatusResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Requests">
  <CompletedUtc>0001-01-01T00:00:00</CompletedUtc>
  <CreatedUtc>0001-01-01T00:00:00</CreatedUtc>
  <ErrorMessage>String</ErrorMessage>
  <FailedCount>0</FailedCount>
  <OutputPath>String</OutputPath>
  <ProcessedCount>0</ProcessedCount>
  <RequestId>00000000-0000-0000-0000-000000000000</RequestId>
  <RowCount>0</RowCount>
  <SkippedCount>0</SkippedCount>
  <StartedUtc>0001-01-01T00:00:00</StartedUtc>
  <Status>String</Status>
  <TableName>String</TableName>
  <TotalCount>0</TotalCount>
  <UpdatedUtc>0001-01-01T00:00:00</UpdatedUtc>
</SeedRefreshStatusResponse>