Initializing help system before first use

ScenarioResource

Exposes Scenarios to a REST API

The following resources are part of this group:

/v1/data/scenario

The following operations are supported on this resource:

POST

Creates or clones a scenario.

When the source scenario is missing a new empty scenario is created. Otherwise the source scenario is cloned.

Request Body

element: scenarioCreateParams
media types: application/json

The parameters required to create or clone the scenario.

Response Body

element: (custom)
media types: application/json

The created or cloned scenario, 412 Precondition Failed if the baseline scenario has not be run or 404 Not Found if the source scenario could not be found. 400 Bad Request if no destination is supplied, either via repository path or source scenario, or if both are supplied and refer to different projects or if an invalid scenario type is specified

POST

Imports scenarios and folders into the repository from an export (.insight) file via Multipart Form.

Response codes indicate the following:
  • 200 OK: Check the returned JSON object for the status of the operation

Request Body

element: (custom)
media types: multipart/form-data

A multipart form with the following fields:

  • scenarios-file: The project file data to upload. (Required.)
  • parent-json: JSON string of a SimpleReference for the target location (project or folder) for imported scenarios. (Required.)
  • allowed-scenario-types-json: JSON string of the array of acceptable scenario types; null or empty array if no such restriction is applied. (Optional.)

Response Body

element: scenarioImportFormResult
media types: text/plain

An object holding a status, a list of references to the imported scenarios and informational messages

GET

Lists all scenarios from all projects.

Parameters

name description type default
start Start at this position in the list query 0
maxResults The maximum number of items to return query 50

Response Body

element: webServiceBeanList
media types: application/json

A paginated list of references to scenarios.

/v1/data/scenario/{id}

The following operations are supported on this resource:

GET

Reads a scenario.

Parameters

name description type default
id The id of the scenario to read path

Response Body

element: scenario
media types: application/json

The scenario.

POST

Updates a scenario.

Note: only the name, notes, share status and owner fields can be updated through this resource.

Parameters

name description type default
id the id of the scenario to update path

Request Body

element: scenario
media types: application/json

the updates to apply to the scenario

Response Body

element: (custom)
media types: application/json

An empty response, 200 OK if successful, 404 Not Found if the scenario could not be found, 423 Status Locked if the scenario is locked and 500 Internal Server Error if the change could not be completed.

DELETE

Deletes a scenario.

The response code indicates the following:
  • 204 No Content: successful
  • 404 Not Found: the scenario does not exist
  • 423 Locked: the scenario is currently locked and cannot be deleted at this time

Parameters

name description type default
id The id of the scenario to delete path

Response Body

element: (custom)
media types: application/json

An empty response, see above for the return codes.

/v1/data/scenario/{id}/attachments

GET

Gets the list of attachments for a scenario.

Response codes indicate the following:
  • 200 OK: The response contains the list of attachments.
  • 404 Not Found: The scenario could not be found, or you do not have read access.

Parameters

name description type default
id The id of the scenario. path
start The starting index for pagination. query 0
maxResults The page size for pagination. query 1000

Response Body

element: webServiceBeanList
media types: application/json

A WebServiceBeanList object with items set to an array of Attachment objects. The array will be empty if there are no attachments.

POST

Creates a file attachment on the scenario. Accepts a multi-part form submission with a single parameter, 'attachment', containing a file attachment. The response is an Attachment object containing the metadata for the successfully uploaded attachment, or if the upload was unsuccessful, an AttachmentError object describing the error.

If an attachment already exists with the same name as the new attachment, the behaviour is determined by the overwrite parameter: if true, the existing attachment will be overwritten by the new one; if false, the new attachment will be renamed to avoid the conflict.

Response codes indicate the following:
  • 200 OK: Check JSON object to see whether the upload was successful

Parameters

name description type default
id The id of the scenario path
overwrite Whether to overwrite an existing attachment with the same name query false
tagName A valid tag to apply to the attachment at upload time query

Response Body

element: attachment
media types: text/plain

