I am trying extract the configuration information from Jira through API, one of the example i am looking is to know what custom fileds are assocaited with issues objects, similarity teams object and other etc
Hello @Kiran Pampati
There's no single endpoint to dump whole config. You must use a set of different endpoints.
GET /rest/api/3/field and /field/{fieldId}/contexts will show you global fields and where they're mapped.
The Team field is just a standard custom field (com.atlassian.teams:rm-teams-custom-field-team) that expects a Team ID, which is separate from the actual Teams directory API.
Cheers,
Arek 🤠
Hi @Kiran Pampati, to build on Arek's answer, here's the chain I'd use (all GETs, Jira admin permission needed for most of them):
GET /rest/api/3/field/search?type=custom&expand=lastUsed,screensCount,contextsCount
GET /rest/api/3/field/{fieldId}/context
GET /rest/api/3/field/{fieldId}/context/projectmapping
/context/issuetypemapping
GET /rest/api/3/field/{fieldId}/screens
GET /rest/api/3/workflowscheme/project?projectId=10000
/project?projectId=
If you need the answer more than the script, Admin Pro for Jira (disclosure: I built it) shows this in searchable tables, including each field's contexts with their spaces and work types and the spaces behind every scheme, and exports to Excel/CSV. It's read-only and free for up to 10 users: https://marketplace.atlassian.com/apps/3804509124/admin-pro-for-jira
Hi @Kiran Pampati,
Welcome to the Atlassian community!
Arek and Jesse covered contexts, screens and the workflow scheme. I would add three things.
First, try createmeta. GET /rest/api/3/issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId} returns the fields actually available for a space and work type. Context, screen, and field configuration are already resolved, so it often saves you the whole chain.
GET /rest/api/3/issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId}
Second, a field on a screen is not automatically used. To see which space and work type use a screen, I would follow issuetypescreenscheme > screenscheme > screens > tabs > fields. To see whether a field is hidden or required, I would check fieldconfigurationscheme > fieldconfiguration. All of these support the /project?projectId= pattern Jesse mentioned.
Third, the Team field only stores a team ID. To resolve it, I would use the Teams public API:GET https://{site}.atlassian.net/gateway/api/public/teams/v1/org/{orgId}/teams?siteId={siteId}
GET https://{site}.atlassian.net/gateway/api/public/teams/v1/org/{orgId}/teams?siteId={siteId}
Add siteId, or teams scoped to a site will not come back.
siteId
You can find all endpoints here: Jira REST API v3: https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/ Teams REST API: https://developer.atlassian.com/platform/teams/rest/v1/
Writing a custom script to collect that information from the REST API end-points may be more difficult than it seems.
I think the Glass Project Information app is a readily available solution that could save you lots of efforts.
It looks like you're new here. Sign in or register to get started.