Appearance
Endpoints
Endpoints define and shape the functionality that AireGlu provides. They are called by external applications, or other endpoints, and perform various tasks as configured. These can range from manipulating and shaping data, or sending an email, to generating a PDF, to contacting other external services. Custom tasks can also be created via the use of adapters.
Creating an Endpoint
The Getting Started page has a quick setup for a simple endpoint. You should check there for something simple. This guide will go more in depth about the various options available during creation.
Endpoint Name
is required, and forms part of the URL for the endpoint. If glu.aireinnovate.com
is our AireGlu instance, and airelogic
is our tenant, then our full endpoint URL would be https://glu-api.aireinnovate.com/airelogic/ENDPOINT-NAME
. The name only allows letters, numbers and hyphens (-
) to be used.
Group Name
is an optional field and does not affect how the endpoint runs. You can choose to add groups for your endpoints, and then on the endpoint page choose to see your endpoints within their groups. Any endpoints without a group will be shown in the Ungrouped Endpoints
group
Error Email
is optional. It is used to report the following during endpoint execution:
- There was an input validation error
- Running endpoint resulted in an AireGlu exception
- The endpoint returned a non-success status code
Authentication
You can require authentication for your endpoint to limit availability and use. The following options are available for authentication:
- API Key
- Internal Only
- JWT (deprecated)
- IP Address/Range
- Basic Auth
- Client Credentials
If multiple authentication methods are defined, then ALL of them are required to pass in order to use an endpoint.
API Key
Choosing an API Key is probably the simplest way to add authentication. It allows you to choose a string of text (preferably random) that both AireGlu and the calling application know. This should then be passed in the X-Api-Key
HTTP header on any incoming request. This can also be securely saved as a Secret.
Internal Only
Internal Only endpoints are accessible only to other endpoints, and cannot be called by external users or applications.
JWT
Securing an endpoint using JWT authentication is deprecated and will be removed in an upcoming release.
IP Address/Range
By limiting to an IP address or range will require the calling device to be on the defined IP. This can be a single IP address (e.g. 192.168.1.152
), a range (e.g. 192.168.1.10-192.168.50
), or a CIDR block (e.g. 192.168.1.0/24
). You can provide multiple sets for allowing different networks or specific devices to access the endpoint.
Basic Auth
Basic Auth allows you to set a username and password required to use the endpoint. Once set, the password will not be viewable again for security reasons. These credentials should then be included in any endpoint calls using normal Basic Auth requirements. These are the Authorization
header with a base64 version of the username and password separated by a single colon :
.
For example, if you use Aladdin
as the username and open sesame
as the password, then the field's value is the Base64 encoding of Aladdin:open sesame
, or QWxhZGRpbjpvcGVuIHNlc2FtZQ==
. Then the Authorization header should be: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Client Credentials
Client Credentials is a secure authentication method recommended for server-to-server communication. It's particularly useful for background services or automated tasks that operate independently of user sessions. This method involves the application authenticating itself with its own credentials (a client ID and client secret). Before your application can securely call an AireGlu endpoint using Client Credentials, it must first obtain an access token from AireIdentity.
Example request:
POST https://identity.aireinnovate.com/connect/token
CONTENT-TYPE application/x-www-form-urlencoded
client_id=[MY_CLIENT]&
client_secret=[MY_CLIENT_SECRET]&
grant_type=client_credentials&
tenant_key=[MY_TENANT_ENVIRONMENT_KEY]&
scope=AireGluRuntimeApi
Note the client must specify the AireGluRuntimeApi
scope.
This token represents your application's authorization to access the specified resources. Include this token in the Authorization header as a Bearer token in all subsequent requests to the AireGlu endpoint. For example: Authorization: Bearer {ACCESS_TOKEN}
Note: Cross-tenant endpoint invocations are not permitted with client credentials authentication. The tenant key claim provided in the token must match the tenant key of the endpoint being invoked.
Tasks
Tasks make up the meat of the Endpoint. They are responsible for the processing that goes on. Tasks are covered in detail here.
Stop on Task Failure
allows you to stop running the endpoint when a task fails to complete successfully. If this is turned off, then it will ignore failed tasks, and continue to process each subsequent task. Be aware this may cause unpredictable behaviour or more failures if those tasks depend on the output of the failed task.
Importing or synchronising an Endpoint
Endpoints can be managed by exporting them and saving them in a git repository then synchronising the repository within AireGlu [(/docs/getting-started/repositories#exporting-an-endpoint-config)]
You can also import an endpoint definition manually by:
- Going to the Endpoints page
- Clicking on the three dots in the top right hand corner
- Selecting Import Endpoint
- Pasting the endpoint definition into the space provided and selecting Import