How to add internal attachment to issue?
Hi!
How I can do the following through api?
I have found solution for comments, but I can`t find it for attachments.
While adding comment I can add "isInternal": true
to body and it works.
How to do the same with attachments?
my python code
url = f"{YOUTRACK_BASE_URL}/api/issues/{issue_id}/attachments"
headers = {"Authorization": f"Bearer {YOUTRACK_API_KEY}","Accept": "application/json"}
files = [("file", (file_name, file))]
response = await httpx_client.post(url, files=files, headers=headers)
Please sign in to leave a comment.
Hello Sergii,
Thank you for the question.
To make an attachment internal, you need to limit its visibility in the body of your request. For example:
In the “ringId” attribute, provide the ID of the target group that needs to have access to the attachment.
For reference: https://www.jetbrains.com/help/youtrack/devportal/api-entity-UserGroup.html#63efc27a
Yes, it works. Thanks!