We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

REST API ATTACHMENT

arwinblones
Tera Contributor

Hi Dev,

I want to know if how does it work? im currently trying to implement the attachment api binary and multipart but i got always an error upon my end. Here is the script i used for manual testing on my end in the background script i always got this error

No URIs provided, removing all URI matcher rules

arwinblones_2-1769073093468.png

 



arwinblones_1-1769072977121.png

 

the user has the following roles. These roles are setup since i build my own ebonding integration which is working correctly i just reuse the user as my authentication user. I dont have a problem regarding on this one since its working fine on my ebonding integrations only the main problem is the rest api attachment integration.

arwinblones_3-1769073160788.png


Can you identify what causing it to become 401 and removing all URI matcher rules?

No URIs provided, removing all URI matcher rules
*** Script: Attachment Untitled Diagram.png sent. Status: 401 

 

6 REPLIES 6

@Ankur Bawiskar 

my requirement is to make it work using OAuth2.0 but my oauth2.0 is not working directly if i applied. Since upon testing using the admin user name and pass declaring it into the BR. It works that way but when i converted it to the OAuth 2.0 that im already using from my E-Bonding it doesnt work on it.

Addition to it was the update. Its duplicating the previous attachment that i already attached when i attach a new one and update the request. like if instance 1 has 2 attachment and i added an attachment into my instance 2 the total of attachment should be reflected on instance 1 is 3 but that doesnt go that way instead of 3 it became 5 duplicating the 2 previous attachments.

arwinblones
Tera Contributor

@Ankur Bawiskar 

- The only one left on my end is the update one im not sure if should i use GET or still POST only on this. Since my main error that im currently facing is the replication of previous attachment when I trigger my Update Business Rule for updating incident and inserting new attachment