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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,644,335
Community Members
 
Community Events
196
Community Groups

Create an issue from https://mydomain.net/rest/api/2/issue with a field custom_field "insigth"

Hi

I'd like to create an issue from this endpoint "https://mydomain.net/rest/api/2/issue", Ihave several field and one of this field is a customfield_10040 of type "Insigth". I saw all objects I have from this endoint:

https://api.atlassian.com/jsm/insight/workspace/{my_idworkspace}/v1/iql/objects

And I got this result:

{

"workspaceId": "my_idworkspace",
"globalId": "my_idglobalid",
"id": "70",
"label": "56QW",
"objectKey": "CMDA-70",

}

What json format must I use to create the issue?, should I format the json like this?, even though it doesn't work.

"customfield_10040": 

          [{

               "workspaceId": "my_idworkspace",
               "globalId": "my_idglobalid",
               "id": "70",
               "label": "56QW",
               "objectKey": "CMDA-70",

          }]

Or should I use another api?

Thanks

 

 

2 answers

Hi, after trying some combinations ... the way to crate an insigth field from the endpoint 

https://mydomain.net/rest/api/2/issue  is:

Take the value from this field:

 "globalId": "my_idglobalid",

 

For this you can use this endpoint:

https://api.atlassian.com/jsm/insight/workspace/{my_idworkspace}/v1/iql/objects

ie. you will get a string for the field  "globalId",such as: "f454sdf98djfgjfkgj89787ffdf:70"

 

Then, use this value for the field "id".

"customfield_10040": 

          [{

               "id": "f454sdf98djfgjfkgj89787ffdf:70"
          }]

I'm quite surprised that I couldn't find anything on docs!

0 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 09, 2022

Hi @jg 

I haven't tried this with API, but I know when using the External System Import, Insight fields need to be formatted like this:

abcdefg1234:4321

abcdefg1234 = workspace ID

4321 = Object ID

Thanks for the anwser, It doesn't work as you say from this endpoint:

https://mydomain.net/rest/api/2/issue

 

...(other fields)....

"customfield_10040": 

          [{

               "98sduds-dsf34-dsfsf9sdsiuysDF": "CMDA-70"
          }]

 

It creates the ticket but not the customfield_10040

Anyone who knows?, thanks

Suggest an answer

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

Atlassian Community Events