| Requires any of the roles: | Riskstore.Read, Riskstore.Write, Riskstore.Admin |
| GET | /api/riskstore/seed/status | List recent seed refresh requests | Returns all seed refresh entries known to the running host process, newest first. Entries are lost on restart. |
|---|
<?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 ListSeedRefreshStatusResponse implements JsonSerializable
{
public function __construct(
/** @var array<SeedRefreshStatusResponse>|null */
public ?array $entries=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['entries'])) $this->entries = JsonConverters::fromArray('SeedRefreshStatusResponse', $o['entries']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->entries)) $o['entries'] = JsonConverters::toArray('SeedRefreshStatusResponse', $this->entries);
return empty($o) ? new class(){} : $o;
}
}
class ListSeedRefreshStatus implements IGet, JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
PHP ListSeedRefreshStatus DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/riskstore/seed/status HTTP/1.1 Host: riskstoreng-dev.nephila.com Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"entries":[{"requestId":"00000000000000000000000000000000","tableName":"String","status":"String","createdUtc":"0001-01-01T00:00:00.0000000Z","updatedUtc":"0001-01-01T00:00:00.0000000Z","startedUtc":"0001-01-01T00:00:00.0000000Z","completedUtc":"0001-01-01T00:00:00.0000000Z","rowCount":0,"errorMessage":"String","outputPath":"String","totalCount":0,"processedCount":0,"skippedCount":0,"failedCount":0}]}