Click or drag to resize

Risk Details

SDK provides read access for risk data. This exposes similar information when viewing risks during the Quoting workflow using the Epic UI.
Get /api/risk_details?risk_variation_guid={risk_variation_guid}

This method is used to get all risk data of a specified risk variation. In other words, this method mimics the Epic behaviour of the following screen:

Epic View Risk

Can be accessed via the URI [Your_SDK_Service]/api/risk_details?risk_variation_guid={risk_variation_guid}.

Request Parameters

risk_variation_guid

  • Type: System.String

    The unique identifier specifing the risk variation for which to obtain the quote rates. Accepted values can be obtained from the quote risk variations.

Response

  • Status Code: 200

    Resource Representation: System.String

    Resource Representation: Rating

Examples

Get risk detail.

VB
 1' Dim SDK_SERVICE_URI As New Uri("https://Fully_Qualified_Service_Computer_Name/SDK_Service")
 2' Constant DATABASE preset to current database name
 3' Constant AUTHENTICATION_KEY set to current authentication key
 4
 5'Here we will output all the quote rate detail of a risk variation. 
 6Try
 7  Dim sRiskVariationGuid As String = "e43cd64d-5737-4326-8cf6-6f5da7ed6b73" 'This is the unique identifier of a risk variation. It can be obtained from the response of get risk variations. (Get /api/risk_variations?quote_guid={quote_guid})
 8  Dim sRiskDetailURL As String = SDK_SERVICE_URI & "/api/risk_details?risk_variation_guid=" & sRiskVariationGuid
 9  Dim sRiskDetailResponse As String
10  Using oWebclient As New WebClient
11    oWebclient.Encoding = Encoding.UTF8
12    With oWebclient.Headers
13      .Add("AuthenticationKey", AUTHENTICATION_KEY)
14      .Add("DatabaseName", DATABASE)
15    End With
16    Dim aRiskDetailResponse As Byte() = oWebclient.DownloadData(sRiskDetailURL)
17    sRiskDetailResponse = oWebclient.Encoding.GetString(aRiskDetailResponse)
18  End Using
19  Console.WriteLine(sRiskDetailResponse)
20
21Catch ex As WebException
22  Dim sStatusCode As String = ex.Status.ToString
23  Dim sError As String = New IO.StreamReader(ex.Response.GetResponseStream).ReadToEnd
24  'Console.WriteLine($"Status Code: {sStatusCode}, Error: {sError}")
25Catch ex As Exception
26  Console.WriteLine(ex.Message)
27End Try
See Also