Skip to content

Endpoint Tasks

Introduction

Tasks are the bread and butter of AireGlu Endpoints. There are a number of included Tasks you can use, or you can write your own adapters to create custom tasks.

HTTP Request

The HTTP Request task is used to communicate with external services. You can use this to send data to your APIs, or fetch data from other sources.

HTTP Response Handler

The Response Handler can only be used when linked to an HTTP Request. This handles what is returned from the request (e.g. the data from your API). You don't have to include this if you don't care about the result of your request, but more often than not the two come as a pair.

MESH Message

The MESH Message task lets you create and send mail via the MESH workflow system.

Email

The Email task allows you to send an email. This can be sent from your own email servers, or from AireGlu's default email server.

SMS

The SMS task allows you to send text messages using either the MessageBird or GOV.UK notify services

Job

The Job task allows an endpoint to be run at a specified time or interval, much like a scheduled task or cron job.

Fax

The Fax task allows you to send a message or PDF to a Fax machine. A PDF is required and can be part of your input data.

HTTP Response

Lets you specify an HTTP response that the Endpoint should return as its result.

HTTP Redirect

Lets you specify a redirection that should occur as the result of the Endpoint. Useful for sending the user to a "Thank you" page for instance.

Mapping

The Mapping task is for data transformation. It can be used to reformat the data, or modify it in the pipeline. The output of this can be used in any subsequent tasks.

PDF

The PDF task lets you return a PDF document as the result of the Endpoint.

JWT

The JWT task allows you to generate a JWT with customisable headers & payload, with a choice of encryption and/or signing algorithms.

Audit

The Audit task generates logs and sends them to AireAudit. To view these logs you can navigate to AireAudit. Here you’ll be prompted to sign in, and once logged in, you’ll see a list of audit logs which you can apply filters on.

Task Configuration

Context Data

The Context Data panel is found on the left-hand side of mapping tasks and provides access to dynamic data, variables, functions, and secrets for building your endpoint logic.

Paths

Paths, provide access to the input data that was originally sent in to the endpoint, and the outputs of any Mapping tasks and from HTTP Response Handlers. Changing the Data Origin field allows you to choose between available data sets.

Data Tree View

The default Data Tree tab displays your available data in an expandable tree structure:

  • Data Origin: Select between available data sets using the dropdown (e.g., "Input" for the original request data)
  • Tree Navigation: Expand objects and arrays to explore the data structure
  • Preview Values: Click the eye icon next to any field to see a preview of its value
  • Insert Paths: Click the arrow icon to insert the JSON path into your mapping

data tree

Path View

Switch to the Path View tab to create custom path mappings:

  • Add Custom Paths: Enter a custom path key and specify the full JSON path (e.g., $.bookstore.socialMedia.instagram)
  • Manage Paths: Edit or delete existing custom paths using the action icons
  • Reusable Mappings: Custom paths appear in the "Existing Paths" list for easy reuse across your mapping

data tree

Using Paths

You can reference data in two ways:

  1. Drag and Drop: Drag any field from the data tree directly to where you need it in your mapping
  2. Click to Insert: Click on your destination field, then click the arrow icon next to the desired data path to insert it

All paths generate the appropriate JSON (or XPath if the data is in XMML format) path syntax automatically, making it easy to access nested data structures in your endpoint responses.

data tree

Functions

Functions, provide built-in AireGlu utilities for data transformation and processing. These functions can be used to perform common operations like encoding, date formatting, generating unique identifiers, and more. Use the search box at the top of the Functions panel to quickly find specific functions by name or functionality. Inserting Functions

Available Functions

The Functions panel includes a comprehensive library of built-in functions:

  • DateTime: Format dates using patterns like ddMMyyyyhhss
  • UUID: Generate unique identifiers
  • Random: Generate random numbers with customizable ranges (e.g., 1,10)
  • OID: Generate object identifiers with custom prefixes (e.g., 225)
  • Base64Encode: Encode strings or streams to Base64 format
  • Base64Decode: Decode Base64 strings back to original format
  • UrlEncode: URL-encode strings for safe transmission
  • Raw: Pass through data without transformation
  • JWT: Create JSON Web Tokens with RSA key signing

Using Functions

Functions can be configured in two ways:

  1. Hard-coded Values: Enter static values directly into the function parameters
  2. Dynamic Templates: Use paths, variables, or secrets as function inputs by templating them into the parameters

Inserting Functions

  • Drag and Drop: Drag any function from the list directly to where you need it in your mapping
  • Click to Insert: Click on your destination field, then click the arrow icon next to the desired function

In the examples shown:

  • Base64Encode: Encoding content like --name-- (a templated path reference) into Base64 format
  • Templated Base64Encode: Using --AG:Base64Encode(--name--)-- to encode dynamic content from the name field

The preview panel shows the real-time execution of these functions, demonstrating how they transform your data in the actual endpoint output.

data tree

Secrets

Secrets, let you add private data to your requests. This data cannot be seen once created, so is suitable for things like authentication details. You can use these either by dragging the required field to the left hand side where you need it, or by clicking to the destination point and hitting the arrow. You can read more about Secrets here.

The panel includes a search function at the top to help you find specific secrets quickly.

Secrets are particularly useful for templating sensitive information into your endpoint configuration, such as:

  • Authorization headers (as shown in the image with Bearer --audit-bearer-key?--)
  • API keys
  • Authentication tokens
  • Other credentials that shouldn't be hardcoded

This approach keeps sensitive information secure while still allowing you to reference it in your endpoint configuration.

Using secrets instead of hardcoding sensitive values improves security and makes credential management more flexible within your Airglu workflows.

secrets use

Variables

Variables are tenant-wide settings that provide common data that can be reused across multiple endpoints. Unlike secrets, variables are visible and editable, so they should only contain non-sensitive information. You can use variables by either dragging them from the list to where you need them in your mapping, or by clicking on your destination field and then clicking the arrow icon next to the variable. You can read more about Variables here.

The panel includes a search function at the top to help you find specific variables quickly. Each variable in the list has an arrow icon that allows you to insert it into your selected field.

This provides quick access to all variables that can be mapped into your endpoint configuration.

Editor

Preview

The Preview panel on the right side shows you the output of your task. It can help you verify your mapping logic works correctly before saving your task. This collapsible panel can be toggled on and off using the "Display Preview" switch in the top-right corner.

The preview executes your mapping logic using sample data to show you exactly what your task output will look like. It processes:

  • Dynamic Data: References to input data and previous task outputs
  • Function Execution: Real-time execution of AireGlu functions like UUID generation, date formatting, etc.
  • Data Transformations: Any mapping, filtering, or transformation logic you've configured

Using the Preview

  • Toggle Display: Use the "Display Preview" switch to show or hide the preview panel
  • Validation: Click the "Validate" button to check for errors and refresh the preview
  • Error Detection: Any issues with your mapping will be highlighted, requiring correction before the preview can display properly

In the example shown, the preview demonstrates:

  • The test property mapping from input data ($.name)
  • Live execution of the UUID function generating a real UUID value
  • The final JSON structure that will be output by this mapping task

task preview

Filters

Filters are used to look at available data, and determine if a task should run. It uses a JSONPath expression that returns true or false to decide where to run the task, or skip it. You can add multiple filters to your task or you can choose to copy the filters of one task to another.

filters