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
  • Endpoint
  • Authentication
  • Page & Workspace IDs
  • Page ID
  • Workspace ID
  • Queries and Mutations
  • Queries
  1. API

GraphQL API

Learn about building apps and integrations on top of CalcTree's API

PreviousExport to PDFNextGenerating an API key

Last updated 28 days ago

Endpoint

CalcTree's GraphQL endpoint is:

https://graph.calctree.com/graphql

Authentication

Right now we support personal API keys for authentication. Check out this to see how to create one.

Headers for your API calls should look like this:

headers: {
          "Content-Type": "application/json",
          "x-api-key": apiKey,
        }

Page & Workspace IDs

You'll need your page and workspace IDs to connect to pages in your workspace from an external tool. Both can be found in the URL of a page, which take the form:

https://app.calctree.com/edit/workspaceID/pageID

Page ID

As well as in the page URL, you can find your pageID on the RHS integrations pane of your page.

Workspace ID

Your workspaceID can be found in the URL of the page you're in, in a given workspace. For example, for this URL:

https://app.calctree.com/edit/ae3d7998-a4c7-41c1-abfd-fb3f07a80f21/ilxbKtbDgAHQWimUKM3bh

The workspaceID would be ae3d7998-a4c7-41c1-abfd-fb3f07a80f21.

Queries and Mutations

Queries

The API allows for two different types of calls, and mutations.

Query API calls let you inspect elements in CalcTree, mainly data and calculations (pages). See this for details and examples of available queries.

page
queries
page