Nephila RiskStore

<back to all web services

GetDealExpectedLossRequest

EventSets
Requires Authentication
The following routes are available for this service:
POST/api/riskstore/eventset/deal-expected-lossGet the deals expected losses by metarisk
namespace Nephila.RiskStore.ServiceModel.Requests

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type DealExpectedLoss() = 
        member val SourceDealId:Int64 = new Int64() with get,set
        member val PerspectiveId:Int32 = new Int32() with get,set
        member val MetaRiskId:Int32 = new Int32() with get,set
        member val ELAgg:Decimal = new Decimal() with get,set
        member val ELOcc:Decimal = new Decimal() with get,set
        member val PAtt:Decimal = new Decimal() with get,set
        member val PExh:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type GetDealExpectedLossResponse() = 
        member val DealExpectedLosses:ResizeArray<DealExpectedLoss> = null with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type GetDealExpectedLossRequest() = 
        interface 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)>]
        member val SourceDealSystem:String = null with get,set

        ///<summary>
        ///The as of date to query
        ///</summary>
        [<ApiMember(DataType="string", Description="The as of date to query", Format="date-time")>]
        member val AsOf:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        ///<summary>
        ///The metarisks to query for
        ///</summary>
        [<ApiMember(DataType="array", Description="The metarisks to query for", Format="int32", IsRequired=true)>]
        member val MetaRiskIds:ResizeArray<Int32> = null with get,set

        ///<summary>
        ///The perspectives to query for
        ///</summary>
        [<ApiMember(DataType="array", Description="The perspectives to query for", Format="int32")>]
        member val PerspectiveIds:ResizeArray<Int32> = null with get,set

        ///<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")>]
        member val PerspectiveTypeIds:ResizeArray<Int32> = null with get,set

        ///<summary>
        ///The source deal ids to query for
        ///</summary>
        [<ApiMember(DataType="array", Description="The source deal ids to query for", Format="int64", IsRequired=true)>]
        member val SourceDealIds:ResizeArray<Int64> = null with get,set

F# GetDealExpectedLossRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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/jsv
Content-Type: text/jsv
Content-Length: length

{
	sourceDealSystem: String,
	asOf: 0001-01-01,
	metaRiskIds: 
	[
		0
	],
	perspectiveIds: 
	[
		0
	],
	perspectiveTypeIds: 
	[
		0
	],
	sourceDealIds: 
	[
		0
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	dealExpectedLosses: 
	[
		{
			sourceDealId: 0,
			perspectiveId: 0,
			metaRiskId: 0,
			elAgg: 0,
			elOcc: 0,
			pAtt: 0,
			pExh: 0
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}