| Requires any of the roles: | Riskstore.Write, Riskstore.Admin |
| GET | /api/riskstore/analysis | Search for analyses |
|---|
"use strict";
export class QueryBase {
/** @param {{skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
skip;
/** @type {?number} */
take;
/** @type {string} */
orderBy;
/** @type {string} */
orderByDesc;
/** @type {string} */
include;
/** @type {string} */
fields;
/** @type {{ [index:string]: string; }} */
meta;
}
/** @typedef T {any} */
export class QueryDb extends QueryBase {
/** @param {{skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
/** @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;
}
export class FindAnalysisRequest extends QueryDb {
/** @param {{ids?:number[],name?:string,standardEnabled?:boolean,runOffEnabled?:boolean,perspectiveId?:number,createdBy?:string,analysisRunFromDateTime?:string,analysisRunToDateTime?:string,processingStatus?:ProcessingStatus,skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {number[]}
* @description The Ids of the Analyses */
ids;
/**
* @type {string}
* @description The partial name of the analyses */
name;
/**
* @type {?boolean}
* @description Filter only Standard analysis type */
standardEnabled;
/**
* @type {?boolean}
* @description Filter only Run Off analysis type */
runOffEnabled;
/**
* @type {?number}
* @description The perspective id used for the analysis */
perspectiveId;
/**
* @type {string}
* @description The partial name of the user who run the analysis */
createdBy;
/**
* @type {?string}
* @description The analysis run date to filter from */
analysisRunFromDateTime;
/**
* @type {?string}
* @description The analysis run date to filter to */
analysisRunToDateTime;
/**
* @type {?ProcessingStatus}
* @description The status of the analysis. 1 = Processing, 10 = Failed, 20 = Successful */
processingStatus;
}
/** @typedef T {any} */
export class QueryResponse {
/** @param {{offset?:number,total?:number,results?:T[],meta?:{ [index:string]: string; },responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
offset;
/** @type {number} */
total;
/** @type {T[]} */
results;
/** @type {{ [index:string]: string; }} */
meta;
/** @type {ResponseStatus} */
responseStatus;
}
JavaScript FindAnalysisRequest 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 HTTP/1.1 Host: riskstoreng-dev.nephila.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
offset: 0,
total: 0,
results:
[
{
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
}
],
meta:
{
String: String
},
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}