Scenarios
GET /insightservices/rest/v1/data/scenario/{scenarioId}
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | the id of the scenario |
path | string (uuid) |
Responses
application/json
- 200 OK
-
Type: ScenarioV1
Responds with the retrieved scenario
- 404 Not Found
-
The scenario is unavailable to the current user
POST /insightservices/rest/v1/data/scenario/{scenarioId}
The payload contains the updates to apply to the scenario. They are all optional. The displayName attribute specifies the new preferred name for the scenario; a suffix will be applied to ensure its name is unique among its siblings. The share status and owner attributes control visibility of the scenario. When the share status is set to PRIVATE and no owner is supplied then the current user becomes the owner to ensure they do not lose access to the scenario. The scenario id attribute is optional, but if it is supplied then it must match the id in the URL. The objectType is optional, but if it is supplied then it must be SCENARIO. All other attributes are ignored. Security: SCENARIO_EDIT is required to change the folder name, SCENARIO_SHARE is required to change the share status, and SCENARIO_OWNER is required to change the owner, and the user must have write access to the scenario.
Request Body
application/json
Type: ScenarioV1
the updates to apply
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | the id of the scenario |
path | string (uuid) |
Responses
application/json
- 200 OK
-
Type: ScenarioV1
Responds with the successfully updated scenario
- 403 Forbidden
-
The current user is not authorized to update this scenario
- 404 Not Found
-
The scenario is unavailable to the current user
- 422 Unprocessable Entity
-
Validation of the requested changes failed. e.g. the displayName was too long.
DELETE /insightservices/rest/v1/data/scenario/{scenarioId}
Deletes a scenario along with its data, attachments, run log etc. If a job exists for the scenario it will also be deleted
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 204 No Content
-
Scenario successfully deleted
- 403 Forbidden
-
The current user is not authorized to delete this scenario
- 404 Not Found
-
The scenario is unavailable to the current user
GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: WebServiceBeanListV1«AttachmentV1»
Returns a WebServicesBeanList of Attachments
- 404 Not Found
-
Scenario not found
POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments
The attachment filename must conform to the following rules:
- length between 1 and 255 characters (in UTF-16)
- must not begin or end with a whitespace character
- must not contain any ISO Control Characters
- must not contain any of the characters \/?*:|<>"
Request Body
multipart/form-data
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
attachment | formData | object | ||
fileSize | formData | object | ||
filename | formData | object | ||
originalFilename | formData | object | ||
overwrite | formData | object | ||
scenarioId | scenarioId |
path | string (uuid) | required |
tagName | formData | object |
Responses
application/json
- 200 OK
-
Type: AttachmentV1
an Attachment is returned (with an existing ID if an attachment was overwritten)
- 400 Bad Request
-
request is not well-formed
- 403 Forbidden
-
user does not have write access to the scenario
- 404 Not Found
-
user does not have access to the scenario
- 413 Request Entity Too Large
-
uploaded file is too large
- 422 Unprocessable Entity
-
request is not well-formed
POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/data
The successful response depends on the number of attachments requested:
- No attachments: returns a 204 NO_CONTENT response
- One attachment: downloads that one attachment (type application/octet-stream)
- More than one attachment: downloads all the files together as a zip in a file named after the scenario
Request Body
application/x-www-form-urlencoded
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
attachmentIds | IDs of attachments to download |
formData | string | |
attachmentUuids | formData | string[] , multiple parameters (attachmentUuids=aaa&attachmentUuids=bbb ) |
||
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json application/octet-stream application/zip
- 200 OK
-
Binary stream of file contents (single file or zip)
- 204 No Content
-
No attachments requested
- 403 Forbidden
-
Access denied
- 404 Not Found
-
Scenario or attachment not found
POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/new
Request Body
application/json
Type: AttachmentWithEditorDataV1
attachmentWithEditorData
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: AttachmentV1
Returns a new attachment
- 403 Forbidden
-
Access denied
- 404 Not Found
-
App not found
- 422 Unprocessable Entity
-
request is not well-formed
POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/trash
Request Body
application/json
Type:
attachmentIds
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: AttachmentsDeleteResponseV1
Returns a list of successes and failures
- 403 Forbidden
-
Access denied
- 404 Not Found
-
Scenario not found
GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
attachmentId | attachmentId |
path | string (uuid) | required |
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: AttachmentV1
Single Attachment
- 404 Not Found
-
Scenario or attachment not found
POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}
Request Body
application/json
Type: AttachmentV1
attachment
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
attachmentId | attachmentId |
path | string (uuid) | required |
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: AttachmentV1
OK
DELETE /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
attachmentId | attachmentId |
path | string (uuid) | required |
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 204 No Content
-
Returns no content if successful
- 403 Forbidden
-
Access denied
- 404 Not Found
-
Scenario or attachment not found
GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}/data
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
attachmentId | attachmentId |
path | string (uuid) | required |
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: InputStreamResource
Binary stream of file contents
- 404 Not Found
-
Scenario or attachment not found
GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}/editor
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
attachmentId | attachmentId |
path | string (uuid) | required |
editorId | editorId |
path | string | |
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: AttachmentEditorDetailsV1
Returns attachment editor details
- 404 Not Found
-
Scenario, attachment or editor not found
GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}/editor/{editorId}
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
attachmentId | attachmentId |
path | string (uuid) | required |
editorId | editorId |
path | string | required |
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: AttachmentEditorDetailsV1
Returns attachment editor details
- 404 Not Found
-
Scenario, attachment or editor not found
POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}/editor/{editorId}
Request Body
application/json
editorPropertiesJson
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
attachmentId | attachmentId |
path | string (uuid) | required |
editorId | editorId |
path | string | required |
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: AttachmentEditorProperties
Returns new attachment editor properties
- 404 Not Found
-
Scenario, attachment or editor not found
GET /insightservices/rest/v1/data/scenario/{scenarioId}/computeJob
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: ComputeJobV1
Responds with the retrieved ComputeJob
- 404 Not Found
-
DocumentNotFound if there is no scenario or compute job related to the scenario
GET /insightservices/rest/v1/data/scenario/{scenarioId}/job
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: ExecutionStatusV1
OK
DELETE /insightservices/rest/v1/data/scenario/{scenarioId}/job
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: ExecutionStatusV1
OK
GET /insightservices/rest/v1/data/scenario/{scenarioId}/jobMetrics
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: JobMetricsDto
OK
GET /insightservices/rest/v1/data/scenario/{scenarioId}/runLog
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: Resource
OK
GET /insightservices/rest/v1/data/scenario/{scenarioId}/runlog
Request Parameters
Name | Description | Type | Data Type | |
---|---|---|---|---|
scenarioId | scenarioId |
path | string (uuid) | required |
Responses
application/json
- 200 OK
-
Type: Resource
OK
Properties
- properties: AttachmentEditorProperties
-
- url: string
-
Properties
- dataUrl: string
-
The URL from which the attachment contents can be downloaded
- description: string
-
A description of this attachment
- editors: object[]
-
This attachment's editors
Array of EditorV1 - filename: string
-
The file name of this attachment
- hidden: boolean
-
Whether the attachment is hidden
- lastModifiedDate: string (date-time)
-
The timestamp of when the attachment contents were last modified
- lastModifiedUser: string
-
- objectType: string , x ∈ { ATTACHMENT }
-
- ownerId: string
-
The id of the user that owns this item
Example: "d26d907d-941b-45dd-aabc-b7cf5a53caa7"
- parent: SimpleReferenceV1
-
The parent of this attachment - must have objectType of either PROJECT or SCENARIO
- path: string
-
The path within the repository, if applicable
Example: "app-name/folder-1-name/folder-2-name"
- project: SimpleReferenceV1
-
The app that this item belongs to, if applicable - must have objectType PROJECT
- shareStatus: string , x ∈ { PRIVATE , READONLY , FULLACCESS }
-
The share status of this item, if applicable
- size: integer (int64)
-
The size this attachment data in bytes
- tags: string[]
-
The tags which are present on this attachment
Array of string - id: string
-
The id of this item
Example: "21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
- displayName: string
-
The name of this item
Example: "Item name"
- url: string
-
The URL of this item
Example: "/insightservices/rest/v1/item/21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
Properties
- attachmentEditorPropertiesJson: string
-
- attachmentInfo: AttachmentV1
-
- editorId: string
-
Response from a multi-attachment deletion operation
Properties
- failed: object
-
A map, indexed by attachment ID, of the failed delete operations
- success: string[]
-
The IDs of attachments that were successfully deleted
Array of string
Properties
- computeJobType: string
-
The compute job type
Example: "MOSEL|SOLVER"
- dependency: string
-
Name of a dependency zip. Must match the name of a dependency uploaded to the compute app.
Example: "mydependency.zip"
- metricsUrl: string
-
- modelStatus: string
-
- mosel: ComputeMoselV1
-
Specify any mosel specific options if the type of the job is MOSEL
- ownerId: string
-
The id of the user that owns this item
Example: "d26d907d-941b-45dd-aabc-b7cf5a53caa7"
- ownerName: string
-
- parent: SimpleReferenceV1
-
The parent of this item, if applicable - must have objectType PROJECT or FOLDER
- path: string
-
The path within the repository, if applicable
Example: "app-name/folder-1-name/folder-2-name"
- payloadUrl: string
-
- prettyStatus: string
-
- project: SimpleReferenceV1
-
The app that this item belongs to, if applicable - must have objectType PROJECT
- resultUrl: string
-
- runLogMessages: boolean
-
True indicates that incremental run log messages should be sent to the web socket for the client that submitted this request.
- runlogUrl: string
-
- shareStatus: string , x ∈ { PRIVATE , READONLY , FULLACCESS }
-
The share status of this item, if applicable
- solver: ComputeSolverV1
-
Specify any solver specific options if the type of the job is SOLVER
- status: string
-
- objectType: string , x ∈ { SCENARIO , PROJECT , MODEL_SCHEMA , USER , PROJECT_USER , VIRTUAL_SCENARIO_GROUP , EXECUTION_STATUS , EXECUTION_REQUEST , FOLDER , VIEW , TABLEAU_WORKBOOK , SCENARIO_RUN_LOG , ATTACHMENT , EXECUTION_WORKER , EXECUTION_SERVICE , EXECUTION_WORKER_MAPPING , AUTHORITY_GROUP , USER_PROFILE , PORTATION , MIRROR_REQUEST , MIRROR_REQUEST_STATUS , MIRROR_DESCRIPTOR_STATUS , COMPUTE_JOB }
-
The type of object
Example: "SCENARIO"
- id: string
-
The id of this item
Example: "21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
- displayName: string
-
The name of this item
Example: "Item name"
- url: string
-
The URL of this item
Example: "/insightservices/rest/v1/item/21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
Properties
- action: string
-
- callbacks: string[]
-
Array of string - controls: object
-
string - flags: string[]
-
Array of string - problemType: string
-
- resultsToInclude: string[]
-
Array of string
Properties
- badExtensions: string[]
-
Array of string - canCreateNewFiles: boolean
-
- displayName: string
-
- goodExtensions: string[]
-
Array of string - hasDirtyFlag: boolean
-
- id: string
-
- url: string
-
Properties
- causeOfFailure: string
-
- executionAttempts: integer (int32)
-
- executionMode: string
-
- executionService: string
-
- executionTime: integer (int32)
-
- executionWorker: string
-
- failureCount: integer (int32)
-
- gap: number (double)
-
- jobType: string , x ∈ { RUN , LOAD }
-
- modelName: string
-
- modelStatus: string
-
- numberOfSolutions: integer (int32)
-
- numberOfThreads: integer (int32)
-
- objectType: string , x ∈ { EXECUTION_STATUS }
-
- objective: number (double)
-
- optimizationService: string
-
- ownerId: string
-
The id of the user that owns this item
Example: "d26d907d-941b-45dd-aabc-b7cf5a53caa7"
- parent: SimpleReferenceV1
-
The parent of this item, if applicable - must have objectType PROJECT or FOLDER
- path: string
-
The path within the repository, if applicable
Example: "app-name/folder-1-name/folder-2-name"
- prettyStatus: string
-
- project: SimpleReferenceV1
-
The app that this item belongs to, if applicable - must have objectType PROJECT
- scenario: ReferenceV1
-
- scenarioName: string
-
- scenarioOwner: string
-
- shareStatus: string , x ∈ { PRIVATE , READONLY , FULLACCESS }
-
The share status of this item, if applicable
- solverStatus: string
-
- status: string
-
- id: string
-
The id of this item
Example: "21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
- displayName: string
-
The name of this item
Example: "Item name"
- url: string
-
The URL of this item
Example: "/insightservices/rest/v1/item/21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
Details a failed attempt to delete an attachment
Properties
- message: string
-
The error message produced by the failed delete operation
- status: string
-
The HTTP status code of the failed delete operation
Properties
- duration: integer (int64)
-
- execution: JobStageDto
-
- queued: JobStageDto
-
- startTime: integer (int64)
-
- version: integer (int64)
-
- worker: JobStageDto
-
Properties
- duration: integer (int64)
-
- metrics: object
- phase: string
-
- startTime: integer (int64)
-
Properties
- count: integer (int32)
-
- dataSize: integer (int64)
-
- duration: integer (int64)
-
- recordingStartTime: integer (int64)
-
Properties
- duration: integer (int64)
-
- phases: object[]
-
Array of JobPhaseDto - startTime: integer (int64)
-
Properties
- ownerId: string
-
The id of the user that owns this item
Example: "d26d907d-941b-45dd-aabc-b7cf5a53caa7"
- parent: SimpleReferenceV1
-
The parent of this item, if applicable - must have objectType PROJECT or FOLDER
- path: string
-
The path within the repository, if applicable
Example: "app-name/folder-1-name/folder-2-name"
- project: SimpleReferenceV1
-
The app that this item belongs to, if applicable - must have objectType PROJECT
- shareStatus: string , x ∈ { PRIVATE , READONLY , FULLACCESS }
-
The share status of this item, if applicable
- objectType: string , x ∈ { SCENARIO , PROJECT , MODEL_SCHEMA , USER , PROJECT_USER , VIRTUAL_SCENARIO_GROUP , EXECUTION_STATUS , EXECUTION_REQUEST , FOLDER , VIEW , TABLEAU_WORKBOOK , SCENARIO_RUN_LOG , ATTACHMENT , EXECUTION_WORKER , EXECUTION_SERVICE , EXECUTION_WORKER_MAPPING , AUTHORITY_GROUP , USER_PROFILE , PORTATION , MIRROR_REQUEST , MIRROR_REQUEST_STATUS , MIRROR_DESCRIPTOR_STATUS , COMPUTE_JOB }
-
The type of object
Example: "SCENARIO"
- id: string
-
The id of this item
Example: "21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
- displayName: string
-
The name of this item
Example: "Item name"
- url: string
-
The URL of this item
Example: "/insightservices/rest/v1/item/21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
Properties
- completed: boolean
-
Indicates the scenario has completed execution
- creationDate: string (date-time)
-
The date this scenario was created
- dirty: boolean
-
Indicates the scenario result data is dirty. Result data is considered dirty if the scenario input data has been modified since the scenario was last executed, and the scenario is not configured to remove result data when input data is modified.
- displayName: string
-
Example: "Scenario name"
- gap: number (double)
-
The gap for this scenario
- hasResultData: boolean
-
Indicates the scenario has result data
- id: string
-
The id of this scenario
Example: "5aff41c9-221e-49a9-aed9-1e848e2a89ae"
- lastExecutionDate: string (date-time)
-
The date this scenario was last loaded or executed
- loaded: boolean
-
Indicates the scenario has been loaded and therefore has input data
- modelDataVersion: integer (int32)
-
The version number of the model data
- modelStatus: string
-
The model status for this scenario
- notes: string
-
The notes on this scenario
- numberOfSolutions: integer (int32)
-
The number of solutions found for this scenario
- objectType: string , x ∈ { SCENARIO }
-
- objective: number (double)
-
The objective result for this scenario
- ownerId: string
-
The id of the user that owns this item
Example: "d26d907d-941b-45dd-aabc-b7cf5a53caa7"
- parent: SimpleReferenceV1
-
The parent of this scenario
- path: string
-
The path within the repository, if applicable
Example: "app-name/folder-1-name/folder-2-name"
- problemStatus: string
-
The problem status for this scenario
- project: SimpleReferenceV1
-
The app that this item belongs to, if applicable - must have objectType PROJECT
- projectId: string
-
The id of the app that owns this scenario
- queued: boolean
-
Indicates this scenario is queued for execution
- runtime: number (double)
-
The runtime for the last execution of this scenario
- scenarioType: string
-
The scenario type: If scenario is of a custom type this will be the name of that type, otherwise this will be SCENARIO.
- shareStatus: string , x ∈ { PRIVATE , READONLY , FULLACCESS }
-
The share status of this item, if applicable
- url: string
-
The URL of this scenario
Example: "/insightservices/rest/v1/admin/scenario/5aff41c9-221e-49a9-aed9-1e848e2a89ae"
Properties
- objectType: string , x ∈ { SCENARIO , PROJECT , MODEL_SCHEMA , USER , PROJECT_USER , VIRTUAL_SCENARIO_GROUP , EXECUTION_STATUS , EXECUTION_REQUEST , FOLDER , VIEW , TABLEAU_WORKBOOK , SCENARIO_RUN_LOG , ATTACHMENT , EXECUTION_WORKER , EXECUTION_SERVICE , EXECUTION_WORKER_MAPPING , AUTHORITY_GROUP , USER_PROFILE , PORTATION , MIRROR_REQUEST , MIRROR_REQUEST_STATUS , MIRROR_DESCRIPTOR_STATUS , COMPUTE_JOB }
-
The type of object
Example: "SCENARIO"
- id: string
-
The id of this item
Example: "21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
- displayName: string
-
The name of this item
Example: "Item name"
- url: string
-
The URL of this item
Example: "/insightservices/rest/v1/item/21384a4b-2c4a-4ce2-9f78-87c967ebe06e"
Properties
- start: integer (int32)
-
The start position of this list
Example: 2
- maxResults: integer (int32)
-
The maximum number of items to include in this list
Example: 7
- items: object[]
-
The items in this list
Array of AttachmentV1
© 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.