How can I get history of Issue with time using Rest API

Hi

I want time between Issue created and set Issue to InProgress type

1 answer

This widget could not be displayed.

If you use a standard "get issue", the response includes the history, so you can work it out from there.  See https://docs.atlassian.com/jira/REST/server/#api/2/issue-getIssue

Hi Nic

Thanks for your answer

I tried GetIssue API but in that i am not able to get history of Issue, I want whole history like when it was created, when it was assign to someone, when it was in InProgress status.

Please see the below Json data for reference

{  
   "expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
   "id":"10101",
   "self":"https://vaishalshah.atlassian.net/rest/api/2/issue/10101",
   "key":"DEMO-5",
   "fields":{  
      "issuetype":{  
         "self":"https://vaishalshah.atlassian.net/rest/api/2/issuetype/10104",
         "id":"10104",
         "description":"A problem which impairs or prevents the functions of the product.",
         "iconUrl":"https://vaishalshah.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10303&avatarType=issuetype",
         "name":"Bug",
         "subtask":false,
         "avatarId":10303
      },
      "timespent":null,
      "project":{  
         "self":"https://vaishalshah.atlassian.net/rest/api/2/project/10000",
         "id":"10000",
         "key":"DEMO",
         "name":"Demo",
         "avatarUrls":{  
            "48x48":"https://vaishalshah.atlassian.net/secure/projectavatar?avatarId=10324",
            "24x24":"https://vaishalshah.atlassian.net/secure/projectavatar?size=small&avatarId=10324",
            "16x16":"https://vaishalshah.atlassian.net/secure/projectavatar?size=xsmall&avatarId=10324",
            "32x32":"https://vaishalshah.atlassian.net/secure/projectavatar?size=medium&avatarId=10324"
         }
      },
      "fixVersions":[  

      ],
      "customfield_10110":null,
      "customfield_10111":null,
      "aggregatetimespent":null,
      "resolution":null,
      "customfield_10112":null,
      "customfield_10113":null,
      "customfield_10114":"Not started",
      "customfield_10104":null,
      "customfield_10105":null,
      "customfield_10106":null,
      "customfield_10107":null,
      "customfield_10108":null,
      "customfield_10109":null,
      "resolutiondate":null,
      "workratio":-1,
      "lastViewed":"2017-04-08T18:46:45.093+0530",
      "watches":{  
         "self":"https://vaishalshah.atlassian.net/rest/api/2/issue/DEMO-5/watchers",
         "watchCount":1,
         "isWatching":true
      },
      "created":"2017-04-06T14:54:56.989+0530",
      "customfield_10100":null,
      "priority":{  
         "self":"https://vaishalshah.atlassian.net/rest/api/2/priority/2",
         "iconUrl":"https://vaishalshah.atlassian.net/images/icons/priorities/high.svg",
         "name":"High",
         "id":"2"
      },
      "customfield_10101":null,
      "customfield_10102":null,
      "customfield_10300":null,
      "customfield_10103":null,
      "labels":[  

      ],
      "timeestimate":null,
      "aggregatetimeoriginalestimate":null,
      "versions":[  

      ],
      "issuelinks":[  

      ],
      "assignee":{  
         "self":"https://vaishalshah.atlassian.net/rest/api/2/user?username=admin",
         "name":"admin",
         "key":"admin",
         "emailAddress":"dsvishrut@gmail.com",
         "avatarUrls":{  
            "48x48":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=48",
            "24x24":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=24",
            "16x16":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=16",
            "32x32":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=32"
         },
         "displayName":"vaishal shah  [Administrator]",
         "active":true,
         "timeZone":"Asia/Kolkata"
      },
      "updated":"2017-04-07T17:16:36.758+0530",
      "status":{  
         "self":"https://vaishalshah.atlassian.net/rest/api/2/status/3",
         "description":"This issue is being actively worked on at the moment by the assignee.",
         "iconUrl":"https://vaishalshah.atlassian.net/images/icons/statuses/inprogress.png",
         "name":"In Progress",
         "id":"3",
         "statusCategory":{  
            "self":"https://vaishalshah.atlassian.net/rest/api/2/statuscategory/4",
            "id":4,
            "key":"indeterminate",
            "colorName":"yellow",
            "name":"In Progress"
         }
      },
      "components":[  

      ],
      "timeoriginalestimate":null,
      "description":"This is demo 5",
      "timetracking":{  

      },
      "customfield_10005":null,
      "attachment":[  

      ],
      "aggregatetimeestimate":null,
      "summary":"demo5",
      "creator":{  
         "self":"https://vaishalshah.atlassian.net/rest/api/2/user?username=admin",
         "name":"admin",
         "key":"admin",
         "emailAddress":"dsvishrut@gmail.com",
         "avatarUrls":{  
            "48x48":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=48",
            "24x24":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=24",
            "16x16":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=16",
            "32x32":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=32"
         },
         "displayName":"vaishal shah  [Administrator]",
         "active":true,
         "timeZone":"Asia/Kolkata"
      },
      "subtasks":[  

      ],
      "reporter":{  
         "self":"https://vaishalshah.atlassian.net/rest/api/2/user?username=admin",
         "name":"admin",
         "key":"admin",
         "emailAddress":"dsvishrut@gmail.com",
         "avatarUrls":{  
            "48x48":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=48",
            "24x24":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=24",
            "16x16":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=16",
            "32x32":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=32"
         },
         "displayName":"vaishal shah  [Administrator]",
         "active":true,
         "timeZone":"Asia/Kolkata"
      },
      "customfield_10000":"{}",
      "aggregateprogress":{  
         "progress":0,
         "total":0
      },
      "customfield_10001":null,
      "customfield_10115":null,
      "customfield_10116":"0|i0000v:",
      "environment":null,
      "duedate":null,
      "progress":{  
         "progress":0,
         "total":0
      },
      "comment":{  
         "comments":[  
            {  
               "self":"https://vaishalshah.atlassian.net/rest/api/2/issue/10101/comment/10000",
               "id":"10000",
               "author":{  
                  "self":"https://vaishalshah.atlassian.net/rest/api/2/user?username=admin",
                  "name":"admin",
                  "key":"admin",
                  "emailAddress":"dsvishrut@gmail.com",
                  "avatarUrls":{  
                     "48x48":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=48",
                     "24x24":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=24",
                     "16x16":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=16",
                     "32x32":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=32"
                  },
                  "displayName":"vaishal shah  [Administrator]",
                  "active":true,
                  "timeZone":"Asia/Kolkata"
               },
               "body":"done",
               "updateAuthor":{  
                  "self":"https://vaishalshah.atlassian.net/rest/api/2/user?username=admin",
                  "name":"admin",
                  "key":"admin",
                  "emailAddress":"dsvishrut@gmail.com",
                  "avatarUrls":{  
                     "48x48":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=48",
                     "24x24":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=24",
                     "16x16":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=16",
                     "32x32":"https://secure.gravatar.com/avatar/1df96a0499031157c6bd6b5fccb80634?d=mm&s=32"
                  },
                  "displayName":"vaishal shah  [Administrator]",
                  "active":true,
                  "timeZone":"Asia/Kolkata"
               },
               "created":"2017-04-06T14:59:49.111+0530",
               "updated":"2017-04-06T14:59:49.111+0530"
            }
         ],
         "maxResults":1,
         "total":1,
         "startAt":0
      },
      "votes":{  
         "self":"https://vaishalshah.atlassian.net/rest/api/2/issue/DEMO-5/votes",
         "votes":0,
         "hasVoted":false
      },
      "worklog":{  
         "startAt":0,
         "maxResults":20,
         "total":0,
         "worklogs":[  

         ]
      }
   }
}

History.pngThanks and Regards

Vaishal

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

114 views 1 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you