💧
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

Was this helpful?

  1. Authentication
  2. API Keys

Generate a Key

API keys are generated by making a POST request to the API key endpoint. Authentication via a bearer token is required to access this endpoint.

After generation a key cannot be retrieved in full, please ensure you make a copy of the key.

Create a new API Key

POST https://api.olisystems.com/user/api-key

Headers

Name
Value

Content-Type

application/json

Authorization*

Bearer <token>

Body (Optional)

Name
Optional
Type
Description

name

string

A custom name for the API key (max 50 characters).

expiry

number

The expiration date of the API key, specified as an epoch timestamp in milliseconds.

Example Request

{
  "name": "My API Key",
  "expiry": 1735689600000
}

Example Response

{
  "code": 200,
  "data": {
    "apiKey": "gAAAAABnP7fAh9VNmiIkHlpLRMmDNduOCDls4rgdngQpqA0GDNQXipd2ljo4YmNec9K56kvPP5u6zfsEIVrQXD9C_ZInRmH7XZ9BpguHJgd2W2xJVqdZL_Rp6xHR6nb-T",
    "apiKeyId": "d0e13388-c3b8-4bd4-8361-4b699828cde6"
  },
  "message": "User API KEY. PLEASE make a copy. This key can not be retrieved again.",
  "status": "success"
}
{
  "status": "ERROR",
  "message": "Invalid expiry date. Expiry date is provided in milliseconds"
}
{
  "status": "ERROR",
  "message": "Invalid expiry date milliseconds",
}
{
  "status": "ERROR",
  "message": "User api key exceeds allowed limit",
}

PreviousAPI KeysNextList All Keys

Last updated 5 months ago

Was this helpful?