The metadata of the new attachment or an object describing the error

/v1/data/scenario/{id}/data

POST

Reads scenario summary data along with the values of multiple entities, optionally filtering the elements retrieved from arrays.

The response code indicates the following:
  • 200 OK: scenario data successfully retrieved
  • 400 Bad request: an entity or dimension were not recognised or scenario values were not in the correct format
  • 403 Forbidden: insufficient rights to read the scenario
  • 404 Not Found: the scenario does not exist

Parameters

name description type default
id The id of the scenario path

Request Body

element: scenarioDataQuery
media types: application/json

The entities to retrieve and array filters to apply

Response Body

element: scenarioData
media types: application/json

The requested scenario data

/v1/data/scenario/{id}/events

GET

Reads the events raised against a scenario.

Parameters

name description type default
id The id of the scenario path
sinceEventId (no documentation provided) query

Response Body

element: webServiceBeanList
media types: application/json

A paginated list of Events, or 404 Not Found if the scenario could not be found.

/v1/data/scenario/{id}/export

GET

Parameters

name description type default
id (no documentation provided) path

Response Body

element: (custom)
media types: application/octet-stream

(no documentation provided)

/v1/data/scenario/{id}/job

GET

Reads the ExecutionStatus of a scheduled or running job for a given scenario.

Parameters

name description type default
id The id of the scenario path

Response Body

element: executionStatus
media types: application/json

The ExecutionStatus, or a 404 Not Found if the ExecutionStatus could not be found.

DELETE

Deletes the ExecutionStatus and initiates cancelling the scenario's execution. The ExecutionStatus is deleted once the cancellation has completed.

The response code indicates the following:
  • 200 OK: successfully initiated the cancel
  • 404 Not Found: the scenario does not exist or is not currently queued
  • 423 Locked: the scenario is currently locked and cannot be scheduled for execution at this time

Parameters

name description type default
id The id of the scenario path

Response Body

element: (custom)
media types: application/json

An empty response, see above for the return codes.

/v1/data/scenario/{id}/runlog

GET

Reads a scenario's run log.

Parameters

name description type default
id The id of the scenario path

Response Body

element: (custom)
media types: text/plain

The scenario run log lines

/v1/data/scenario/{id}/attachments/data

POST

Downloads a zip file containing the given file attachments.

Response codes indicate the following:
  • 200 OK: The response contains the attachment data
  • 404 Not found: The project, scenario or attachment could not be found, or you do not have read access

Parameters

name description type default
id The id of the scenario path
attachmentIds The attachment ids to download, encoded as a JSON array of strings form

Response Body

element: (custom)
media types: application/octet-stream

The data stream

/v1/data/scenario/{id}/attachments/new

POST

Creates an attachment for a given editor, optionally including data from an editor to specify content.

Note that this has undergone a compatibility-breaking change in Insight version 4.10.1: prior to that, the data was POSTed as a multipart form, rather than as JSON.

Parameters

name description type default
id (no documentation provided) path

Request Body

element: attachmentWithEditorData
media types: application/json

Details of attachment and editor

Response Body

element: attachment
media types: application/json

The new attachment as an Attachment, or a AttachmentError if an error occurs.

/v1/data/scenario/{id}/attachments/trash

POST

Delete multiple attachments by their UUID's.

Parameters

name description type default
id The scenario containing the UUID's to delete path

Request Body

element: (custom)
media types: application/json

an array of UUID's to delete

Response Body

element: (custom)
media types: application/json

A AttachmentsDeleteResponse object containing the status of the delete operation for the various attachments.

/v1/data/scenario/{id}/attachments/{attachmentId}

The following operations are supported on this resource:

DELETE

Deletes an attachment.

Parameters

name description type default
id The id of the related scenario. path
attachmentId The id of the attachment to delete. path

Response Body

element: (custom)
media types: application/json

No content

GET

Get an attachment.

Parameters

name description type default
id The id of the related scenario. path
attachmentId The id of the attachment to get. path

Response Body

