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
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Nephila.RiskStore.ServiceModel.Requests;
using Nephila.RiskStore.ServiceModel.Types;

namespace Nephila.RiskStore.ServiceModel.Requests
{
    public partial class GetDealExpectedLossRequest
        : 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 virtual string SourceDealSystem { get; set; }

        ///<summary>
        ///The as of date to query
        ///</summary>
        [ApiMember(DataType="string", Description="The as of date to query", Format="date-time")]
        public virtual DateTime? AsOf { get; set; }

        ///<summary>
        ///The metarisks to query for
        ///</summary>
        [ApiMember(DataType="array", Description="The metarisks to query for", Format="int32", IsRequired=true)]
        public virtual List<int> MetaRiskIds { get; set; } = [];

        ///<summary>
        ///The perspectives to query for
        ///</summary>
        [ApiMember(DataType="array", Description="The perspectives to query for", Format="int32")]
        public virtual List<int> PerspectiveIds { 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")]
        public virtual List<int> PerspectiveTypeIds { 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)]
        public virtual List<long> SourceDealIds { get; set; } = [];
    }

    public partial class GetDealExpectedLossResponse
    {
        public virtual List<DealExpectedLoss> DealExpectedLosses { get; set; }
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

namespace Nephila.RiskStore.ServiceModel.Types
{
    public partial class DealExpectedLoss
    {
        public virtual long SourceDealId { get; set; }
        public virtual int PerspectiveId { get; set; }
        public virtual int MetaRiskId { get; set; }
        public virtual decimal ELAgg { get; set; }
        public virtual decimal ELOcc { get; set; }
        public virtual decimal PAtt { get; set; }
        public virtual decimal PExh { get; set; }
    }

}

C# GetDealExpectedLossRequest DTOs

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

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<GetDealExpectedLossRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Requests">
  <AsOf>0001-01-01T00:00:00</AsOf>
  <MetaRiskIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </MetaRiskIds>
  <PerspectiveIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </PerspectiveIds>
  <PerspectiveTypeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </PerspectiveTypeIds>
  <SourceDealIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:long>0</d2p1:long>
  </SourceDealIds>
  <SourceDealSystem>String</SourceDealSystem>
</GetDealExpectedLossRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetDealExpectedLossResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Requests">
  <DealExpectedLosses xmlns:d2p1="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Types">
    <d2p1:DealExpectedLoss>
      <d2p1:ELAgg>0</d2p1:ELAgg>
      <d2p1:ELOcc>0</d2p1:ELOcc>
      <d2p1:MetaRiskId>0</d2p1:MetaRiskId>
      <d2p1:PAtt>0</d2p1:PAtt>
      <d2p1:PExh>0</d2p1:PExh>
      <d2p1:PerspectiveId>0</d2p1:PerspectiveId>
      <d2p1:SourceDealId>0</d2p1:SourceDealId>
    </d2p1:DealExpectedLoss>
  </DealExpectedLosses>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</GetDealExpectedLossResponse>