Hi,
I am creating remote link by this code or api , we can see that link created with help of postman api but when opening that jira issue in browser that is not coming:
Hi @Dilip Kumar Shrivastwa
Welcome to the Atlassian Community!
Please try this one.
import os
import requests
from requests.auth import HTTPBasicAuth
def create_remote_link(issue_key, remote_link_url, remote_link_title):
jira_base = os.getenv("JIRA_BASE_URL") # https://yourcompany.atlassian.net
jira_user = os.getenv("JIRA_USER_EMAIL")
jira_token = os.getenv("JIRA_API_TOKEN")
url = f"{jira_base}/rest/api/3/issue/{issue_key}/remotelink"
auth = HTTPBasicAuth(jira_user, jira_token)
headers = {"Content-Type": "application/json"}
# Minimal required payload
payload = {
"object": {
"url": remote_link_url, # must be absolute (https://...)
"title": remote_link_title
}
}
response = requests.post(url, headers=headers, auth=auth, json=payload)
if response.status_code in (200, 201):
print("Remote link created successfully.")
print(response.json())
else:
print(f"Failed to create remote link: {response.status_code}")
print(response.text)
Thanks for reply @Gor Greyan ,
But our requirement to show this link under application name "Success Pilot", the updated code you shared that is available at any place. It was working fine last 5 days back, but now its not available to see anyone. but with postman api able to see those links.
please suggest and guide
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.