Manage Release version ‘Related work’ links via api

sampsasaarela September 27, 2022

Is it possible get/put/post version Related Work (remote links) via rest API for versions (aka releases, not issues)?

Api endpoint 

https://my.atlassian.net/rest/api/latest/version/{versionId}/remotelink responses successfully but always return empty array even I have link added. I tried also POST, but couldn't figure out what fields I should post and didn't find anything from docs.

Wondering if this is supported or not and am I doing something wrong?

4 answers

1 accepted

1 vote
Answer accepted
sampsasaarela September 28, 2022
0 votes
Phill Pafford October 10, 2023

Has there been any updates to this? I see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-version-id-relatedwork-post

but I don't know where to find the body of the curl request

 

basically took the response object and populated it and sent as the data object

{"category":"<string>","issueId":29,"relatedWorkId":"<string>","title":"<string>","url":"<string>"}

but getting this response 

{"errorMessages":["Invalid request payload. Refer to the REST API documentation and try again."]}

 

EDIT: got it working, issue needed to be an integer and I had it as a string, and relatedWorkId is null

{"category":"<string>","issueId":29,"relatedWorkId":"<string>","title":"<string>","url":"<string>"}

Michael Hedman October 24, 2023

I've done this, and spent some time with support, currently, the issueId isn't respected to set it up to a linked jira ticket.  it'll come back in the body, but when you look at the page after setting it up through the api, you still don't see any linked issue.  So maybe they'll fix that.

Like Phill Pafford likes this
0 votes
Michael Hedman May 5, 2023

Direct link to the Atlassian jira ticket:  https://jira.atlassian.com/browse/JSWCLOUD-24200

it's still Gathering information, so it may be 4 or 5 years before they get to it. /s

0 votes
Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2022

Hi @sampsasaarela ,

 

Here's the Atlassian documentation :

 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-remote-links/#api-group-issue-remote-links

 

This can only be done by issue ID. 

 

You may be better off using a JQL to grab all issues related to a version. 

 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-get

 

-Ben

sampsasaarela September 27, 2022

Thanks, @Benjamin, but I don't mean issue links; I mean links to anywhere in the version page, eg: https://my.atlassian.net/projects/{project}/versions/{id}/tab/release-report-all-issues So it is not related to the issue.

 

Screenshot 2022-09-28 at 6.42.29.png

Suggest an answer

Log in or Sign up to answer