I am trying to get all issues of a project version using the REST API,
GET https://host/rest/api/2/version/10782/relatedwork
But it always returns an empty response. Even though it has 76 issues in it.
I have verified the count using this API, https://host/rest/api/2/version/10782/relatedIssueCounts
Alternatively, I tried to get all issues with the JQL search, but I was unable to get the query to work.
Hi @Sharad Regoti
Welcome to the Community!
The /relatedwork endpoint isn't designed to return the list of issues within a version, it's the related issues for the given version id. You can add links to a version using the new Related work feature!
You can use the below JQL search endpoint to get those work items within the version
<span>GET /rest/api/2/search?jql=fixVersion=10782</span>
The relatedIssuesCounts returns the following counts for a version:
fixVersion
affectedVersion
(https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-version-id-relatedissuecounts-get)
It looks like you're new here. Sign in or register to get started.