Skip to content

Atlassian: Analyse Jira expression

Atlassian jiraExpressions.analyseExpression: arguments, response, policy and SDK examples.

← Jira expressions operations · Get started

Operation atlassian.analyseexpression

Provider route: POST /{cloudId}/rest/api/3/expression/analyse. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/atlassian with npm, or alter-sdk-atlassian with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { AtlassianIntegration } from "@alter-ai/atlassian";
async function execute(input: Parameters<AtlassianIntegration["jiraExpressions"]["analyseExpression"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new AtlassianIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.jiraExpressions.analyseExpression(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_atlassian import AtlassianIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = AtlassianIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.jira_expressions.analyse_expression(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.cloudIdstringRequired within parentPattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
queryobjectOptionalAdditional keys: not allowed
query.checkstringOptionalDefault: syntax
One of: syntax, type, complexity
bodyModelRequired within parentExpand Analyse Jira expression — request body — body

Referenced models: Analyse Jira expression — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Analyse Jira expression — response body

Referenced models: Analyse Jira expression — response body

Analyse Jira expression — request body — body
FieldTypePresenceDescription and constraints
$objectRootDetails of Jira expressions for analysis.
Additional keys: not allowed
contextVariablesobjectOptionalContext variables and their types. The type checker assumes that [common context variables](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables), such as `issue` or `project`, are available in context and sets their type. Use this property to override the default types or provide details of new variables.
Additional keys: see wildcard field
contextVariables.*stringAdditional keysContext variables and their types. The type checker assumes that <a href="https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables">common context variables</a>, such as <code>issue</code> or <code>project</code>, are available in context and sets their type. Use this property to override the default types or provide details of new variables.
expressionsarrayRequired within parentThe list of Jira expressions to analyse.
expressions[]stringEach itemThe list of Jira expressions to analyse.
Analyse Jira expression — response body
FieldTypePresenceDescription and constraints
$objectRootDetails about the analysed Jira expression.
resultsJSONOptional
results (anyOf 1)arrayAlternativeThe results of Jira expressions analysis.
results (anyOf 1)[]ModelEach itemExpand Analyse Jira expression — response body — results The results of Jira expressions analysis item
results (anyOf 2)nullAlternative

Referenced models: Analyse Jira expression — response body — results The results of Jira expressions analysis item

Analyse Jira expression — response body — results The results of Jira expressions analysis item
FieldTypePresenceDescription and constraints
$objectRootDetails about the analysed Jira expression.
complexityJSONOptional
complexity (anyOf 1)ModelAlternativeExpand Analyse Jira expression — response body — results The results of Jira expressions analysis item complexity expensive Operations, variables
complexity (anyOf 2)nullAlternative
errorsJSONOptional
errors (anyOf 1)arrayAlternativeA list of validation errors. Not included if the expression is valid.
errors (anyOf 1)[]ModelEach itemExpand Analyse Jira expression — response body — results The results of Jira expressions analysis item errors array item
errors (anyOf 2)nullAlternative
expressionJSONOptional
expression (anyOf 1)stringAlternativeThe analysed expression.
expression (anyOf 2)nullAlternative
typeJSONOptional
type (anyOf 1)stringAlternativeEXPERIMENTAL. The inferred type of the expression.
type (anyOf 2)nullAlternative
validJSONOptional
valid (anyOf 1)booleanAlternativeWhether the expression is valid and the interpreter will evaluate it. Note that the expression may fail at runtime (for example, if it executes too many expensive operations).
valid (anyOf 2)nullAlternative

Referenced models: Analyse Jira expression — response body — results The results of Jira expressions analysis item complexity expensive Operations, variables, Analyse Jira expression — response body — results The results of Jira expressions analysis item errors array item

Analyse Jira expression — response body — results The results of Jira expressions analysis item complexity expensive Operations, variables
FieldTypePresenceDescription and constraints
$objectRootDetails about the complexity of the analysed Jira expression.
expensiveOperationsJSONOptional
expensiveOperations (anyOf 1)stringAlternativeInformation that can be used to determine how many [expensive operations](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#expensive-operations) the evaluation of the expression will perform. This information may be a formula or number. For example:

* `issues.map(i => i.comments)` performs as many expensive operations as there are issues on the issues list. So this parameter returns `N`, where `N` is the size of issue list.
* `new Issue(10010).comments` gets comments for one issue, so its complexity is `2` (`1` to retrieve issue 10010 from the database plus `1` to get its comments).
expensiveOperations (anyOf 2)nullAlternative
variablesJSONOptional
variables (anyOf 1)objectAlternativeVariables used in the formula, mapped to the parts of the expression they refer to.
Additional keys: see wildcard field
variables (anyOf 1).*stringAdditional keysVariables used in the formula, mapped to the parts of the expression they refer to.
variables (anyOf 2)nullAlternative
Analyse Jira expression — response body — results The results of Jira expressions analysis item errors array item
FieldTypePresenceDescription and constraints
$objectRootDetails about syntax and type errors. The error details apply to the entire expression, unless the object includes:

* `line` and `column`
* `expression`
columnJSONOptional
column (anyOf 1)JSONAlternative
column (anyOf 1) (anyOf 1)integerAlternativeThe text column in which the error occurred.
Format: int32
column (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
column (anyOf 2)nullAlternative
expressionJSONOptional
expression (anyOf 1)stringAlternativeThe part of the expression in which the error occurred.
expression (anyOf 2)nullAlternative
lineJSONOptional
line (anyOf 1)JSONAlternative
line (anyOf 1) (anyOf 1)integerAlternativeThe text line in which the error occurred.
Format: int32
line (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
line (anyOf 2)nullAlternative
messageJSONOptional
message (anyOf 1)stringAlternativeDetails about the error.
message (anyOf 2)nullAlternative
typeJSONOptional
type (anyOf 1)stringAlternativeThe error type.
Known values: syntax, type, other
type (anyOf 2)nullAlternative

SDK function policy ID: atlassian.analyseexpression. Catalog operation: analyseexpression. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["read:jira-user", "read:jira-work"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.