CalcTree Help Pages
  • What is CalcTree?
  • Getting started
    • CalcTree Pages
    • Create a CalcTree Page
    • Add a calculation
    • Collaborate with a colleague
  • Calculations
    • Parameters
      • Math formulas
        • Parameter Data Types
        • Native Functions
          • Arithmetic Functions
          • Trigonometric Functions
          • Logical & Comparison Functions
          • Matrix & Vector Functions
          • Probability & Combinatorics Functions
          • Statistical Functions
          • String Functions
          • Utility Functions
          • Other Native Functions
        • Valid Expression Syntax
      • Supported Units
      • Dropdown List Parameters
        • Linking CSV Data to Dependent Dropdowns in CalcTree
      • Parameter Settings
    • Integrations
      • Python in CalcTree
        • Adding a Python Source
        • Defining Parameters in Python
        • Referencing Other Parameters in Python
        • Working with Units in Python
        • Creating Tables and Visuals in Python
        • Consuming Files in Python
        • Using Pre-installed Python Libraries
      • Spreadsheets [Coming Soon!]
      • File Upload
        • CSV files
      • 3rd Party Software Plugins
        • Excel
        • Grasshopper
        • ETABS [v20 & v21]
        • ETABS [v22]
        • SAP 2000
        • CSI Bridge [v26]
    • Templates [Coming Soon!]
    • Optimising your calculations
  • Pages & Reports
    • CalcTree Documents
    • Static content
    • Parametric content
      • Parametric equation
      • Inputs
      • Outputs
  • Export to PDF
  • API
    • GraphQL API
      • Generating an API key
      • Queries
        • GetCalculation
        • Calculate
      • Examples
        • Bulk calculations with Python
  • Collaborate
    • Add members
    • Review and approval
    • Add stakeholders
  • Administrate
    • CalcTree Workspace
    • Versioning and Audit trail
  • CalcTree for System Administrators
Powered by GitBook
On this page
  • GetCalculation Query
  • Purpose
  • Calculate Query
  • Purpose
  1. API
  2. GraphQL API

Queries

Extract information about your calculations via GraphQL queries

PreviousGenerating an API keyNextGetCalculation

Last updated 28 days ago

GetCalculation Query

The GetCalculation query retrieves detailed information about a specific calculation in a CalcTree workspace, including its statements, formulas, and values.

Purpose

This query allows you to fetch the details of a calculation by specifying:

  • The workspace where the calculation is stored

  • The calculation itself

  • A specific revision of the calculation

It returns the calculation’s ID along with all statements and their associated properties.

See detailed documentation for this query .

Calculate Query

The calculate query re-evaluates a specific calculation in a CalcTree workspace using provided statements. This is used to dynamically update formulas and retrieve recalculated values based on new inputs.

Purpose

This query allows you to:

  • Provide a set of updated or new formulas.

  • Re-evaluate the specified calculation using those formulas.

  • Receive updated outputs for each statement.

It requires:

  • The ID of the workspace.

  • The ID of the calculation.

  • A specific revision (or a placeholder revision such as "ffffffff" to fetch the latest).

  • StatementIDs which can be colelcted from the GetCalculation query.

The response includes the calculation ID, the revision used, and a list of all evaluated statements with their calculated values.

See detailed documentation for this query .

here
here