| GET | /api/riskstore/eventset/metrics | Get event set metrics, used by the Excel Add-On |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DealEventSetMetric:
source_model_system: Optional[str] = None
model_id: Optional[str] = None
source_event_set_id: Optional[str] = None
event_set_id: int = 0
perspective_id: int = 0
el_agg: Optional[float] = None
el_occ: Optional[float] = None
p_att: Optional[float] = None
p_exh: Optional[float] = None
source_deal_id: Optional[str] = None
source_deal_system: Optional[str] = None
approved_date_time_utc: datetime.datetime = datetime.datetime(1, 1, 1)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetEventSetMetricsResponse:
deal_event_set_metrics: Optional[List[DealEventSetMetric]] = None
response_status: Optional[ResponseStatus] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetEventSetMetricsRequest(IGet):
# @ApiMember(DataType="integer", Description="The analysis id to get the event set metrics for", Format="int64", IsRequired=true)
analysis_id: int = 0
"""
The analysis id to get the event set metrics for
"""
Python GetEventSetMetricsRequest 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/eventset/metrics HTTP/1.1 Host: riskstoreng-dev.nephila.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
dealEventSetMetrics:
[
{
sourceModelSystem: String,
modelId: String,
sourceEventSetId: String,
eventSetId: 0,
perspectiveId: 0,
elAgg: 0,
elOcc: 0,
pAtt: 0,
pExh: 0,
sourceDealId: String,
sourceDealSystem: String,
approvedDateTimeUtc: 0001-01-01
}
],
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}