Initializing help system before first use

# insightapi2~modify_scenario_data

Purpose
Modify the scenario data. The data is modified by supplying a list of entity deltas. These entity deltas contain only the elements that are added, removed or changed. The scenario data cannot be modified if the scenario is in the job queue. Security: SCENARIO_EDIT is required to modify the scenario data and the user must have write access to the scenario.
Synopsis
`procedure modify_scenario_data(client:insightapi2~insightconfig, req:insightapi2~httprequest, resp:insightapi2~httpresponse)`
`procedure modify_scenario_data(client:insightapi2~insightconfig, id:text, body:insightapi2~scenario_data_modification, resp:insightapi2~httpresponse)`
`procedure modify_scenario_data(client:insightapi2~insightconfig, id:text, body:insightapi2~scenario_data_modification)`
Arguments

client | An initialized insightapi2~insightconfig to call
req | An initialized insightapi2~httprequest record. The body field may be populated with a value of type insightapi2~scenario_data_modification. The params field may contain these indexes:
id | The scenario ID
id | The scenario ID
body | The changes to apply
resp | A insightapi2~httpresponse record into which will be written a description of the response

Further information
1. Use the status field of the resp record to distinguish between different status codes returned by the operation, or the success attribute to check for 2xx status codes. If the resp record is not passed to this procedure, the model will abort with a runtime error if the response's status code does not indicate success. The expected responses from this operation are:

HTTP Status Code | Response body type | Description
--- | --- | ---
204 |  | The scenario data was modified
403 |  | The current user did not have permission to modify the scenario data
404 | insightapi2~error_response | The scenario did not exist or was unavailable to the current user
422 | insightapi2~error_response | The modification contained an invalid change that could not be applied
423 | insightapi2~error_response | The scenario is already in the job queue

2. If the response body could be read into a Mosel variable, it would be written to the body field of the resp record, and the bodyfilename field of the resp record will be an empty string.
3. If the bodyfilename field of the resp record is set to a non-empty value on return, this will be a file containing the response body; the caller is responsible for deleting this file when it is no longer required.
Related topics
insightapi2~error_response
insightapi2~scenario_data_modification
insightapi2~insightconfig
insightapi2~httprequest
insightapi2~httpresponse
Parent Topic Scenarios Operations

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.