| POST | /api/riskstore/eventset/deal-expected-loss | Get the deals expected losses by metarisk |
|---|
import Foundation
import ServiceStack
public class GetDealExpectedLossRequest : IPost, Codable
{
/**
* The source deal system (IGN) to get the date for
*/
// @ApiMember(DataType="string", Description="The source deal system (IGN) to get the date for", IsRequired=true)
public var sourceDealSystem:String
/**
* The as of date to query
*/
// @ApiMember(DataType="string", Description="The as of date to query", Format="date-time")
public var asOf:Date?
/**
* The metarisks to query for
*/
// @ApiMember(DataType="array", Description="The metarisks to query for", Format="int32", IsRequired=true)
public var metaRiskIds:[Int] = []
/**
* The perspectives to query for
*/
// @ApiMember(DataType="array", Description="The perspectives to query for", Format="int32")
public var perspectiveIds:[Int]
/**
* The perspectives types to query for (0 - Vendor, 10 - Nephila 1.0, 16 - Nephila 2.0 etc...)
*/
// @ApiMember(DataType="array", Description="The perspectives types to query for (0 - Vendor, 10 - Nephila 1.0, 16 - Nephila 2.0 etc...)", Format="int32")
public var perspectiveTypeIds:[Int]
/**
* The source deal ids to query for
*/
// @ApiMember(DataType="array", Description="The source deal ids to query for", Format="int64", IsRequired=true)
public var sourceDealIds:[Int] = []
required public init(){}
}
public class GetDealExpectedLossResponse : Codable
{
public var dealExpectedLosses:[DealExpectedLoss]
public var responseStatus:ResponseStatus
required public init(){}
}
public class DealExpectedLoss : Codable
{
public var sourceDealId:Int
public var perspectiveId:Int
public var metaRiskId:Int
public var elAgg:Double
public var elOcc:Double
public var pAtt:Double
public var pExh:Double
required public init(){}
}
Swift GetDealExpectedLossRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/riskstore/eventset/deal-expected-loss HTTP/1.1
Host: riskstoreng-dev.nephila.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"sourceDealSystem":"String","asOf":"0001-01-01T00:00:00.0000000Z","metaRiskIds":[0],"perspectiveIds":[0],"perspectiveTypeIds":[0],"sourceDealIds":[0]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"dealExpectedLosses":[{"sourceDealId":0,"perspectiveId":0,"metaRiskId":0,"elAgg":0,"elOcc":0,"pAtt":0,"pExh":0}],"responseStatus":{"__type":"ServiceStack.ResponseStatus, ServiceStack.Interfaces","errorCode":"String","message":"String","stackTrace":"String","errors":[{"__type":"ServiceStack.ResponseError, ServiceStack.Interfaces","errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}