| POST | /api/reports/riskassessments | Add a Risk Assessment to a Coruson Report |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ReportId | query | Guid | Yes | The id of the report to add the risk assessment to. |
| MatrixRevisionId | query | Guid | Yes | The id of the active risk matrix revision to assess against. |
| XDimensionAssessmentValue | query | Integer | Yes | The X-axis (e.g. Likelihood) assessment value, as the integer position within the matrix range. |
| YDimensionAssessmentValues | query | Dictionary<Guid, Integer> | Yes | Assessment value per Y-axis perspective, keyed by perspective id. A value is required for every Y perspective of the matrix revision. |
| Comment | query | String | No | Optional free-text comment for the risk assessment. |
| RiskAssessmentId | query | Guid | No | Optional id for the new risk assessment; generated by the server if omitted. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Version | form | int | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| RiskAssessmentId | form | Guid | No | |
| ReportId | form | Guid | No | |
| MatrixRevisionId | form | Guid | No | |
| RiskAssessmentValue | form | int | No | |
| RiskRatingDisplayValue | form | string | No | |
| SuggestedAction | form | string | No | |
| Comment | form | string | No | |
| PerformedBy | form | string | No | |
| PerformedById | form | Guid | No | |
| PerformedDate | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| StatusDescription | form | string | No | |
| ResponseStatus | form | ResponseStatus | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/CreateReportRiskAssessment HTTP/1.1
Host: platform.gaelenlighten.com
Content-Type: text/jsv
Content-Length: length
{
Version: 0,
XDimensionAssessmentValue: 0,
YDimensionAssessmentValues:
{
00000000-0000-0000-0000-000000000000: 0
},
Comment: String,
RiskAssessmentId: 00000000-0000-0000-0000-000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
StatusDescription: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
RiskAssessmentValue: 0,
RiskRating: String,
SuggestedAction: String,
Comment: String,
PerformedBy: String,
PerformedDate: String
}