💧
OLI API
  • Welcome to the OLI API documentation
  • Basic workflow
  • Authentication
    • Bearer Token
    • API Keys
      • Generate a Key
      • List All Keys
      • Delete a Key
  • Generating chemistry model files
    • ChemBuilder API
      • Getting Started with ChemBuilder
        • Set Thermodynamic Framework
        • Include Private Databanks
        • Include Inflows
          • Include Assays
          • Include Pseudocomponent
        • Choose Phases
        • Specify Model Name
        • Choose Redox
        • Choose Solids
        • Add Kinetics
      • ChemBuilder Query
        • Species Query
        • Redox Query
        • Solid Phase Query
        • Databank Query
        • Kinetics Query
        • Query Output Results
      • Supporting Information for ChemBuilder
        • Add Comment
        • "enabled" Keyword
        • ChemBuilder Errors
    • Chemistry Wizard
  • Uploading chemistry model files
  • Get list of uploaded files
  • Quickstart example: Python
  • Known issues and Limitations
  • OLI ENGINE API
    • Main methods
      • API call blueprint
      • Chemistry information
      • Isothermal flash
      • Isenthalpic flash
      • Bubble point flash
      • Dew point flash
      • Vapor amount flash
      • Vapor fraction flash
      • Isochoric flash
      • set pH flash
      • Precipitation point flash
      • Autoclave
      • Custom flash
      • Corrosion contact surfaces
      • Corrosion rates
      • Water analysis
  • Additional methods
    • Flash history - Chemistry model
    • Result - by jobId
    • delete file
    • cancel run
  • Inflows input
  • Optional inputs
  • Kinetic calculation inputs
  • Kinetic calculation outputs
  • Input units
  • User defined output unit set
  • Survey calculation
  • Stream output
  • Error/Warning output
  • Definition of terms
  • OLI Process API
    • Uploading a Process API package
      • Creating a Process API package
    • Get list of all uploaded ProcessAPI packages
    • Get input specs for Process API package
    • Get output specs for ProcessAPI package
    • Run a Process API calculation
    • Get calculation status and results
  • Deleting a process package
  • Undelete a process package
  • Process API input specification
    • "data" object
      • "flowsheet" object
        • "chemical-info" object
        • "general-info" object
        • "properties" object
        • "units_set_info" object
  • OLI ScaleChem API
    • Uploading chemistry model files for ScaleChem API
    • Get list of uploaded ScaleChem model files
    • Main methods
      • Brine analysis
      • Gas analysis
      • Oil analysis
      • Mixer calculation
      • Scale scenario
Powered by GitBook
On this page
  • Run the selected process
  • Response description

Was this helpful?

  1. OLI Process API

Run a Process API calculation

Note: The time to run a calculation using the OLI Process API cannot be predicted accurately and also some calculations may take longer to compute than others. Hence, a polling mechanism is required to retrieve the result of each calculation. The steps for this mechanism are described below.

  1. Send a POST request to the run URL below

  2. If the request was successful(status:200), the JSON response back will contain a link to the results and status of the computation. The status inside the "data" array will be IN QUEUE/IN PROGRESS

  3. Keep polling the returned results link with a GET request until the status member of the response changes from IN PROGRESS to PROCESSED/FAILED/ERROR or COMPLETED

  4. When the status is COMPLETED, then response will also contain the result of the computation

Run the selected process

POST https://api.olisystems.com/process/run/{process_id}

The input to run the calculation is provided in the body of the message as JSON, the input is the data.flowsheet.properties object retrieved using the Get input specs for Process API package call.

Headers

Name
Type
Description

Authorization

string

Bearer {access_token}

Content-Type

string

application/json

Request Body

Name
Type
Description

*

JSON

{ "properties" : { "input" " { ...}}}

{
	"code": 200,
	"data": {
		"file_id": "dee854a6-59db-487d-ad08-a20dee691133",
		"jobId": "f6b3375e-cd0f-4ace-a5ee-71e047b76754",
		"resultsLink": "https://api.olisystems.com/result/flash/f6b3375e-cd0f-4ace-a5ee-71e047b76754?context=engine",
		"status": "IN PROGRESS"
	},
	"message": "Process execution started Successfully",
	"status": "SUCCESS"
}

Response description

field

description

data.jobId

the current request job identifier

data.processId

the processId used for the job being run

data.resultsLink

the https endpoint to poll to get the final result

data.status

current status of the job IN QUEUE/IN PROGRESS

message

message describing the request

status

status of the current request, can be SUCCESS or FAILED

// Response from process-run call
{
    "data": {
        "jobId": "20978bbb-5f88-4ecd-ae90-582953afdedf",
        "processId": "a5c645fe-578b-4a48-a541-3d818d4ef564",
        "resultsLink": "https://api.olisystems.com/result/20978bbb-5f88-4ecd-ae90-582953afdedf?flash=&count=20",
        "status": "IN QUEUE"
    },
    "message": "Process execution started Successfully",
    "status": "SUCCESS"
}
PreviousGet output specs for ProcessAPI packageNextGet calculation status and results

Last updated 7 months ago

Was this helpful?