Skip to main content
Version: 2.2.3

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 parameterTypeRequiredDescription
idOpportunityLibraryStringYesOpportunity library ID #
idPlanStringYesPlan ID #
idRespStringYesResponsible ID #
idTeamStringNoResponsible team ID #
idOpportunityStringNoID #
idParentStringNoUpper level element ID #
dtNextEvalStringNoNext evaluation date
qtPendecyStringNoExecution deadline
idTreatmentStringNoTreatment ID #
idMeasunityStringNoMeasurement unit ID #
vlTotalStringNoValue of other losses
vlApetiteStringNoAppetite value
vlToleranceStringNoTolerance value
dsOpportunityStringNoDescription
attributeStringNoAttributes
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.
instanceStringNoConstant value: %WF_IDINSTANCE%
idactStringNoInstance 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 parameterTypeRequiredDescription
idRespStringYesResponsible ID #
idTeamStringNoResponsible team ID #
idOpportunityStringNoID #
dtNextEvalStringNoNext evaluation date
qtPendecyStringNoExecution deadline
idTreatmentStringNoTreatment ID #
idMeasunityStringNoMeasurement unit ID #
vlTotalStringNoValue of other losses
vlApetiteStringNoAppetite value
vlToleranceStringNoTolerance value
dsOpportunityStringNoDescription
attributeStringNoAttributes
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.
instanceStringNoConstant value: %WF_IDINSTANCE%
idactStringNoInstance 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
}
]
}