Create a Scenario

Creates a scenario and returns its summary.

Unknown JSON properties are ignored. name and inheritanceMethod are required. inheritanceMethod is case-insensitive and accepts STANDALONE, INHERITS, INPUT_ONLY, or INPUT ONLY. useActuals is optional and accepts NEVER, IN_HISTORY, WHEN_AVAILABLE, IN HISTORY, or WHEN AVAILABLE. For INHERITS, parentScenario is required and must name an existing scenario; non-null parentScenario and inheritedScenarios values are rejected for INPUT_ONLY and STANDALONE. INPUT_ONLY requires useActuals=NEVER. Accounts that support input versions may be supplied for INHERITS and INPUT_ONLY; STANDALONE rejects any non-null accounts list. Invalid inheritance combinations or accounts that do not support input versions return HTTP 422. Unknown referenced scenarios or account IDs return HTTP 404.

Required Roles

Service Administrator

REST Resource

POST /HyperionPlanning/rest/sm/v1/applications/{application}/models/{model}/scenarios

Request

Parameters:

Table 3-723 Parameters

Name Description Type Required Default
name The name of the new scenario. Minimum length: 11 Path Yes None
description An optional description of the scenario. Path No None
inheritanceMethod The scenario inheritance method. Values are accepted case-insensitively; INPUT ONLY is also accepted. Path Yes None
useActuals Specifies when actual values are used. Defaults to NEVER when omitted. Must be NEVER when inheritanceMethod is INPUT_ONLY. Values are accepted case-insensitively; IN HISTORY and WHEN AVAILABLE are also accepted. Default: NEVER Path No None
parentScenario Name of an existing parent scenario. Required and must be non-blank when inheritanceMethod is INHERITS. A non-null value is rejected for INPUT_ONLY and STANDALONE. Minimum length: 1 Path No None
inheritedScenarios Additional existing scenarios from which to inherit. A non-null list, including an empty list, is allowed only when inheritanceMethod is INHERITS; otherwise it is rejected. Path No None
accounts Existing account IDs to include. Accounts must support input versions. A non-null list is allowed for INHERITS and INPUT_ONLY; any non-null list, including an empty list, is rejected for STANDALONE. Path No None

Example URL:

https://<BASE-URL>/HyperionPlanning/rest/sm/v1/applications/Sample/models/M1/scenarios

Request body

{
  "name": "SM New SCEN",
  "description": "Sample Scenario",
  "inheritanceMethod": "INHERITS",
  "useActuals": "NEVER",
  "parentScenario": "Base",
  "accounts": [
    "V2000"
  ]
}

Response

Supported Media Types: application/json

Table 3-724 Parameters

Name Description
name Name of the returned resource.
links Links related to the resource or result.
links[].href Link to the API call.
links[].action HTTP call type.
links[].rel Relationship type for the link.
links[].data Additional link data, if supplied.

Example of Response body

{
  "name": "SM New SCEN",
  "links": [
    {
      "href": "https://<BASE-URL>/HyperionPlanning/rest/sm/v1/applications/Sample/models/M1/scenarios/SM%20New%20SCEN",
      "action": "GET",
      "rel": "canonical",
      "data": null
    }
  ]
}

Table 3-725 Status Codes

Code Description
400 Invalid request, malformed query JSON, invalid parameter, or service validation failure.
401 Authentication is required.
403 The authenticated caller is not authorized.
404 Application or requested sub-resource was not found.
409 The requested mutation conflicts with current model state.
422 The required scenario or period query parameter is missing or empty.
500 Unexpected server error.

Sample cURL Command

curl -X POST -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json' --data '{"name":"SM New SCEN","description":"Sample Scenario","inheritanceMethod":"INHERITS","useActuals":"NEVER","parentScenario":"Base","accounts":["V2000"]}' 'https://<BASE-URL>/HyperionPlanning/rest/sm/v1/applications/Sample/models/M1/scenarios'