Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Use REST API with Jira instance on Free Plan?

D February 25, 2025

Hi community, I have a Jira instance under
https://<instance>.atlassian.net/jira/

Everything is fine, and I would like to use REST API to, let say, creating an issue/bug automatically. Something like this: https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#creating-an-issue-examples 

Looking at this example I see that it connects to localhost:8080 and use `-u charlie:charlie` (name and password - basic authentication).

Well, basic authentication is fine, but how should authentication work with my <instance>.atlassian.net ?
Can not find documentation/example about this, pls help...

Thanks in advance!

 

 

2 answers

1 accepted

3 votes
Answer accepted
D February 25, 2025

Hi @Manoj Gangwar  is it correct that on Free Plan there are no restrictions on using REST API ?   (I mean, it is the same as with another versions of JIRA)

Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 25, 2025

Yes, you can use the REST API in Jira's free plan. the free plan provides access to the full functionality of the Jira REST API.

0 votes
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 25, 2025

Hi @D Welcome to the community!

 

Please refer to the below doc for Jira cloud.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post
You can create the API token and use it as an authorization.

https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

D February 25, 2025 edited

Hi @Manoj Gangwar , one more question:

Is it really necessary to specify ALL fields listed here:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post  ?

Can I just specify summary, description and issuetype?

Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 25, 2025

No, you can specify only required fields which is required on your project at the time of issue creation. 

D February 25, 2025

Great, thanks!

D February 26, 2025 edited

Hi @Manoj Gangwar  would you pls help me one more time?

I can use JIRA REST API with curl, works great. Now I am doing the same in JS code running in browser. I am collecting some info from end-user in a form, when end-user press "Submit" than the following JS code should send it to JIRA to create a new bug:

```

try {
    log.log('Sending request to JIRA API...');
    const response = await fetch(JIRA_CONFIG.BASE_URL, {
        method: 'POST',
        headers: {
            'Authorization': `Basic ${btoa(`${JIRA_CONFIG.USER}:${JIRA_CONFIG.TOKEN}`)}`,
            'Content-Type': 'application/json',
            'Accept': 'application/json'
        },
        body: JSON.stringify(requestData)
    });

    ...

} catch (error) {
    log.log(`Error creating JIRA issue: ${error.message}`);
    throw error;
}

```

And I get this error in browser console:
```

Sending request to JIRA API...
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://<instance>.atlassian.net/rest/api/2/issue/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 204.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://<instance>.atlassian.net/rest/api/2/issue/. (Reason: CORS request did not succeed). Status code: (null).

Error creating JIRA issue: NetworkError when attempting to fetch resource.
```

Something goes wrong here... I think: if it works with curl - it should work with JS, isn't it? I would avoid using additional libs for this, I think the modern JS can handle this.

anyway, thanks in advance for your support!

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian community, university, on demand, transition to jira cloud

Transition to Jira Cloud

Switch to Jira Cloud with Atlassian University! Explore new navigation, issue views, and Cloud features like team-managed projects and automation. Tailored for Data Center users & admins, these courses ensure a smooth transition. Start your journey today!

Enroll now
AUG Leaders

Upcoming Jira Events