Initializing help system before first use

Scenarios

Operation Description
GET /insightservices/rest/v1/data/scenario/{scenarioId}

Get a scenario

POST /insightservices/rest/v1/data/scenario/{scenarioId}

Update a scenario

DELETE /insightservices/rest/v1/data/scenario/{scenarioId}

Delete a scenario

GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments

Returns list of attachments held on a scenario

POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments

Upload an attachment to a scenario

POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/data

Downloads the binary data stored in attachments held on a scenario

POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/new

Creates a new attachment

POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/trash

Deletes scenario attachments

GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}

Returns details of attachment held on a scenario

POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}

Updates the metadata of an existing attachment

DELETE /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}

Deletes a scenario attachment

GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}/data

Returns the binary data stored in attachment held on a scenario

GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}/editor

Returns attachment editor details

GET /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}/editor/{editorId}

Returns attachment editor details

POST /insightservices/rest/v1/data/scenario/{scenarioId}/attachments/{attachmentId}/editor/{editorId}

Saves attachment content changes from editor

GET /insightservices/rest/v1/data/scenario/{scenarioId}/computeJob

Get a ComputeJob

GET /insightservices/rest/v1/data/scenario/{scenarioId}/job

getJobByScenarioId

DELETE /insightservices/rest/v1/data/scenario/{scenarioId}/job

cancelJobByScenarioId

GET /insightservices/rest/v1/data/scenario/{scenarioId}/jobMetrics

getJobMetrics

GET /insightservices/rest/v1/data/scenario/{scenarioId}/runLog

getRunLog

GET /insightservices/rest/v1/data/scenario/{scenarioId}/runlog

getRunLog

GET /insightservices/rest/v1/data/scenario/{scenarioId}

Get a scenario

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}

Update a scenario

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}

Delete a scenario

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

Returns list of attachments held on a scenario

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

Upload an attachment to a scenario

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

Downloads the binary data stored in attachments held on a scenario

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

Creates a new attachment

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

Deletes scenario attachments

Request Body

application/json

Type:

Array of string (uuid)

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}

Returns details of attachment held on a scenario

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}

Updates the metadata of an existing attachment

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}

Deletes a scenario attachment

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

Returns the binary data stored in attachment held on a scenario

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

Returns attachment editor details

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}

Returns attachment editor details

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}

Saves attachment content changes from editor

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

Get a 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

getJobByScenarioId

Request Parameters

Name Description Type Data Type
scenarioId

scenarioId

path string (uuid) required

Responses

application/json

200 OK

DELETE /insightservices/rest/v1/data/scenario/{scenarioId}/job

cancelJobByScenarioId

Request Parameters

Name Description Type Data Type
scenarioId

scenarioId

path string (uuid) required

Responses

application/json

200 OK

GET /insightservices/rest/v1/data/scenario/{scenarioId}/jobMetrics

getJobMetrics

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

getRunLog

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

getRunLog

Request Parameters

Name Description Type Data Type
scenarioId

scenarioId

path string (uuid) required

Responses

application/json

200 OK
Type: Resource

OK

AttachmentEditorDetailsV1: object

Properties

properties: AttachmentEditorProperties
url: string

AttachmentEditorProperties: object

AttachmentV1: object

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"

AttachmentWithEditorDataV1: object

Properties

attachmentEditorPropertiesJson: string
attachmentInfo: AttachmentV1
editorId: string

AttachmentsDeleteResponseV1: object

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

ComputeJobV1: object

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"

ComputeMoselV1: object

Properties

parameters: object
string

ComputeSolverV1: object

Properties

action: string
callbacks: string[]
Array of string
controls: object
string
flags: string[]
Array of string
problemType: string
resultsToInclude: string[]
Array of string

EditorV1: object

Properties

badExtensions: string[]
Array of string
canCreateNewFiles: boolean
displayName: string
goodExtensions: string[]
Array of string
hasDirtyFlag: boolean
id: string
url: string

ExecutionStatusV1: object

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"

Failure: object

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

JobMetricsDto: object

Properties

duration: integer (int64)
execution: JobStageDto
queued: JobStageDto
startTime: integer (int64)
version: integer (int64)
worker: JobStageDto

JobPhaseDto: object

Properties

duration: integer (int64)
metrics: object
phase: string
startTime: integer (int64)

JobPhaseMetricDto: object

Properties

count: integer (int32)
dataSize: integer (int64)
duration: integer (int64)
recordingStartTime: integer (int64)

JobStageDto: object

Properties

duration: integer (int64)
phases: object[]
Array of JobPhaseDto
startTime: integer (int64)

ReferenceV1: object

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"

ScenarioV1: object

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"

SimpleReferenceV1: object

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"

WebServiceBeanListV1«AttachmentV1»: object

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