| POST | /api/riskstore/eventset/deal-expected-loss | Get the deals expected losses by metarisk |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Nephila.RiskStore.ServiceModel.Requests
Imports Nephila.RiskStore.ServiceModel.Types
Namespace Global
Namespace Nephila.RiskStore.ServiceModel.Requests
Public Partial Class GetDealExpectedLossRequest
Implements IPost
'''<Summary>
'''The source deal system (IGN) to get the date for
'''</Summary>
<ApiMember(DataType:="string", Description:="The source deal system (IGN) to get the date for", IsRequired:=true)>
Public Overridable Property SourceDealSystem As String
'''<Summary>
'''The as of date to query
'''</Summary>
<ApiMember(DataType:="string", Description:="The as of date to query", Format:="date-time")>
Public Overridable Property AsOf As Date?
'''<Summary>
'''The metarisks to query for
'''</Summary>
<ApiMember(DataType:="array", Description:="The metarisks to query for", Format:="int32", IsRequired:=true)>
Public Overridable Property MetaRiskIds As List(Of Integer) = New List(Of Integer)
'''<Summary>
'''The perspectives to query for
'''</Summary>
<ApiMember(DataType:="array", Description:="The perspectives to query for", Format:="int32")>
Public Overridable Property PerspectiveIds As List(Of Integer)
'''<Summary>
'''The perspectives types to query for (0 - Vendor, 10 - Nephila 1.0, 16 - Nephila 2.0 etc...)
'''</Summary>
<ApiMember(DataType:="array", Description:="The perspectives types to query for (0 - Vendor, 10 - Nephila 1.0, 16 - Nephila 2.0 etc...)", Format:="int32")>
Public Overridable Property PerspectiveTypeIds As List(Of Integer)
'''<Summary>
'''The source deal ids to query for
'''</Summary>
<ApiMember(DataType:="array", Description:="The source deal ids to query for", Format:="int64", IsRequired:=true)>
Public Overridable Property SourceDealIds As List(Of Long) = New List(Of Long)
End Class
Public Partial Class GetDealExpectedLossResponse
Public Overridable Property DealExpectedLosses As List(Of DealExpectedLoss)
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
Namespace Nephila.RiskStore.ServiceModel.Types
Public Partial Class DealExpectedLoss
Public Overridable Property SourceDealId As Long
Public Overridable Property PerspectiveId As Integer
Public Overridable Property MetaRiskId As Integer
Public Overridable Property ELAgg As Decimal
Public Overridable Property ELOcc As Decimal
Public Overridable Property PAtt As Decimal
Public Overridable Property PExh As Decimal
End Class
End Namespace
End Namespace
VB.NET 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"}}}