ECC Queue Access - Insert attachment using Rest

Kalaiarasan Pus
Giga Sage

Hello Guys,

I am trying to attach files to incidents using rest web service (JSONV2). I am able to insert the attachment using ECC queue when I am using user account with admin access .

Reference - Generate Attachments in ServiceNow via REST-John Andersen

But when I am trying to do this using a account having rest_service role, I am not able to do this.. I thought that this might be a access issue. So i tried creating a 'create access control' on ecc_queue table and still this is not working. But with the create ACL added, I am getting status as 200 indicating successful insertion. When I open and check the ECC queue, I   am noticing that everytime I do a transaction, an empty record is being inserted in the ecc_queue.

What else do I need to do inorder for this to work with a user account which is not having admin role.

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Table access was the issue. Added table level write and read access along with create access and it worked.


User account can have only rest_service role and soap_create was not required to do this...



Thanks for your help guys !!!


View solution in original post

5 REPLIES 5

srinivasthelu
Tera Guru

Write ACL.



Thanks


Srini


Tried that already but no luck


Mike Allen
Mega Sage

I was able to do it with a few things:



https://instance.service-now.com/ecc_queue.do?JSONv2&sysparm_action=insert



Capture.PNG



Capture.PNG



Capture.PNG


Capture.PNG


venkata_koya
ServiceNow Employee
ServiceNow Employee

Just to clarify 'rest_service' role has nothing to do with JSONV2. It is for REST API which should looks like api/now/table/ecc_queue


To answer your question, creating attachment via REST should work if you set all the topic, agent field properly. There is one catch using REST interface to create attachment though. How big is your attachment file after Base64 encoding. Will it fit in payload field of ecc_queue table.