Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Canvas is simple to use, but before diving in it can be a good idea to get to you should know some of the key concepts involved.

In this article we will describe three central concepts for Canvas: apps, blocks, and workflows.

We will also describe how Canvas uses a middle layer API to interact with external APIs.

...

panelIconIdatlassian-note
panelIcon:note:
bgColor#DEEBFF

Tip

Summary:

  • Applications are used to store API credentials

...

  • . To create an integration you must first register the applications that you want to integrate with.

  • Blocks are modular pieces of code, used to build workflows. By combining ready-made or custom code blocks you will be able to quickly develop the integration logic you want.

  • Workflows are integrations, made out of blocks. Workflows can be scheduled to run at given intervals, and they can be turned into templates for easy setup.

In short, workflows are made up of blocks which fetch data using apps registered in the user account.

...

API calls on Canvas are (usually) not made to the external APIs directly; instead a simplified internal API is used for each app, which forwards the request to the external API.

Image Added

Topics covered:

...

If you have worked with APIs before, you will know that it can be challenging to manually handle API authentication, safe storage of credentials , for multiple clients, refreshing of session tokens, API changes, OAuth, etc.

...

When you register a new application (“app”) in a user account you will be asked to provide necessary API credentials (usernames, passwords, API keys, etc). These details are stored safely encrypted in the user account , and can then be used by the integrations (“workflows”) that you set up.

...

In the previous example we added the Azure AD application to the user account, which unlocked the following blocks for use in workflows:

...

Workflows:

“Workflow” is the term used for integrations in Canvas.

...

Here is an example of a workflow which updates employees and agreements in Quinyx using data from fetched from a FTP server:

...

Here you see the blocks this workflow consists of:

...

About the

...

middle layer API

It is important to know that blocks on Canvas (usually) do not query external APIs directly; instead they query an internal wrapper/middle layer API which is part of Canvas' backend.
From there the requests are forwarded The middle layer API forwards requests to the external API, using the credentials from the registered application in the user account.

This simplifies and unifies the process of working with several external APIs, while ensuring secure handling of authentication.

...

It is also worth mentioning that there is a generic REST connector, which can be used to query any external REST API directly, but . But in most cases it will be preferable to use the internal API via non-generic apps with pre-made blocks if the app is supported.

...