| Requires any of the roles: | Riskstore.Write, Riskstore.Admin |
| GET | /api/riskstore/analysis/results | Get the analysis by id, this will return results if the analysis is completed |
|---|
"use strict";
/** @typedef {'NotSet'|'PortfolioMetrics'|'Curve'|'YLT'|'TailIntensity'|'DealYlt'|'DealElt'|'DealEltWithIndustryLoss'|'PortfolioElt'|'PortfolioEltWithIndustryLoss'|'EventSetGeneration'|'PortfolioRaps'|'DealRaps'|'PortfolioSepyIndustryLoss'|'DealSepyIndustryLoss'} */
export var ResultOutputLevel;
(function (ResultOutputLevel) {
ResultOutputLevel["NotSet"] = "NotSet"
ResultOutputLevel["PortfolioMetrics"] = "PortfolioMetrics"
ResultOutputLevel["Curve"] = "Curve"
ResultOutputLevel["YLT"] = "YLT"
ResultOutputLevel["TailIntensity"] = "TailIntensity"
ResultOutputLevel["DealYlt"] = "DealYlt"
ResultOutputLevel["DealElt"] = "DealElt"
ResultOutputLevel["DealEltWithIndustryLoss"] = "DealEltWithIndustryLoss"
ResultOutputLevel["PortfolioElt"] = "PortfolioElt"
ResultOutputLevel["PortfolioEltWithIndustryLoss"] = "PortfolioEltWithIndustryLoss"
ResultOutputLevel["EventSetGeneration"] = "EventSetGeneration"
ResultOutputLevel["PortfolioRaps"] = "PortfolioRaps"
ResultOutputLevel["DealRaps"] = "DealRaps"
ResultOutputLevel["PortfolioSepyIndustryLoss"] = "PortfolioSepyIndustryLoss"
ResultOutputLevel["DealSepyIndustryLoss"] = "DealSepyIndustryLoss"
})(ResultOutputLevel || (ResultOutputLevel = {}));
/** @typedef {number} */
export var ProcessingStatus;
(function (ProcessingStatus) {
ProcessingStatus[ProcessingStatus["New"] = 0] = "New"
ProcessingStatus[ProcessingStatus["Processing"] = 1] = "Processing"
ProcessingStatus[ProcessingStatus["Failed"] = 10] = "Failed"
ProcessingStatus[ProcessingStatus["Successful"] = 20] = "Successful"
})(ProcessingStatus || (ProcessingStatus = {}));
export class AnalysisPortfolioEventSetConfiguration {
/** @param {{id?:number,analysisId?:number,analysisConfigurationId?:number,portfolioName?:string,modelId?:string,rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {number} */
analysisConfigurationId;
/** @type {string} */
portfolioName;
/** @type {string} */
modelId;
/** @type {string} */
rowIdentifier;
}
export class AnalysisConfiguration {
/** @param {{id?:number,analysisId?:number,windowStartDate?:string,windowEndDate?:string,standardEnabled?:boolean,runOffEnabled?:boolean,aggregateEnabled?:boolean,occurrenceEnabled?:boolean,nettEnabled?:boolean,grossEnabled?:boolean,tailIntensityPercentageStart?:number,tailIntensityPercentageEnd?:number,metaRiskId?:number,outputLevel?:ResultOutputLevel,processingStatus?:ProcessingStatus,eventLossFloorStartRange?:number,eventLossFloorEndRange?:number,analysisPortfolioEventSetConfigurations?:AnalysisPortfolioEventSetConfiguration[],rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {?string} */
windowStartDate;
/** @type {?string} */
windowEndDate;
/** @type {boolean} */
standardEnabled;
/** @type {boolean} */
runOffEnabled;
/** @type {boolean} */
aggregateEnabled;
/** @type {boolean} */
occurrenceEnabled;
/** @type {boolean} */
nettEnabled;
/** @type {boolean} */
grossEnabled;
/** @type {?number} */
tailIntensityPercentageStart;
/** @type {?number} */
tailIntensityPercentageEnd;
/** @type {number} */
metaRiskId;
/** @type {ResultOutputLevel} */
outputLevel;
/** @type {ProcessingStatus} */
processingStatus;
/** @type {?number} */
eventLossFloorStartRange;
/** @type {?number} */
eventLossFloorEndRange;
/** @type {AnalysisPortfolioEventSetConfiguration[]} */
analysisPortfolioEventSetConfigurations;
/** @type {string} */
rowIdentifier;
}
/** @typedef {'NotSet'|'S'|'B'} */
export var TransactionType;
(function (TransactionType) {
TransactionType["NotSet"] = "NotSet"
TransactionType["S"] = "S"
TransactionType["B"] = "B"
})(TransactionType || (TransactionType = {}));
export class AnalysisPortfolioAllocation {
/** @param {{id?:number,analysisDealId?:number,portfolioName?:string,allocationPercentage?:number,rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisDealId;
/** @type {string} */
portfolioName;
/** @type {number} */
allocationPercentage;
/** @type {string} */
rowIdentifier;
}
export class AnalysisDeal {
/** @param {{id?:number,analysisId?:number,sourceDealId?:string,dealRef?:string,sourceDealSystem?:string,eventSetId?:number,rol?:number,limit?:number,inceptionDate?:string,expiryDate?:string,transactionType?:TransactionType,allocations?:AnalysisPortfolioAllocation[],perspectiveIdOverride?:number,eventSetIdOverride?:number,modelAsOfDateOverride?:string,sourceModelSystemOverride?:string,sourceModelIdOverride?:string,sourceEventSetIdOverride?:string,eventSourceSystemOverride?:string,rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {string} */
sourceDealId;
/** @type {string} */
dealRef;
/** @type {string} */
sourceDealSystem;
/** @type {number} */
eventSetId;
/** @type {number} */
rol;
/** @type {number} */
limit;
/** @type {string} */
inceptionDate;
/** @type {string} */
expiryDate;
/** @type {TransactionType} */
transactionType;
/** @type {AnalysisPortfolioAllocation[]} */
allocations;
/** @type {?number} */
perspectiveIdOverride;
/** @type {?number} */
eventSetIdOverride;
/** @type {?string} */
modelAsOfDateOverride;
/** @type {string} */
sourceModelSystemOverride;
/** @type {string} */
sourceModelIdOverride;
/** @type {string} */
sourceEventSetIdOverride;
/** @type {string} */
eventSourceSystemOverride;
/** @type {string} */
rowIdentifier;
}
export class AnalysisEventIdFilter {
/** @param {{id?:number,analysisId?:number,eventSourceId?:number,eventId?:number,rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {number} */
eventSourceId;
/** @type {number} */
eventId;
/** @type {string} */
rowIdentifier;
}
/** @typedef {'NotSet'|'Persistence'|'Archival'} */
export var MessageType;
(function (MessageType) {
MessageType["NotSet"] = "NotSet"
MessageType["Persistence"] = "Persistence"
MessageType["Archival"] = "Archival"
})(MessageType || (MessageType = {}));
export class MessageTracking {
/** @param {{id?:string,analysisId?:number,processingStatus?:ProcessingStatus,messageType?:MessageType,createdDateUtc?:string,updatedDateUtc?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {?number} */
analysisId;
/** @type {ProcessingStatus} */
processingStatus;
/** @type {MessageType} */
messageType;
/** @type {string} */
createdDateUtc;
/** @type {string} */
updatedDateUtc;
}
export class Analysis {
/** @param {{id?:number,name?:string,modelAsOfDate?:string,perspectiveId?:number,configurations?:AnalysisConfiguration[],deals?:AnalysisDeal[],eventIdFilters?:AnalysisEventIdFilter[],createdBy?:string,createdDateUtc?:string,completedDateUtc?:string,legacyAnalysisId?:number,resultPersistenceTracking?:MessageTracking[],processingStatus?:ProcessingStatus,saveResults?:boolean,eventSourceSystem?:string,updatedDateUtc?:string,isExpired?:boolean,rowIdentifier?:string,errorMessage?:string,ignoreSimulationCountMismatch?:boolean,finalStatus?:ProcessingStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
name;
/** @type {?string} */
modelAsOfDate;
/** @type {number} */
perspectiveId;
/** @type {AnalysisConfiguration[]} */
configurations;
/** @type {AnalysisDeal[]} */
deals;
/** @type {AnalysisEventIdFilter[]} */
eventIdFilters;
/** @type {string} */
createdBy;
/** @type {string} */
createdDateUtc;
/** @type {?string} */
completedDateUtc;
/** @type {?number} */
legacyAnalysisId;
/** @type {MessageTracking[]} */
resultPersistenceTracking;
/** @type {ProcessingStatus} */
processingStatus;
/** @type {boolean} */
saveResults;
/** @type {string} */
eventSourceSystem;
/** @type {string} */
updatedDateUtc;
/** @type {boolean} */
isExpired;
/** @type {string} */
rowIdentifier;
/** @type {string} */
errorMessage;
/**
* @type {boolean}
* @description Take the minimum simulation count when we have different simulations between event sets */
ignoreSimulationCountMismatch;
/** @type {ProcessingStatus} */
finalStatus;
}
/** @typedef {'NotSet'|'Standard'|'RunOff'} */
export var AnalysisType;
(function (AnalysisType) {
AnalysisType["NotSet"] = "NotSet"
AnalysisType["Standard"] = "Standard"
AnalysisType["RunOff"] = "RunOff"
})(AnalysisType || (AnalysisType = {}));
/** @typedef {'NotSet'|'Agg'|'Occ'} */
export var SimulationLossPerspective;
(function (SimulationLossPerspective) {
SimulationLossPerspective["NotSet"] = "NotSet"
SimulationLossPerspective["Agg"] = "Agg"
SimulationLossPerspective["Occ"] = "Occ"
})(SimulationLossPerspective || (SimulationLossPerspective = {}));
/** @typedef {'NotSet'|'Net'|'Gross'} */
export var ReinsurancePremiumLossType;
(function (ReinsurancePremiumLossType) {
ReinsurancePremiumLossType["NotSet"] = "NotSet"
ReinsurancePremiumLossType["Net"] = "Net"
ReinsurancePremiumLossType["Gross"] = "Gross"
})(ReinsurancePremiumLossType || (ReinsurancePremiumLossType = {}));
export class AnalysisPortfolioMetric {
/** @param {{analysisType?:AnalysisType,simulationLossPerspective?:SimulationLossPerspective,reinsurancePremiumLossType?:ReinsurancePremiumLossType,metricDescription?:string,portfolioName?:string,metric?:number,metaRiskId?:number,simulation?:number,analysisResultId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {AnalysisType} */
analysisType;
/** @type {SimulationLossPerspective} */
simulationLossPerspective;
/** @type {ReinsurancePremiumLossType} */
reinsurancePremiumLossType;
/** @type {string} */
metricDescription;
/** @type {string} */
portfolioName;
/** @type {number} */
metric;
/** @type {number} */
metaRiskId;
/** @type {?number} */
simulation;
/** @type {number} */
analysisResultId;
}
export class AnalysisPortfolioEventSetResult {
/** @param {{id?:number,analysisId?:number,analysisPortfolioEventSetConfigurationId?:number,analysisResultId?:number,portfolioName?:string,rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {number} */
analysisPortfolioEventSetConfigurationId;
/** @type {number} */
analysisResultId;
/** @type {string} */
portfolioName;
/** @type {string} */
rowIdentifier;
}
export class AnalysisResult {
/** @param {{id?:number,analysisId?:number,analysisConfigurationId?:number,container?:string,blobName?:string,resultTableName?:string,analysisType?:AnalysisType,simulationLossPerspective?:SimulationLossPerspective,reinsurancePremiumLossType?:ReinsurancePremiumLossType,outputLevel?:ResultOutputLevel,metaRiskId?:number,analysisPortfolioEventSetResults?:AnalysisPortfolioEventSetResult[],rowIdentifier?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
analysisId;
/** @type {number} */
analysisConfigurationId;
/** @type {string} */
container;
/** @type {string} */
blobName;
/** @type {string} */
resultTableName;
/** @type {AnalysisType} */
analysisType;
/** @type {SimulationLossPerspective} */
simulationLossPerspective;
/** @type {ReinsurancePremiumLossType} */
reinsurancePremiumLossType;
/** @type {ResultOutputLevel} */
outputLevel;
/** @type {number} */
metaRiskId;
/** @type {AnalysisPortfolioEventSetResult[]} */
analysisPortfolioEventSetResults;
/** @type {string} */
rowIdentifier;
}
export class RollupResponse {
/** @param {{analysis?:Analysis,portfolioMetrics?:AnalysisPortfolioMetric[],results?:AnalysisResult[],responseStatus?:ResponseStatus,unresolvedDealIds?:string[],unlinkedDealIds?:ValueTuple<string,string>[],message?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Analysis} */
analysis;
/** @type {AnalysisPortfolioMetric[]} */
portfolioMetrics;
/** @type {AnalysisResult[]} */
results;
/** @type {ResponseStatus} */
responseStatus;
/** @type {string[]} */
unresolvedDealIds;
/** @type {ValueTuple<string,string>[]} */
unlinkedDealIds;
/** @type {string} */
message;
}
export class GetAnalysisRequest {
/** @param {{id?:number,legacyId?:number,onlyCoreData?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?number}
* @description The analysis id */
id;
/**
* @type {?number}
* @description The legacy analysis id */
legacyId;
/**
* @type {?boolean}
* @description True to not load all deal allocations, analysis runs etc... */
onlyCoreData;
}
JavaScript GetAnalysisRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/riskstore/analysis/results HTTP/1.1 Host: riskstoreng-dev.nephila.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
analysis:
{
id: 0,
name: String,
modelAsOfDate: 0001-01-01,
perspectiveId: 0,
configurations:
[
{
id: 0,
analysisId: 0,
windowStartDate: 0001-01-01,
windowEndDate: 0001-01-01,
standardEnabled: False,
runOffEnabled: False,
aggregateEnabled: False,
occurrenceEnabled: False,
nettEnabled: False,
grossEnabled: False,
tailIntensityPercentageStart: 0,
tailIntensityPercentageEnd: 0,
metaRiskId: 0,
outputLevel: NotSet,
processingStatus: New,
eventLossFloorStartRange: 0,
eventLossFloorEndRange: 0,
analysisPortfolioEventSetConfigurations:
[
{
id: 0,
analysisId: 0,
analysisConfigurationId: 0,
portfolioName: String,
modelId: String,
rowIdentifier: 00000000000000000000000000000000
}
],
rowIdentifier: 00000000000000000000000000000000
}
],
deals:
[
{
id: 0,
analysisId: 0,
sourceDealId: String,
dealRef: String,
sourceDealSystem: String,
eventSetId: 0,
rol: 0,
limit: 0,
inceptionDate: 0001-01-01,
expiryDate: 0001-01-01,
transactionType: NotSet,
allocations:
[
{
id: 0,
analysisDealId: 0,
portfolioName: String,
allocationPercentage: 0,
rowIdentifier: 00000000000000000000000000000000
}
],
perspectiveIdOverride: 0,
eventSetIdOverride: 0,
modelAsOfDateOverride: 0001-01-01,
sourceModelSystemOverride: String,
sourceModelIdOverride: String,
sourceEventSetIdOverride: String,
eventSourceSystemOverride: String,
rowIdentifier: 00000000000000000000000000000000
}
],
eventIdFilters:
[
{
id: 0,
analysisId: 0,
eventSourceId: 0,
eventId: 0,
rowIdentifier: 00000000000000000000000000000000
}
],
createdBy: String,
createdDateUtc: 0001-01-01,
completedDateUtc: 0001-01-01,
legacyAnalysisId: 0,
resultPersistenceTracking:
[
{
id: 00000000000000000000000000000000,
analysisId: 0,
processingStatus: New,
messageType: NotSet,
createdDateUtc: 0001-01-01,
updatedDateUtc: 0001-01-01
}
],
processingStatus: New,
saveResults: False,
eventSourceSystem: String,
updatedDateUtc: 0001-01-01,
isExpired: False,
rowIdentifier: 00000000000000000000000000000000,
errorMessage: String,
ignoreSimulationCountMismatch: False,
finalStatus: New
},
portfolioMetrics:
[
{
analysisType: NotSet,
simulationLossPerspective: NotSet,
reinsurancePremiumLossType: NotSet,
metricDescription: String,
portfolioName: String,
metric: 0,
metaRiskId: 0,
simulation: 0,
analysisResultId: 0
}
],
results:
[
{
id: 0,
analysisId: 0,
analysisConfigurationId: 0,
container: String,
blobName: String,
resultTableName: String,
analysisType: NotSet,
simulationLossPerspective: NotSet,
reinsurancePremiumLossType: NotSet,
outputLevel: NotSet,
metaRiskId: 0,
analysisPortfolioEventSetResults:
[
{
id: 0,
analysisId: 0,
analysisPortfolioEventSetConfigurationId: 0,
analysisResultId: 0,
portfolioName: String,
rowIdentifier: 00000000000000000000000000000000
}
],
rowIdentifier: 00000000000000000000000000000000
}
],
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
},
unresolvedDealIds:
[
String
],
unlinkedDealIds:
[
"(, )"
],
message: String
}