Synchronous Import Sets & the REST API

strauberry
Giga Contributor

Greetings Community,


For some reason, I am unable to get our environment to synchronously execute the related Web Service Transform Map for records inserted by REST POST calls.


When I add records to my staging table manually, through the "New" UI Action - the transform map runs as expected and records are inserted appropriately into my target table..

However, any inserts inbound through the REST API simply stay in a state of "Pending" on the import table and no further action is carried out by the system. My speculation was some form of access control suppressing the ISET generated by my service account, but no amount of tinkering has gotten me any closer to the expected result.

Any guidance is appreciated, thank you!


-T

1 ACCEPTED SOLUTION

strauberry
Giga Contributor

I'm adding the solution to this problem here to help others through search indexing and knowledge base etc..



We escalated this issue to Hi and Mike Zelnik over there helped us pin down the root cause. It turns out that the web service account we had created required additional role permissions in order to trigger the subsequent Import Set & Transformation actions.



The final set of roles on the Web Service user account which generated excepted results:



import_scheduler


import_set_loader


import_transformer


rest_customer_portal


rest_service



I have not taken the additional steps to discover exactly what the minimum permissions needed to be successful would be, removing one or two of these roles does return errors from cURL tests. Here are brief descriptions of what the various import roles available should grant:




import_admin Can manage all aspects of import sets and imports.


import_scheduler Can schedule imports.


import_set_loader Can load import sets.


import_transformer Can manage import set transform maps and run transforms.



Cheers!


View solution in original post

3 REPLIES 3

strauberry
Giga Contributor

I'm adding the solution to this problem here to help others through search indexing and knowledge base etc..



We escalated this issue to Hi and Mike Zelnik over there helped us pin down the root cause. It turns out that the web service account we had created required additional role permissions in order to trigger the subsequent Import Set & Transformation actions.



The final set of roles on the Web Service user account which generated excepted results:



import_scheduler


import_set_loader


import_transformer


rest_customer_portal


rest_service



I have not taken the additional steps to discover exactly what the minimum permissions needed to be successful would be, removing one or two of these roles does return errors from cURL tests. Here are brief descriptions of what the various import roles available should grant:




import_admin Can manage all aspects of import sets and imports.


import_scheduler Can schedule imports.


import_set_loader Can load import sets.


import_transformer Can manage import set transform maps and run transforms.



Cheers!


symantecchris
Mega Contributor

Thanks Tyler. I am working with our OCI team on a REST API integration (inbound) and this will likely come in handy.



How did you create the import set / staging tables prior to running your REST API integration? Did you just use the:


POST /api/now/import/<TABLE_NAME> HTTP/1.1


command/request and define your import set table name there the first time (having the request create the table, in essence)?



Once the table is created via the command/request from the above, did you then go into your SN instance and build your transform map accordingly?



Much thanks for any help and input you can provide. It sounds like you've got the whole REST API integration fairly figured out (and I'm relatively new).


I figured out what I needed to do. Disregard.