Attachment API doesn't move all attachments

joel_tan1991
Kilo Contributor

Hi,

I've been having trouble with migrating all of my attachments of a particular table to another instance (From Helsinki to Kingston). I have used the REST attachment API (POST) and created a scheduled job script to run but not all attachments are moved.

REST message:

find_real_file.png

 

Script used:

find_real_file.png

Results are as follow:

 

find_real_file.png

 

 

I went over to manually attach the particular file and was able to do so. However, I am unable to attach via REST api of another instance.

find_real_file.png

As I have posted another issue possibly similar to this, I've decided to remove it and edit it onto this post as it may be related. 

 

Any ideas on where did I go wrong or know the solution to the attachment extension issue?

Thanks

1 ACCEPTED SOLUTION

Joel,

If your target instance returns 404, isn't it simply because the record you are trying to attach the file to doesn't exist on this instance with this table_sys_id ?

View solution in original post

13 REPLIES 13

Good news 🙂

Please mark your question as answered so that it can help others.

Dhruv Chandan
Giga Guru

Hi,

 

Can you check the "Content type", i think the content type isn't supported. 

and if you find a specific file that didn't move then try doing a single POST call for that file and diagnose the issue thereon.

 

Thanks,
Dhruv Chandan

Hi,

 

One of the attachment extension that wasn't migrated was "application/vnd.openxmlformats-officedoc". I am able to upload the file directly into the form. However, upon using the REST api script, I was returned with the error "Record doesn't exist or ACL restricts the record retrieval".

 

I tried doing just a single POST call. Same issue occurred. 

 

Supriya25
Tera Guru

i have same issue, can you help me on this 

https://community.servicenow.com/community?id=community_question&sys_id=0d7ea301db8f6f005d782183ca961990