Git Product home page Git Product logo

jira-cloud-rest-api-tutorial's Introduction

JIRA CLOUD REST API TUTORIAL

This is the best tutorial out there. It will teach you basics of how to use JIRA Cloud REST APIs. You will need a free Atlassian account to make REST API calls to JIRA Cloud.

Video

Steps

  1. Clone the Repo
  2. Install dependencies
  3. Add Env Variables
  4. Run the App

Step 1. Clone the Repo

Git clone this repo onto your computer in the destination of your choice:

git clone https://github.com/horeaporutiu/JIRA-Cloud-REST-API-Tutorial.git

then cd into the jira-cloud-tutorial folder:

cd JIRA-Cloud-REST-API-Tutorial

Step 2. Install Dependencies

Run npm install to install dependencies. Make sure to have Node.js installed!

Step 3. Add Env Variables

Rename your .sample.env to .env and fill out the necessary env variables! See below for details

Filling out .env

ATLASSIAN_USERNAME=[email protected]

  • This should just be your email, at least it was for me

ATLASSIAN_API_KEY=ADD-YOUR-API-KEY-HERE

  • Click on your account icon in top-right corner -> Manage account -> Security -> Create and manage API token under API token. From there click on Create API token and add it here.

LEAD_ACCT_ID=557058:f9bcdb25-24a5-4501-927c-588

  • First, run the get-users.js file to see your account id. The resulting JSON should give you your ID. This is needed to assign the project to a user.

DOMAIN=horeaporutiu

  • This will be the https://<your-domain>.atlassian.net your-domain part of the URL. For example my URL is https://horeaporutiu.atlassian.net/ so my domain is horeaporutiu

PROJECT_KEY=TEST22

  • This can be anything

PROJECT_NAME=TestProject22

  • This can be anything.

Save the file and run source .env or another command to execute the newest contents of the .env file.

Step 4. Run The App

Run node app.js to try it out! Check out the logs for results. See troubleshooting section below for help.

Have fun! Feel free to alter app.js for it to make sense for you. Check out all of the other files to see the details of the REST API calls!

Troubleshooting

If you run node app.js and get the following error:

error: 
{
  projectName: 'A project with that name already exists.',
  projectKey: "Project 'TestProject223' uses this project key."
}

Make sure you change your env variable for PROJECT_NAME and then run source .env or another command to make execute the newest contents of the .env file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.