GetCalculation
Retrieves detailed information about a specific calculation
The GetCalculation query retrieves detailed information about a specific calculation in a CalcTree workspace, including its statements, formulas, and values
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.
Input Parameters
workspaceId
ID!
Yes
The unique ID of the CalcTree workspace
calculationId
ID!
Yes
The unique ID of the calculation
revisionId
ID!
Yes
The unique ID of the revision to retrieve
Sample Query
Sample Variables
Sample Response
Description of Returned Fields
calculationId
String
The unique ID of the retrieved calculation
statements
Array
An array of statements included in the calculation
statementId
String
The unique ID of the statement
title
String
The title of the statement
engine
String
The execution engine used for the statement (e.g., Python)
formula
String
The formula used in the statement
namedValues
Array of Objects
An array of name-value pairs representing variables used in the formula
Usage Example
Here’s how to use this query with an example in Python:
Tips for Using the Query
Ensure your
workspaceId
,calculationId
, andrevisionId
are correct.Unless working with a specific revision, set revisionID to "ffffffff" to access the latest version of the calculation.
Use the namedValues array to understand the input values used in each statement.
Last updated