Risk
This method allows inserting, editing, and deleting risks through a REST API.
info
Risks can be inserted or edited only in plans that are in the draft step. For released plans, it is not possible to add or change risk data.
Insertion​
POST /apigateway/se/rest/v1/risk/risk
Request example:
Supported attributes:
Request body parameter | Type | Required | Description |
---|---|---|---|
idRiskLibrary | String | Yes | Risk library ID # |
idPlan | String | Yes | Plan ID # |
idResp | String | Yes | Responsible ID # |
idTeam | String | No | Responsible team ID # |
idRisk | String | No | ID # |
idParent | String | No | Upper element ID # |
dtNextEval | String | No | Next evaluation date |
qtPendecy | String | No | Execution deadline |
idTreatment | String | No | Treatment ID # |
idMeasunity | String | No | Measurement unit ID # |
vlTotal | String | No | Value of other losses |
vlAppetite | String | No | Appetite value |
vlTolerance | String | No | Tolerance value |
dsRisk | String | No | Description |
attribute | String | No | Attributes Example: identifier_of_attribute1=value_of_attribute1 ; identifier_of_attribute2=value_of_attribute2 ; identifier_of_attribute3=value_of_attribute3 Example with multivalued attribute: identifier_of_attribute1=value1_of_attribute1 , value2_of_attribute1 , value3_of_attribute1 .Note: For attributes with a numeric value, the decimal place separator must be '.'. For date fields, the value must have the "Y-M-D" (Year-Month-Day) format. |
instance | String | No | Constant value: %WF_IDINSTANCE% |
idact | String | No | Instance activity ID # |
{
"idRiskLibrary": "string",
"idPlan": "string",
"idResp": "string",
"idTeam": "string",
"idRisk": "string",
"idParent": "string",
"dtNextEval": "string",
"qtPendecy": "1",
"idTreatment": "string",
"idMeasunity": "string",
"vlTotal": "1.1",
"vlApetite": "1.1",
"vlTolerance": "1.1",
"dsRisk": "string",
"attribute": "string",
"instance": "string",
"idact": "string"
}
Edit​
PUT /apigateway/se/rest/v1/risk/risk/{idRisk}
info
{idRisk} must be replaced with the risk ID #.
warning
The idRisk variable does not accept special characters.
Request example:
Supported attributes:
Request body parameter | Type | Required | Description |
---|---|---|---|
idResp | String | Yes | Responsible ID # |
idTeam | String | No | Responsible team ID # |
idRisk | String | No | ID # |
dtNextEval | String | No | Next evaluation date |
qtPendecy | String | No | Execution deadline |
idTreatment | String | No | Treatment ID # |
idMeasunity | String | No | Measurement unit ID # |
vlTotal | String | No | Value of other losses |
vlApetite | String | No | Appetite value |
vlTolerance | String | No | Tolerance value |
dsRisk | String | No | Description |
attribute | String | No | Attributes Example: identifier_of_attribute1=value_of_attribute1 ; identifier_of_attribute2=value_of_attribute2 ; identifier_of_attribute3=value_of_attribute3 Example with multivalued attribute: identifier_of_attribute1=value1_of_attribute1 , value2_of_attribute1 , value3_of_attribute1 .Note: For attributes with a numeric value, the decimal place separator must be '.'. For date fields, the value must have the "Y-M-D" (Year-Month-Day) format. |
instance | String | No | Constant value: %WF_IDINSTANCE% |
idact | String | No | Instance activity ID # |
{
"idResp": "string",
"idTeam": "string",
"idRisk": "string",
"idParent": "string",
"dtNextEval": "string",
"qtPendecy": "1",
"idTreatment": "string",
"idMeasunity": "string",
"vlTotal": "1.1",
"vlApetite": "1.1",
"vlTolerance": "1.1",
"dsRisk": "string",
"attribute": "string",
"instance": "string",
"idact": "string"
}
Deletion​
DELETE /apigateway/se/rest/v1/risk/risk/{idRisk}
info
{idRisk} must be replaced with the risk ID #.
warning
The idRisk variable does not accept special characters.
Response example:
200 OK
{
"success": true,
"total": 1,
"results": [
{
"Result": true,
"Code": 1
}
]
}