REST API: How to get project type (Next Gen or Classic) from "Get Issue" endpoint

Nick Kim July 29, 2020

I'd like to be able to tell if an issue belongs to a project that is either a classic or next-gen project.

The example response for the Get issue endpoint shows that I should be able to check fields -> project -> style, however this is not returned to me in the response. That value is returned to me if I use the Get project endpoint.

I've tried using the different expand and properties query params but neither of those get me the project style.

Here is the JSON for the project field that I receive. In testing it seems that all classic projects return "simplified" as "false", and all next gen projects return "simplified" as "true", but can someone confirm that's a safe assumption to make?

{
"expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
"id": "26947",
"self": "https://someserver.atlassian.net/rest/api/3/issue/26947",
"key": "KEY-4",
"fields": {
"project": {
"self": "https://someserver.atlassian.net/rest/api/3/project/10526",
"id": "10526",
"key": "NNGSP",
"name": "Next Gen Scrum Project",
"projectTypeKey": "software",
"simplified": true,
"avatarUrls": {
"48x48": "https://someserver.atlassian.net/secure/projectavatar?avatarId=10503",
"24x24": "https://someserver.atlassian.net/secure/projectavatar?size=small&s=small&avatarId=10503",
"16x16": "https://someserver.atlassian.net/secure/projectavatar? size=xsmall&s=xsmall&avatarId=10503",
"32x32": "https://someserver.atlassian.net/secure/projectavatar?size=medium&s=medium&avatarId=10503"
}
}
}
}

1 answer

1 accepted

0 votes
Answer accepted
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 30, 2020

Hello Nick,

Thank you for reaching out to Atlassian Community!

When using API for next-gen projects, currently, it doesn't show explicitly if it's next-gen, but what defines it is the "Simplified".

Using the example you posted, we can see that it's a next-gen because it shows Simplified: true.

"self": "https://someserver.atlassian.net/rest/api/3/project/10526",
      "id": "10526",
      "key": "NNGSP",
      "name": "Next Gen Scrum Project",
      "projectTypeKey": "software",
      "simplified": true,

Using the same API for a classic project, it will show False:

Screen Shot 2020-07-30 at 16.27.20.png

Hope this clarifies!

If you have any other questions regarding this matter, please let us know.

Regards,
Angélica

Nick Kim July 30, 2020

Wonderful. Thanks for confirming!

Thank you Angélica!!!

Like Angélica Luz likes this

Suggest an answer

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

Atlassian Community Events