HR case access through REST API

bigbacon
Giga Guru

I am trying to access case data via REST API using asp.Net.

 

I have done this successfully for incidents in the past (both get and post) but for some reason I can't see to find out which table I need in order to access case data. 

 

I am trying to get case data base on either number (HRXXXXX) or creation_date. 

 

I tried using the table "sn_hr_core_case" but that didn't work using a test URL call of

https://INSTANCE.service-now.com/api/now/table/sn_hr_core_case?number=HRC0097319


I think I am just missing some roles possibly to do this. I can query this using my profile in the REST Api Explorer but I can't get a result using the service account we use for access rest apis. What roles does a user account need to be able to get results from this?

https://INSTANCE.service-now.com/api/now/table/sn_hr_core_case?sysparm_limit=1&number=HRC0097319

Also, iss it possible to get items based on the sys_created_on date using range like  >= a specific date/time and <= a date/time. It doesn't seem like it works correctly.

2 REPLIES 2

bigbacon
Giga Guru

Anyone have any idea how to give a web service User access to the sn_hr_core tables as read only? No matter what roles this user has, it can call the table API but it can never get any content back.

bigbacon
Giga Guru

So if we use the Admin role, all this data is accessible. That seems unreasonable to use for an API account. 

 

I guess I need to figure out how to make a support ticket with SN about what roles to use and/or how to even figure that out. Our own SN admin can't even figure that out.