Atlassian provides an API for Jira. The guide is provided at https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/
In order to use the API key, you should follow below two steps:
STEP 1. Create API Key
Create an API token from your Atlassian account:
Log in to https://id.atlassian.com/manage/api-tokens.
Click Create API token.
From the dialog that appears, enter a memorable and concise Label for your token and click Create.
Click Copy to clipboard, then paste the token to your script, or elsewhere to save:
STEP 2. Acquire Token
curl -v https://mysite.atlassian.net --user me@example.com:my-api-token
STEP 3. Use your API Key based on your plan