201 response to inbound web service POST (ACL question)

petercawdron
Kilo Guru

Hi,

This question relates to another community question, inbound rest without authentication

I have an unauthenticated inbound REST web service (POST) that was previously getting 403 (not authorized). At the suggestion of another community member, I've...

  • turned on public pages for this particular inbound transform table
  • added the originating domain to CORS
  • set up a generic ACL for table.* write and table.* create

Now the POST returns a 201 and inserts a blank row.

  • If I use the REST API Explorer, I can insert a row successfully (200 response).
  • If I put the sample javascript code produced by the REST API Explorer into a UI Action (testing from within ServiceNow), I can insert a row successfully (200 response).
  • If I put the sample javascript code in JSfiddle (testing from outside ServiceNow), a blank row is inserted with a 201 response (replicating what I'm seeing with the actual service)

I think the problem lies with ACLs on the transform table the REST service is inserting its data into, but I'm not sure.

Does anyone have any ideas?

1 ACCEPTED SOLUTION

Geoffrey,



Yes, the row is always blank.



A colleague of mine has just pointed out that a scripted web service avoids this problem entirely, so I've been able to implement this using that approach and will mark this closed.



Thanks for your help.



Cheers,


Peter


View solution in original post

5 REPLIES 5

Good to know.   Thanks, Peter.