Skip to main content

Scenario Run API Reference

The Scenario Run API lets you trigger an economics run on an existing scenario and poll for the result. All run operations are asynchronous: the POST endpoint returns immediately with a jobId, and you use the GET endpoint to track progress.

Endpoints are nested under a project's scenario:

POST /v1/projects/:projectId/scenarios/:scenarioId/run
GET /v1/projects/:projectId/scenarios/:scenarioId/run/:jobId

The results of a completed run are read through the existing Econ Runs endpoints (one-liners, monthly exports, monthly econ results) using the econRunId returned in the run status result.


Triggering a Run​

POST /v1/projects/:projectId/scenarios/:scenarioId/run

Submits an asynchronous economics run. Returns 202 Accepted immediately with a jobId.

Path Parameters​

ParameterDescription
projectIdObjectId of the project containing the scenario
scenarioIdObjectId of the scenario to run

Request Body​

The request body is optional. When omitted, the run uses the default settings and includes every well in the scenario (base assignments only).

FieldTypeRequiredDescription
wellIdsstring[]NoObjectIds of wells to include. Each resolves to its base scenario well assignment. See Well Selection.
econSettingIdstring | nullNoObjectId of a saved econ setting whose columns drive the run output. Omit for default columns.
econReportSettingIdstring | nullNoObjectId of a saved econ report setting supplying report headers and aggregation flags. Omit for defaults.
comboSettingIdstring | nullNoObjectId of a saved combo group for this project and scenario. Omit to run the default combo.
runModelsstringNoWhich models to run. Only "economics_only" is supported. Defaults to "economics_only".
runModestringNoEconomics run mode. One of "full", "fast". Defaults to "full".
suggestedHeadersbooleanNoWhen true, includes suggested headers in the report output. Defaults to false.
prodAnalyticsTypestringNoProduction analytics basis. One of "calendar", "daysOn". Defaults to "calendar".
timeZonestringNoIANA time zone used for monthly date bucketing. Defaults to "UTC".

Unknown fields are rejected with 400 Bad Request.

Well Selection​

BodyWells included
wellIds omittedEvery well on the scenario, resolved to its base assignment only
wellIds providedThe listed wells, each resolved to its base scenario well assignment (index unset)

Only base assignments are included. Incremental scenario well assignments cannot be selected through this endpoint.

  • A wellId must belong to the scenario; an unknown well returns 400 Bad Request.
  • If a well has no resolvable base assignment, the request returns 404 Not Found.
  • A run that resolves to zero assignments returns 400 Bad Request.

Settings Resolution​

Each setting slice is independent. Any subset of ids may be supplied; omitted ids fall back to the same defaults the run dialog uses when no saved setting is selected.

SliceWhen id providedWhen id omitted
Columns (econSettingId)Loads the saved econ setting and reconciles its columns against the current column template.Full default column set.
Report (econReportSettingId)Loads the saved report setting; maps headers, allWellsAgg, and rollUpEachLevel.Default report: headers: ["econ_prms_reserves_category", "econ_prms_reserves_sub_category"], allWellsAgg: true, rollUpEachLevel: true.
Combos (comboSettingId)Loads the combo group scoped to this project and scenario; requires at least one selected combo.The scenario's default combo.

A combo group with no selected combos returns 400 Bad Request.

Response​

202 Accepted

{
"jobId": "64b3c2f1a9e34d0012abc123"
}

Use the jobId to poll for run status.


Polling Run Status​

GET /v1/projects/:projectId/scenarios/:scenarioId/run/:jobId

Returns the current status of an economics run. The jobId is scoped to the scenarioId in the URL — you cannot poll a job that belongs to a different scenario.

Path Parameters​

ParameterDescription
projectIdObjectId of the project
scenarioIdObjectId of the scenario
jobIdJob ID returned by the POST endpoint

Response​

200 OK

FieldTypeDescription
jobIdstringThe job identifier
statusstringCurrent run status. See Status Values.
progressnumberCompletion percentage, 0–100
createdAtstring | nullISO datetime when the job was created
startedAtstring | nullISO datetime when execution began
completedAtstring | nullISO datetime when the job completed (success or failure)
resultobject | nullResult payload when the run completed successfully. See Result Payload.
errorstring | nullError message when the run failed

Status Values​

statusMeaning
"pending"The job is queued and waiting to start
"running"The job is actively processing
"successful"The run completed without errors
"failed"The run encountered an error (see error field)

Result Payload​

When status is "successful", result contains references you can use to read the run output:

