OPPORTUNITY
This method allows inserting, editing, and deleting opportunities through a REST API.
info
Opportunities 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 opportunity data.
Insertion​
POST /apigateway/se/rest/v1/risk/opportunity
Request example:
Request body parameter | Type | Required | Description |
---|---|---|---|
idOpportunityLibrary | String | Yes | Opportunity library ID # |
idPlan | String | Yes | Plan ID # |
idResp | String | Yes | Responsible ID # |
idTeam | String | No | Responsible team ID # |
idOpportunity | String | No | ID # |
idParent | String | No | Upper level 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 |
vlApetite | String | No | Appetite value |
vlTolerance | String | No | Tolerance value |
dsOpportunity | 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 # |
{
"idOpportunityLibrary": "string",
"idPlan": "string",
"idResp": "string",
"idTeam": "string",
"idOpportunity": "string",
"idParent": "string",
"dtNextEval": "string",
"qtPendecy": "1",
"idTreatment": "string",
"idMeasunity": "string",
"vlTotal": "1.1",
"vlApetite": "1.1",
"vlTolerance": "1.1",
"dsOpportunity": "string",
"attribute": "string",
"instance": "string",
"idact": "string"
}
Edit​
POST /apigateway/se/rest/v1/risk/opportunity/{idOpportunity}
info
{idOpportunity} must be replaced with the opportunity ID #.
warning
The idOpportunity variable does not accept special characters.
Request example:
Request body parameter | Type | Required | Description |
---|---|---|---|
idResp | String | Yes | Responsible ID # |
idTeam | String | No | Responsible team ID # |
idOpportunity | 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 |
dsOpportunity | 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",
"idOpportunity": "string",
"idParent": "string",
"dtNextEval": "string",
"qtPendecy": "1",
"idTreatment": "string",
"idMeasunity": "string",
"vlTotal": "1.1",
"vlApetite": "1.1",
"vlTolerance": "1.1",
"dsOpportunity": "string",
"attribute": "string",
"instance": "string",
"idact": "string"
}
Deletion​
DELETE /apigateway/se/rest/v1/risk/opportunity/{idOpportunity}
info
{idOpportunity} must be replaced with the opportunity ID #.
warning
The idOpportunity variable does not accept special characters.
Response example:
200 OK
{
"success": true,
"total": 1,
"results": [
{
"Result": true,
"Code": 1
}
]
}