element: (custom)
media types: application/json

A WebServiceBean object.

POST

Update the attachment metadata by providing a new attachment with the updated fields, currently filename and description.

  • 200 OK: The response contains the attachment data.
  • 400 Bad Request: The updated filename was invalid.
  • 403 Forbidden: You do not have permission to modify scenario attachments.
  • 404 Not Found: The scenario or attachment does not exist, or you do not have permission to view it.

Parameters

name description type default
id The id of the scenario. path
attachmentId The id of the attachment to update. path

Request Body

element: attachment
media types: application/json

An Attachment object holding the fields with the updated data.

Response Body

element: attachment
media types: application/json

The updated attachment data.

/v1/data/scenario/{id}/data/entities

GET

Reads the value of one or more entities in a scenario.

The value of an entity can be one of:
  • String
  • Number
  • Boolean
  • Set
  • Array

Parameters

name description type default
id The id of the scenario path
name The names of the entities to read query
dimension The dimension used for all entities query

Response Body

element: (custom)
media types: application/json

The entity values, if an entity cannot be found, no result is returned for that entity. If the scenario cannot be found 404 Not Found is returned.

POST

Modifies entities within a scenario. Changes are either all applied successfully, or all rejected.

The response code indicates the following:
  • 204 No Content: scenario entities successfully modified
  • 400 Bad request: an entity or dimension were not recognised or scenario values were not in the correct format
  • 403 Forbidden: insufficient rights to modify the scenario
  • 404 Not Found: the scenario does not exist
  • 423 Locked: the scenario is currently locked and cannot be updated at this time

Parameters

name description type default
id The id of the scenario path

Request Body

element: (custom)
media types: application/json

The changes to apply to the scenario's entities

Response Body

element: (custom)
media types: application/json

An empty response with 204 NO CONTENT if successful.

/v1/data/scenario/{id}/data/scalars

GET

Reads all scalar values in a scenario.

Parameters

name description type default
id The id of the scenario path
start Start at this position in the list query 0
maxResults The maximum number of items to return query 50

Response Body

element: webServiceBeanList
media types: application/json

A paginated list of scalarValues, or 404 Not Found if the scenario could not be found.

/v1/data/scenario/{id}/attachments/{attachmentId}/data

GET

Downloads the binary data for the given file attachment.

Response codes indicate the following:
  • 200 OK: The response contains the attachment data
  • 404 Not found: The project, scenario or attachment could not be found, or you do not have read access

Parameters

name description type default
id The id of the scenario path
attachmentId The id of the attachment path

Response Body

element: (custom)
media types: *

The data stream

/v1/data/scenario/{id}/attachments/{attachmentId}/editor

GET

Begins a new attachment editor for the specified attachment, using the default editor Response codes indicate the following:

  • 200 OK: The response contains the editor info
  • 404 Not found: The scenario or attachment could not be found, or you do not have read access, or no editor found

Parameters

name description type default
id The id of the scenario to which the attachment belongs path
attachmentId The id of tha attachment to edit path

Response Body

element: (custom)
media types: application/json

Response containing editor specific properties which the view should use to display the editor

/v1/data/scenario/{id}/data/arrays/{arrayName}

POST

Modifies the elements in an array.

Response codes indicate the following:
  • 204 No Content: Update successful
  • 400 Bad Request: There was a problem parsing one of the values supplied
  • 403 Forbidden: insufficient rights to modify the scenario
  • 404 Not Found: The scenario or entity could not be found
  • 423 Locked: The scenario is currently locked so could not be updated

Parameters

name description type default
id The scenario's Id path
arrayName The name of the array to update path

Request Body

element: (custom)
media types: application/json

The changes to apply to the array, such as the elements to add or remove

Response Body

element: (custom)
media types: application/json

An empty response, response codes detailed above.

/v1/data/scenario/{id}/data/entity/{entityName}

GET

Reads the value of an entity in a scenario.

The value of an entity can be one of:
  • String
  • Number
  • Boolean
  • Set
  • Array