FieldTypeDescription
runModelsstringThe models that ran ("economics_only")
projectstringObjectId of the project
scenariostringObjectId of the scenario
econRunIdstringObjectId of the resulting econ run. Use it with the Econ Runs read endpoints.

Limitations and Constraints​

Concurrent Run Limit​

A maximum of 5 economics runs submitted by the API may be in progress simultaneously per tenant. Submitting a run when this limit is reached returns 429 Too Many Requests.

One Run Per Scenario​

A scenario may only have one API-submitted run in progress at a time. Attempting to start a second run while one is already running returns 409 Conflict.

Wells Required​

The run must resolve to at least one scenario well assignment. Running a scenario that resolves to no assignments returns 400 Bad Request.

Group Economics Not Supported​

Econ groups are not supported via this endpoint. If any selected well belongs to an econ group, the request is rejected with 400 Bad Request. Remove wells that belong to econ groups and retry.

Incremental Assignments Not Supported​

Well selection is by wellIds only and always resolves to base scenario well assignments. Incremental assignments cannot be targeted because the API does not expose scenario well assignment ids for discovery. Passing an unknown field such as scenarioWellAssignmentIds returns 400 Bad Request.

Carbon Runs Not Supported​

Only runModels: "economics_only" is accepted. Carbon (carbon_only, carbon_and_economics) runs are not exposed because the API has no endpoint to read carbon (GHG) results. Requesting a carbon model returns 400 Bad Request.

Setting Ownership​

Runs are owned by the tenant's API user. Results are readable only through the external API's Econ Runs endpoints, not the ComboCurve UI.


Error Reference​

HTTP StatusCondition
400Validation error in request body (see field-level error details in response)
400A wellId does not belong to the scenario
400The run resolved to no scenario well assignments
400A selected well belongs to an econ group
400The combo group has no selected combos
400runModels is a carbon model (not exposed via the API)
404projectId or scenarioId not found
404No base assignment found for a supplied wellId
404econSettingId, econReportSettingId, or comboSettingId not found
404jobId not found, or does not belong to the specified scenarioId
409The scenario already has a run in progress
429Tenant concurrent economics run limit (5) reached

Examples​

Run every well with default settings (no body)​

POST /v1/projects/5e5981b9e23dae0012624d72/scenarios/64a1b2c3d4e5f6a7b8c9d0e1/run

Run selected wells with default settings​

POST /v1/projects/5e5981b9e23dae0012624d72/scenarios/64a1b2c3d4e5f6a7b8c9d0e1/run
{
"wellIds": ["5e6f8a3b1c9d420012ab34cd", "5e6f8a3b1c9d420012ab34ce"]
}

Run with saved settings​

POST /v1/projects/5e5981b9e23dae0012624d72/scenarios/64a1b2c3d4e5f6a7b8c9d0e1/run
{
"wellIds": ["5e6f8a3b1c9d420012ab34cd"],
"econSettingId": "64b1c0faa9e34d0012a11111",
"econReportSettingId": "64b1c0faa9e34d0012a22222",
"comboSettingId": "64b1c0faa9e34d0012a33333"
}

Run with run options​

POST /v1/projects/5e5981b9e23dae0012624d72/scenarios/64a1b2c3d4e5f6a7b8c9d0e1/run
{
"wellIds": ["5e6f8a3b1c9d420012ab34cd"],
"runMode": "fast",
"prodAnalyticsType": "daysOn",
"suggestedHeaders": true,
"timeZone": "America/Denver"
}

Poll for status​

GET /v1/projects/5e5981b9e23dae0012624d72/scenarios/64a1b2c3d4e5f6a7b8c9d0e1/run/64b3c2f1a9e34d0012abc123

Response (running):

{
"jobId": "64b3c2f1a9e34d0012abc123",
"status": "running",
"progress": 42,
"createdAt": "2024-07-16T14:00:00.000Z",
"startedAt": "2024-07-16T14:00:05.000Z"
}

Response (successful):

{
"jobId": "64b3c2f1a9e34d0012abc123",
"status": "successful",
"progress": 100,
"createdAt": "2024-07-16T14:00:00.000Z",
"startedAt": "2024-07-16T14:00:05.000Z",
"completedAt": "2024-07-16T14:02:37.000Z",
"result": {
"runModels": "economics_only",
"project": "5e5981b9e23dae0012624d72",
"scenario": "64a1b2c3d4e5f6a7b8c9d0e1",
"econRunId": "64b3d0119c2a4b0012def456"
}
}