Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

json code to create issue in Jira

Dennis Celen February 1, 2023

hi there

I'm using bubble.io to build a custom job form.  we use it also for other stuff and it works great. 

 

my question is, does anybody know how i can create an issue in Jira using json code?

 

what authorisation method should i use, and how is the code concerning authentication?

 

Dennis

1 answer

1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 1, 2023

I have https://blog.developer.atlassian.com/creating-a-jira-cloud-issue-in-a-single-rest-call/ in my bookmarks.

You'll need to use the Oauth authentication though.  Start with a skim of https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/

Dennis Celen February 1, 2023

hi I tried this but i cant do anything with the curl....

 

this is what i can fill in:

 

Schermafbeelding 2023-02-01 222215.png

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 1, 2023

Yes, you will need to get the Oauth sorted - the basic authentication is no longer available (it's not as secure as it should be)

Dennis Celen February 1, 2023

alright I fixed it. thanks, 

 

do you also know how to add attachments to the issue when its created?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 1, 2023

Nice!  I always get the authentication wrong at least once when I'm coding.

Attachments are at https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-group-issue-attachments - you'll find a lot of other stuff in that API doc as well!

Dennis Celen February 1, 2023

i tried the json code, but it fails, is the url still the same?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 1, 2023

The url won't change because you have moved on to Oauth.

Have you adjusted the URLs to match your Cloud system?

Dennis Celen February 1, 2023

yes, and i get the following message:

 

{
    "errorMessages": [
        "Invalid request payload. Refer to the REST API documentation and try again."
    ]
}
further more, what bout the number on the end, is that right?
   
"self""https://<ourcompanyurl>.atlassian.net/rest/api/3/attachments/10000",
Dennis Celen February 2, 2023
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2023

How are you doing the Oauth?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events