You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Is there a way to get the Insight custom fields from my Jira's instance API with its objects according to their object schema?
E.g. I have the following Insight custom field named test and when I'm creating a new issue I can see all the objects available according the Object Schema that I selected in the configuration:
Is there a way to get this information (the Insight custom fields with its objects) from the API? I know that I can get all the objects from a specific schema by using the endpoint /iql/objects?iql=objectSchema="SCHEMA", but what I want to get is the custom fields with its objects.
Just in case, I'm using the following endpoint to get all the others custom fields from my instance:
If a custom field has multiple values to choose, it will show me the field "allowedValues" with the values for the custom field, but this doesn't happen when it's an Insight custom field.
Can you guys give me a hand with this?
Did you manage to find a way to do that? Or maybe there is something available right now, I tried searching for a solution but I couldn't find anything.
I need the same thing - I have a custom field that is using Insight and I would like to use REST calls to get the possible values (objects)?
That's an interesting question.
It's possible that the IQL defined in the custom field context is only used for building the UI and not validated at all in the back end. This might imply Jira API will allow you to input any object via the rest API. I'm not even sure if the object key is validated to make sure it is valid.
But that still leaves you not knowing what are the possible values.
I checked and I can't find any public insight or Jira rest API that can give you the configuration for a custom field context (that would let you get the IQL so you could use the main insight API to get the list of objects).
I can find an internal insight API that can return the IQL, but you would first need to identify the correct config id for the issue context (project and issue type). But there are no public APIs for that either.
The insight internal API is:
/rest/insight/1.0/customfield/default/<custom field context id>/connect
If you have Scriptrunner, you could create a custom Rest API that can use the JavaAPI to get this information.