Parameters

name description type default
id The id of the scenario path
entityName The name of the entity to read path

Response Body

element: (custom)
media types: application/json

The value of the entity, or 404 Not Found if the scenario or entity could not be found.

/v1/data/scenario/{id}/data/entity/{scalarName}

PUT

Modifies a scalar value.

Response codes indicate the following:
  • 204 No Content: Update successful
  • 400 Bad Request: The scalar value could not be parsed
  • 404 Not Found: The scenario or entity could not be found
  • 423 Locked: The scenario is currently locked so could not be updated

Parameters

name description type default
id The id of the scenario path
scalarName The name of the scalar to update path

Request Body

element: (custom)
media types: application/json

(no documentation provided)

Response Body

element: (custom)
media types: application/json

An empty response, see description for details of the response codes.

/v1/data/scenario/{id}/data/sets/{setName}

POST

Modifies a set, adding or removing its items.

Response codes indicate the following:
  • 204 No Content: Update successful
  • 400 Bad Request: There was a problem parsing one of the values supplied
  • 403 Forbidden: insufficient rights to modify the scenario
  • 404 Not Found: The scenario or entity could not be found
  • 423 Locked: The scenario is currently locked so could not be updated

Parameters

name description type default
id The id of the scenario path
setName The name of the set to update path

Request Body

element: setDelta
media types: application/json

The items to add and remove from the set

Response Body

element: (custom)
media types: application/json

An empty response, see description for details of the response codes.

/v1/data/scenario/{id}/attachments/{attachmentId}/editor/{editorId}

GET

Begins a new attachment editor for the specified attachment Response codes indicate the following:

  • 200 OK: The response contains the editor info
  • 404 Not found: The scenario or attachment could not be found, or you do not have read access, or no editor found

Parameters

name description type default
id The id of the scenario to which the attachment belongs path
attachmentId The id of the attachment to edit path
editorId The id of the editor to use path

Response Body

element: (custom)
media types: application/json

Response containing editor specific properties which the view should use to display the editor

POST

Parameters

name description type default
id (no documentation provided) path
attachmentId (no documentation provided) path
editorId (no documentation provided) path

Request Body

element: (custom)
media types: application/json

(no documentation provided)

Response Body

element: (custom)
media types: application/json

(no documentation provided)

/v1/data/scenario/{id}/data/arrays/{arrayName}/filtered

POST

Reads part of an array by filtering the array's elements based on the values in the element keys.

At times it is desirable to only retrieve a slice of an array, i.e. only retrieve the elements for a subset of an array's index values. The indexFilters parameter contains the values to use for each index set. If indexFilters does not specify a particular index set then all values in the index set are used.

Parameters

name description type default
id the id of the scenario path
arrayName the name of the array to read path

Request Body

element: arrayFilter
media types: application/json

the filter to apply when reading the array

Response Body

element: (custom)
media types: application/json

the JAX-RS response

/v1/data/scenario/{id}/data/arrays/{arrayName}/query

POST

Queries an array, retrieving the elements as a paged list in index set order.

Parameters

name description type default
id the id of the scenario path
arrayName the name of the array to query path
pageSize the number of array elements to fetch query

Request Body

element: queryArrayOptions
media types: application/json

options for querying the array

Response Body

element: (custom)
media types: application/json

A list of array elements, 404 Not Found if the scenario or entity could not be found.

/v1/data/scenario/{id}/data/arrays/{arrayName}/{dimension}

POST

Modifies the elements of a specific dimension in an array.

Response codes indicate the following:
  • 204 No Content: Update successful
  • 400 Bad Request: There was a problem parsing one of the values supplied
  • 403 Forbidden: insufficient rights to modify the scenario
  • 404 Not Found: The scenario or entity could not be found
  • 423 Locked: The scenario is currently locked so could not be updated

Parameters

name description type default
id The scenario's Id path
arrayName The name of the array to update path
dimension The dimension of the set to update path

Request Body

