Skip to content

Update a scenario

Request

Applies partial updates to an existing scenario using JSON-Patch replace operations. The title, description, displayID, colour, and isSelected fields can be updated; set isSelected to feature a scenario above the others in the same study.

Security
bearer and appkey
Query
studyIdstringrequired

The study id which the scenario belong to.

scenarioIdstringrequired

The id of the scenario to update.

Headers
slb-partition-idstringrequired

Data partition id.

Bodyapplication/jsonrequired

The patches to apply to the scenario. Only "replace" operation is supported.

Array [
opstringrequired

The operation to be performed.

Enum:"replace""add""remove"
Example:"replace"
pathstringrequired

A JSON-Pointer.

Example:"description"
valueany

The value to be used within the operations.

Example:"New description"
fromstring

A string containing a JSON Pointer value.

]
curl -i -X PATCH \
  'https://api.delfi.slb.com/fdplan/studies/v1/scenarios?studyId=string&scenarioId=string' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'appkey: YOUR_API_KEY_HERE' \
  -H 'slb-partition-id: string' \
  -d '[
    {
      "op": "replace",
      "path": "title",
      "value": "title"
    },
    {
      "op": "replace",
      "path": "description",
      "value": "description"
    }
  ]'

Responses

Scenario updated successfully.

Bodyapplication/json
idstring

A scenario's unique identifier.

Example:"01CP3E6EJJ25J29YHZ0K4RDZH8"
displayIDstring

The user-friendly ID of this scenario.

Example:"S1"
ensembleIDstring

The ID of the ensemble that manages all the realizations associated with the scenario.

titlestring

A scenario's title.

Example:"Minimal investment"
descriptionstring

The description of this scenario.

Example:"Minimal investment development option scenario."
lastUpdatedobject(LastUpdated)

Details of the last update to a resource.

Example:
{ "atDate": "2020-09-08T09:53:36.000Z", "byEvent": "01EHPJ54HEA77K95T5KPH5JSW9", "byUser": "user@slb.com" }
createdobject(Created)

Details about the creation of a resource.

Example:
{ "atDate": "2020-09-08T09:53:36.000Z", "byEvent": "01EHPJ54HEA77K95T5KPH5JSW9", "byUser": "user@slb.com" }
isSelectedboolean or null

A scenario is marked as selected when it has been featured above other scenarios in the same study by a user.

Example:true
decisionsArray of objects(Decision)

The collection of the scenario's decisions.

Example:
[ { "id": "01CP3E6EJJ25J29YHZ0K4RDZH8", "title": "A development decision" } ]
colourstring

The colour of this scenario represented as a HTML hex value (e.g. "#ffa71a").

Example:"#ff0000"
versioninteger or null, (int32)

The version of the described scenario.

Example:2
associatedDevelopmentConceptIdstring or null

The development concept id which is associated with this scenario.

Example:"01CP3E6EJJ25J29YHZ0K4ANIH8"
associatedOpportunityIDsArray of strings or null
Example:
[ "01CP3E6EJJ25J29YHZ0K4ANABC", "01CP3E6EJJ25J29YHZ0K4ANDEF" ]
Response
{ "id": "01CP3E6EJJ25J29YHZ0K4RDZH8", "displayID": "S1", "title": "Minimal investment", "description": "Minimal investment development option scenario.", "lastUpdated": { "atDate": "2020-09-08T09:53:36.000Z", "byEvent": "01EHPJ54HEA77K95T5KPH5JSW9", "byUser": "user@slb.com" }, "created": { "atDate": "2020-09-08T09:53:36.000Z", "byEvent": "01EHPJ54HEA77K95T5KPH5JSW9", "byUser": "user@slb.com" }, "isSelected": false, "colour": "#ff0000", "version": 2, "associatedDevelopmentConceptId": "01CP3E6EJJ25J29YHZ0K4ANIH8", "associatedOpportunityIDs": [ "01CP3E6EJJ25J29YHZ0K4ANABC", "01CP3E6EJJ25J29YHZ0K4ANDEF" ] }