Heta compiler API

Introduction

This is part of the Heta project.

Entry points

See also

Privacy Policy

Heta Compiler API - Developer Documentation

The Heta Compiler API provides an interface for compiling Heta platforms, customizing compilation workflows, and exporting results. This documentation details the API structure, parameters, and examples for developers.

Base URL: https://heta-api.insysbio.com

API Version: 0.1.1

1. Compile a Platform

Method: POST

Endpoint: /build

This endpoint compiles a Heta platform and generates files based on the provided configuration. All operations are synchronous, and results are returned immediately.

Request Body

Example Request

{
    "lifetime": 1800,
    "files": [
        {
            "filepath": "index.heta",
            "format": "utf8",
            "filebody": "x1 @Record := 1.2;"
        }
    ],
    "declaration": {
        "importModule": {
            "source": "index.heta",
            "type": "heta"
        },
        "options": {
            "unitsCheck": true,
            "debug": false
        },
        "export": [
            { "format": "JSON" },
            { "format": "SBML", "version": "L3V2" }
        ]
    }
}

Response

Success (200):

{
    "outputFiles": [{"filepath": "dist/json/model.json"}, {"filepath": "dist/sbml/model.xml"}],
    "logs": ["Compilation finished successfully."],
    "taskId": "example-task-id",
    "lifeend": 1634025600
}

Errors:

2. Download a File

Method: GET

Endpoint: /download/{taskId}

Retrieve a file generated during a compilation task using the task ID.

Path Parameters

Response

Success (200): File content is returned as binary data.

Errors:

3. Get API Info

Method: GET

Endpoint: /info

Retrieve version and connectivity details for the Heta Compiler API.

Response

{
    "version": "1.0.0",
    "node": "v14.17.0",
    "description": "Heta Compiler API"
}

4. Retrieve OpenAPI Schema

Method: GET

Endpoint: /schema

Retrieve the complete OpenAPI schema for the Heta Compiler API.

Response

{
    "openapi": "3.1.0"
}

For more details or support, contact the API team.