Flows API Menu
  • Globus Flows
  • Overview
  • Authentication and Authorization
  • Authoring Flows
  • Authoring Input Schemas
  • Permissions
  • Limits
  • Hosted Action Providers
    • Hello World
    • Globus Transfer - Transfer Task
    • Globus Transfer - Delete Task
    • Globus Transfer - Set Permission
    • Globus Transfer - List Directory Contents
    • Globus Transfer - Make Directory
    • Globus Transfer - Get Collection
    • Globus Search - Ingest Task
    • Globus Search - Delete Task
    • Send Notification Email
    • Wait For User Selection
    • Expression Evaluation
    • Datacite Mint
Skip to main content
Globus Docs
  • APIs
    Auth Compute Flows Globus Connect Server Groups Search Transfer Python SDK Helper Pages
  • How To
  • Guides
    Globus Connect Server High Assurance Collections for Protected Data Command Line Interface Premium Storage Connectors Security Modern Research Data Portal
  • Support
    FAQs Mailing Lists Contact Us Check Support Tickets
  1. Home
  2. Globus APIs
  3. Globus Flows
  4. Hosted Action Providers

Action Provider: Expression Evaluation

Note

Expression evaluation has been integrated with action definitions directly (see the documentation for [parameter-expressions]).

Thus, for most use cases, the Expression Evaluation action provider described here is not needed and expressions defined on Action definitions within a Flow are preferred.

URL: https://actions.globus.org/expression_eval

Scope: https://auth.globus.org/scopes/5fac2e64-c734-4e6b-90ea-ff12ddbf9653/expression

Synchronous / Asynchronous: Synchronous

A single invocation of the action provider may evaluate a single expression or multiple expressions. An Expression request consists of up to three parts:

  • An expression (required) which is a basic "arithmetic" type expression. This does include string type operations so an expression like "foo" + "bar" is permitted and performs string concatenation as is common in many programming and scripting languages.

  • A set of arguments (optional) in a JSON object format. These arguments may be referenced in an expression. So, if there’s an expression such as "x + 1" and the arguments contain {"x": 2} the result will be 3.

  • A result_path (optional) which is a path where the result will be stored. It may be in "Reference Path" format as defined in the AWS Step Functions State Machine Language specification, or it may simply be a dot separated string of the path elements. In either case, the path indicates where in the details of the returned action status the value for the evaluated expression should be placed. If result_path is not present, the result will be stored in the details under the key result.

A single request may specify multiple expressions to be evaluated by providing an array named expressions as in {"expressions": [{ expression1 },{expression2}, ...]} where each of the expressions expression1 and expression2 contains the three fields defined for an expression. These will be evaluated in order, and expressions using the same result_path will result in previous results being over-written.

Example Input - Single expression
{
  "expression": "x + 5",
  "arguments": {
    "x": 6
  },
  "result_path": "$.sum_value.should_be_11"
}
Example Input - Multiple expressions
{
  "expressions": [
    {
      "expression": "x + 5",
      "arguments": {
        "x": 6
      },
      "result_path": "$.sum_value.should_be_11"
    },
    {
      "expression": "'foo' + bar",
      "arguments": {
        "bar": "bar"
      },
      "result_path": "$.sum_value.should_be_foobar"
    },
    {
      "expression": "[1, 2] + [3, 4]",
      "result_path": "$.sum_value.should_be_1234_list"
    }
  ]
}
  • Globus Flows
  • Overview
  • Authentication and Authorization
  • Authoring Flows
  • Authoring Input Schemas
  • Permissions
  • Limits
  • Hosted Action Providers
    • Hello World
    • Globus Transfer - Transfer Task
    • Globus Transfer - Delete Task
    • Globus Transfer - Set Permission
    • Globus Transfer - List Directory Contents
    • Globus Transfer - Make Directory
    • Globus Transfer - Get Collection
    • Globus Search - Ingest Task
    • Globus Search - Delete Task
    • Send Notification Email
    • Wait For User Selection
    • Expression Evaluation
    • Datacite Mint
© 2010- The University of Chicago Legal Privacy Accessibility