Getting started with Connect
Atlassian Connect is a development framework for extending Atlassian cloud products. It handles
discovery, installation, authentication, and seamless integration into the user interface. Connect is
an option for building apps on Jira Cloud. See About Jira Cloud platform to
learn about the other options.
In this tutorial, you learn how to use Connect to develop apps for Jira cloud products, including Jira
Software, Jira Service Management, and Jira Core. This includes getting an Atlassian cloud development
instance, setting up your local development environment, and validating your setup by building and
deploying a Hello World app.
Before you begin
To complete this tutorial, you need the following:
- Your favorite IDE or text editor
- A basic understanding of Jira
- Node.js (v12.1.0 or later). You also need npm, which is
included with Node.js
- A tool to tunnel your local development environment to the internet. We recommend
ngrok, which is free and easy to use
Set up your development environment
You need the following things to develop for Jira Cloud:
- A developer instance of Atlassian Cloud for testing and validating apps
- A local development environment for creating apps
Step 1. Get a cloud development site
The Cloud Developer Bundle provides a free Atlassian cloud development site for building and testing
apps. To create your site:
- Go to go.atlassian.com/cloud-dev and sign up. It may take
several minutes to provision your site.
- Once your site is ready, sign in, and complete the setup wizard.
Your cloud development site has Confluence and all the Jira products installed. Note that
Atlassian cloud development sites have limits on the number of users.
If necessary, use the app switcher to navigate to Jira. Select the app switcher icon, and then
Step 2. Enable development mode in your site
With development mode you can install app descriptors in your development site from any public URL.
This means you don't need to list an app in the Atlassian Marketplace before installing it.
- In the top navigation bar, click Apps then Manage your apps.
- Under User-installed apps, click Settings.
- Select Enable development mode, and then click Apply.
After the page refreshes, you see the Upload app link. This link enables you to install apps
Step 3. Set up your local development environment
If you install an Atlassian Connect app in an Atlassian cloud instance, it's usually hosted elsewhere
(for example, a cloud platform service like Heroku). However, it's easiest to develop an app on your
local machine and make it available over the internet by tunneling (using HTTPS). This enables you to
work locally and test against your Atlassian cloud instance.
On your command line, run:
Verify that ngrok is installed correctly by running:
Making your app available to the internet using ngrok is covered later in this tutorial.
Build a basic app
This part of the tutorial gives you a hands-on introduction to Atlassian Connect by building a simple
Atlassian Connect app. It also validates that your development environment is set up correctly. The
app uses a generalPages module and adds a link titled Greeting to the Jira sidebar.
Step 1. Define the app descriptor
The fundamental building block of an app is the app descriptor file, usually named
descriptor file describes your app to the Atlassian application (in this case, Jira Cloud), including the
name, permissions needed to operate, and
modules it uses for integration.
First, create a project directory and define your app descriptor.
- Create a project directory for your app's source files.
- In the project directory, create a new file named
atlassian-connect.json with this content:
"name": "Hello World",
"description": "Atlassian Connect app",
"name": "Example, Inc.",
- Save the descriptor file.
- (optional) Validate your descriptor using the Atlassian Connect validator.
This handy tool shows you any errors in your app descriptor, such as missing properties or syntax errors.
Step 2. Create the user interface
Now, create the user interface using a simple static HTML page. An app consisting of an app descriptor
and an HTML page is the most basic Atlassian Connect app. Such apps are not typical. However, when you
understand how the example works, it only takes a few more steps to turn it into a fully-functional app.
In your project directory, create a new file named
helloworld.html with this content:
<link rel="stylesheet" href="https://unpkg.com/@firstname.lastname@example.org/dist/bundle.css" media="all">
<script src="https://connect-cdn.atl-paas.net/all.js" async></script>
<section id="content" class="ac-content">
Note that the app descriptor file,
atlassian-connect.json, references this file in the
Save the file.
That's all the coding you need to do. Now take a closer look at the contents of the
- Styling: The
helloworld.html page uses CSS from Atlaskit. Atlaskit is a library
of reusable front-end UI components. This app uses the CSS styling to render the
h1 element using the Atlassian font stack.
script tag: This script tag includes the
It simplifies client interactions with the Atlassian application, such as making an
ac-content class: This class wraps the contents of your app and dynamically resizes the iframe
in Jira. This class keeps your app content visible without scrollbars.
Deploy and install your app
Use ngrok to make the local app available to the internet, and then tell your Jira instance how to find the
Step 1: Host the app on a local web server
You need a simple web server to serve the directory containing your
helloworld.html files. There are several tools you can use to do this, this tutorial uses
http-server (available via npm).
- Open your project directory at the command line
Install http-server by running:
npm install http-server -g
Start the server on port
8000 by running:
A message on your command line indicates that the server is serving HTTP at an address and port. It will look
something like this:
Starting up http-server, serving ./ on: http://0.0.0.0:8000/
Confirm that the files you created in steps 1 and 2 are being served by visiting the following URLs:
Step 2: Make the app files available to the internet
Now that your app is hosted on a local web server, use ngrok to make it available over the internet.
In a new command line window, run this command to expose your web server to the internet. If your app is not
running on port
8000, change the command to use your app's port number.
You see a status page on the command line that shows the tunnel's public URL and other information about
connections made over the tunnel. If your app is not running when you try to start ngrok, you see a
"Failed to complete tunnel connection" message.
Get the HTTPS URL from the ngrok status page.
Edit the app descriptor file, and set the
baseUrl property to the ngrok HTTPS URL. For example:
Confirm that the descriptor is available by opening the
atlassian-connect.json file in your browser
at the ngrok HTTPS URL. For example:
This is the URL you use in the next section to install your app.
Step 3: Install and test your app
The final step in deploying your app is to install it in your Atlassian cloud instance. You do
this by adding a link to your app's descriptor file in your Atlassian cloud instance. This enables Jira to install your app.
- Navigate to Jira in your Atlassian Cloud instance, then choose Jira settings (cog icon) > Apps > Manage apps.
- Click Upload app.
In the From this URL field, provide a link to your app descriptor. This URL is the same as the hosted location of your
atlassian-connect.json descriptor file. The example uses the following URL:
Click Upload. Jira displays the Installed and ready to go message when the installation is complete.
- Click Close.
- Verify that your app appears in the User installed apps list. For example, if you used Hello World for your app name,
then Hello World appears in the list.
In the top navigation bar, click Apps then Greeting.
The Hello World message displays.
You've now set up a development environment and built your first app.
You now know enough to start developing apps with Atlassian Connect. To continue learning about app development
for Jira Cloud: