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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.cloudId | string | Required within parent | Pattern: ^[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}$ |
query | object | Optional | Additional keys: not allowed |
query.check | string | Optional | Default: syntax One of: syntax, type, complexity |
body | Model | Required within parent | Expand Analyse Jira expression — request body — body |
Referenced models: Analyse Jira expression — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Analyse Jira expression — response body |
Referenced models: Analyse Jira expression — response body
Schemas
Section titled “Schemas”Analyse Jira expression — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details of Jira expressions for analysis. Additional keys: not allowed |
contextVariables | object | Optional | Context 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.* | string | Additional keys | Context 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. |
expressions | array | Required within parent | The list of Jira expressions to analyse. |
expressions[] | string | Each item | The list of Jira expressions to analyse. |
Analyse Jira expression — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details about the analysed Jira expression. |
results | JSON | Optional | |
results (anyOf 1) | array | Alternative | The results of Jira expressions analysis. |
results (anyOf 1)[] | Model | Each item | Expand Analyse Jira expression — response body — results The results of Jira expressions analysis item |
results (anyOf 2) | null | Alternative |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details about the analysed Jira expression. |
complexity | JSON | Optional | |
complexity (anyOf 1) | Model | Alternative | Expand Analyse Jira expression — response body — results The results of Jira expressions analysis item complexity expensive Operations, variables |
complexity (anyOf 2) | null | Alternative | |
errors | JSON | Optional | |
errors (anyOf 1) | array | Alternative | A list of validation errors. Not included if the expression is valid. |
errors (anyOf 1)[] | Model | Each item | Expand Analyse Jira expression — response body — results The results of Jira expressions analysis item errors array item |
errors (anyOf 2) | null | Alternative | |
expression | JSON | Optional | |
expression (anyOf 1) | string | Alternative | The analysed expression. |
expression (anyOf 2) | null | Alternative | |
type | JSON | Optional | |
type (anyOf 1) | string | Alternative | EXPERIMENTAL. The inferred type of the expression. |
type (anyOf 2) | null | Alternative | |
valid | JSON | Optional | |
valid (anyOf 1) | boolean | Alternative | Whether 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) | null | Alternative |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details about the complexity of the analysed Jira expression. |
expensiveOperations | JSON | Optional | |
expensiveOperations (anyOf 1) | string | Alternative | Information 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) | null | Alternative | |
variables | JSON | Optional | |
variables (anyOf 1) | object | Alternative | Variables used in the formula, mapped to the parts of the expression they refer to. Additional keys: see wildcard field |
variables (anyOf 1).* | string | Additional keys | Variables used in the formula, mapped to the parts of the expression they refer to. |
variables (anyOf 2) | null | Alternative |
Analyse Jira expression — response body — results The results of Jira expressions analysis item errors array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details about syntax and type errors. The error details apply to the entire expression, unless the object includes: * `line` and `column` * `expression` |
column | JSON | Optional | |
column (anyOf 1) | JSON | Alternative | |
column (anyOf 1) (anyOf 1) | integer | Alternative | The text column in which the error occurred. Format: int32 |
column (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
column (anyOf 2) | null | Alternative | |
expression | JSON | Optional | |
expression (anyOf 1) | string | Alternative | The part of the expression in which the error occurred. |
expression (anyOf 2) | null | Alternative | |
line | JSON | Optional | |
line (anyOf 1) | JSON | Alternative | |
line (anyOf 1) (anyOf 1) | integer | Alternative | The text line in which the error occurred. Format: int32 |
line (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
line (anyOf 2) | null | Alternative | |
message | JSON | Optional | |
message (anyOf 1) | string | Alternative | Details about the error. |
message (anyOf 2) | null | Alternative | |
type | JSON | Optional | |
type (anyOf 1) | string | Alternative | The error type. Known values: syntax, type, other |
type (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"]