For context, I’m trying to retrieve the total number of issues of a project. I don’t want to use the JQL search, for performance reasons.
While checking Atlassian’s REST API documentation, I see that the Get Project has a property called insight, which should have two ProjectInsight’s properties: lastIssueUpdateTime and totalIssueCount. The latter is the one I wanted to use, but the insight expand option ( I assume it should be /rest/api/2/project/{project_key}?expand=insight) never works for me (while some other parameters do work).
I’ve also tried with the previous V2, but the output is the same…
Has anyone achieved using this successfully, or is the API not working as expected?
Thanks a lot @rcsr. That method works (even though there is a hardcoded limit of 50 input parameters for the keys, I will probably iterate on it and treat it like the previous method).
I saw this thread today. Insight is still missing. I used the query below to retrieve the number of tickets and the last update in a single call. I also added fields=updated to minimize the response size.
response = .../rest/api/3/search?jql=project=<PROJECT KEY> ORDER BY updatedDate DESC&fields=updated&maxResults=1
insight.totalIssueCount = response.total
insight.lastIssueUpdateTime = response.issues[0].fields.updated