Jira 8.20.0 REST API - GET /rest/api/2/screens not returning all properties. Is this a bug?

John Clayton September 8, 2022

The WADL for the /rest/api/2/screens is returning a JSON array of all the screens, but it appears to be missing properties that the WADL states will be there.

Returned Properties

  • id
  • name
  • description

Missing Properties

  • fieldScreenSchemes
  • fieldScreenWorkflows
  • deletable
  • expand

Detailed Questions

If I understand expansion correctly, I would get id values in the (missing) expand field that would indicate to me what values I could place into the expand URL parameter for future requests (assuming the fields were not expanded by default).  However, the entire expand field is missing.  Do I understand expansion properly?  Is there something else I need to be aware of?

 

I have tried adding the ?expand=fieldScreenSchems to the end of my request URL but this has no effect on the results returned.   This seems to me that the Jira server is not faithfully fulfilling the WADL response.   Am I missing something?

 

Thank you for any help you can offer!

1 answer

1 accepted

3 votes
Answer accepted
David Bakkers
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.
September 8, 2022

Hello @John Clayton 

I just did a test against my local instance of Jira Data Center v9.2.0 and the endpoint returns four properties: id, name, description and expand in the JSON response. For example:

GET http://localhost:8080/rest/api/2/screens

 

{
 "id"3,
 "name""Resolve Issue Screen",
 "description""Allows to set resolution, change fix versions and assign an issue.",
 "expand""fieldScreenSchemes,fieldScreenWorkflows,deletable"
}

If I then add the expand parameter and add those three properties, they all expand as expected. For example:

GET http://localhost:8080/rest/api/2/screens?expand=fieldScreenSchemes,fieldScreenWorkflows,deletable

 

 {
  "id": 3,
  "name": "Resolve Issue Screen",
  "description": "Allows to set resolution, change fix versions and assign an issue.",
  "fieldScreenSchemes": [],
  "fieldScreenWorkflows": [
   {
    "name": "jira",
    "actions": [
     {
      "id": 2,
      "name": "Close Issue",
      "firstStep": 1,
      "global": false
     },
     {
      "id": 5,
      "name": "Resolve Issue",
      "firstStep": 1,
      "global": false
     }
    ],
    "mode": "live"
   },
  ],
  "deletable": false,
  "expand": "fieldScreenSchemes,fieldScreenWorkflows,deletable"
 }


It's likely that the REST API documentation for Jira Server v8.20.0 is incorrect. It's a fairly old version now, so you may have to test against more recent versions inyour dev environment to confirm.

John Clayton September 8, 2022

Thank you for checking, David!  I will give it a try in a newer development instance and report back.   It sounds like maybe it has been fixed.

John Clayton September 8, 2022

Further update (while I slap my forehead).  It works in 8.20.0, but not in the 8.4.1 instance that I am migrating from.  Your answer was spot on.  Thanks!

Suggest an answer

Log in or Sign up to answer