Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the URL for the Server to cloud imported image

shama.c.m
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 8, 2023

We are using the server to Cloud media import. 

Below URL is to access source image ( JIRA server )

<<source-domain>>/jira/secure/attachment/2250654/screenshot-4.png

Below URL is to access destination image ( JIRA cloud )

<<destination-domain>>/rest/api/3/attachment/content/13738

 

1)What is the folder structure (source-JIRA server )we need to follow for importing

2) What is the destination URL we can use to access the imported image 

1 answer

1 vote
Jehan Bhathena
Community Champion
August 8, 2023

Hi @shama.c.m ,

Im not entirely sure I understand your questions, but this is my jab at trying to address the points mentioned:

  1. Folder structure for the Attachment in Server can be found in this post: https://community.atlassian.com/t5/Jira-Software-questions/How-to-identify-the-path-and-filename-of-attachments/qaq-p/2272485#M249394
  2. Destination URL is as you've mentioned in the question, not sure what the intention or use case is here?

While migrating I followed the below approach.

  1. Back up all the attachments to a new folder (for safe keeping)
  2. After all the issues have been migrated, using the Jira Server API fetch the name of all attachments in a issue and their ID
  3. Map the above to the data copied in the first step
  4. Using Jira cloud API patch the Image with name from step 2, to the cloud issue

Hope this helps

shama.c.m
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 9, 2023

Hi Jehan , 

Thank you for your response . 

Please can you elaborate with an example  for Step 2 using the Jira Server API fetch the name of all attachments in a issue and their ID

Also please let me know how to do the mapping. 

 

Thanks

Shama

Jehan Bhathena
Community Champion
August 10, 2023

hi @shama.c.m ,

 You can use this API to get all the information present in the ticket : https://docs.atlassian.com/software/jira/docs/api/REST/1000.1568.0/#api/2/issue-getIssue

From here you can store the attachment name and ID, then you can use the ID to search for this issue in the server, and rename it accordingly. Once renamed, you can upload this file to the Jira Cloud using the Attachment PUT Api call.

---

PS: Just curious to know why you dont want to use the Migrate to Cloud option available OOB in Jira :-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events