element: (custom)
media types: application/json

The changes to apply to the array, such as the elements to add or remove

Response Body

element: (custom)
media types: application/json

An empty response, response codes detailed above.

/v1/data/scenario/{id}/data/entity/{entityName}/{dimension}

GET

Reads the value of an entity in a scenario using a specific dimension.

The value of an entity can be one of:
  • String
  • Number
  • Boolean
  • Set
  • Array

Parameters

name description type default
id The id of the scenario path
entityName The name of the entity to read path
dimension The dimension of the entity path

Response Body

element: (custom)
media types: application/json

The value of the entity, or 404 Not Found if the scenario or entity could not be found.

/v1/data/scenario/{id}/data/entity/{scalarName}/{dimension}

PUT

Modifies a specific dimension of a scalar value.

Response codes indicate the following:
  • 204 No Content: Update successful
  • 400 Bad Request: The scalar value could not be parsed
  • 404 Not Found: The scenario or entity could not be found
  • 423 Locked: The scenario is currently locked so could not be updated

Parameters

name description type default
id The id of the scenario path
scalarName The name of the scalar to update path
dimension The dimension to update path

Request Body

element: (custom)
media types: application/json

(no documentation provided)

Response Body

element: (custom)
media types: application/json

An empty response, see description for details of the response codes.

/v1/data/scenario/{id}/data/sets/{setName}/{dimension}

POST

Modifies a specific dimension of a set, adding or removing its items.

Response codes indicate the following:
  • 204 No Content: Update successful
  • 400 Bad Request: There was a problem parsing one of the values supplied
  • 403 Forbidden: insufficient rights to modify the scenario
  • 404 Not Found: The scenario or entity could not be found
  • 423 Locked: The scenario is currently locked so could not be updated

Parameters

name description type default
id The id of the scenario path
setName The name of the set to update path
dimension The dimension of the set to update path

Request Body

element: setDelta
media types: application/json

The items to add and remove from the set

Response Body

element: (custom)
media types: application/json

An empty response, see description for details of the response codes.

/v1/data/scenario/{id}/data/arrays/{arrayName}/{dimension}/filtered

POST

Reads part of an array by filtering the array's elements based on the values in the element keys.

At times it is desirable to only retrieve a slice of an array, i.e. only retrieve the elements for a subset of an array's index values. The indexFilters parameter contains the values to use for each index set. If indexFilters does not specify a particular index set then all values in the index set are used.

Parameters

name description type default
id the id of the scenario path
arrayName the name of the array to read path
dimension The dimension of the array to read path

Request Body

element: arrayFilter
media types: application/json

the filter to apply when reading the array

Response Body

element: (custom)
media types: application/json

the JAX-RS response

/v1/data/scenario/{id}/data/arrays/{arrayName}/{dimension}/query

POST

Queries a specific dimension of an array, retrieving the elements as a paged list in index set order.

Parameters

name description type default
id the id of the scenario path
arrayName the name of the array to query path
dimension the dimension of the array to query path
pageSize the number of array elements to fetch query

Request Body

element: queryArrayOptions
media types: application/json

options for querying the array

Response Body

element: (custom)
media types: application/json

A list of array elements, 404 Not Found if the scenario or entity could not be found.

/v1/data/scenario/{id}/attachments/{attachmentId}/editor/{editorId}/command/{commandId}

GET

Parameters

name description type default
id (no documentation provided) path
attachmentId (no documentation provided) path
editorId (no documentation provided) path
commandId (no documentation provided) path

Response Body

element: (custom)
media types: *

(no documentation provided)

/v1/data/scenario/{id}/attachments/{attachmentId}/editor/{editorId}/command/{commandType}

POST

Parameters

name description type default
id (no documentation provided) path
attachmentId (no documentation provided) path
editorId (no documentation provided) path
commandType (no documentation provided) path

Request Body

element: (custom)
media types: application/json

(no documentation provided)

Response Body

element: (custom)
media types: *

(no documentation provided)

© 2001-2020 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.