How to give a read only API access to user?

Gudu
Tera Contributor

Hi Team,

I wanted to know how to give read only access to a user on incident table to fetch incident records?

 

There is a requirement that we have to create an API and give read only permission to a user so that user will be only able to fetch incident records on incident table . user shouldn't have write access to update anything.

 

What is the procedure to achieve this?

 

As per my knowledge i have to create below steps, please correct me if i am wrong.

1. i have to create a service account .for this and what roles i have to give this user?

2. i have to goto rest api explorer and i have to select GET method and in path parameters i have to give incident table name but confused about the sys_id part as it is mandatory. 

 

Please guide me on the procedure to create an API (with read only access to user)

 

Please let me know if anything required from my side? 

1 ACCEPTED SOLUTION

jMarshal
Mega Sage
Mega Sage

@Gudu wrote:

1. i have to create a service account .for this and what roles i have to give this user?

"sn_incident_read" is the role you'll wanna use.

 


@Gudu wrote:

2. i have to goto rest api explorer and i have to select GET method and in path parameters i have to give incident table name but confused about the sys_id part as it is mandatory. 


If it is looking for the sys_id of the incident table, it's "3a2e71bedb0232000fd9d211ce9619d2"....if you're looking for the sys_id of a specific record on that table, you may need to do a 2 step process, where you first ask for the INC number from the source (whatever is sending the request) and then query the table for the associated sys_id and then query based on the returned value (that record's sys_id)...but my guess is the former (you need the sys_id of the incident table).

View solution in original post

2 REPLIES 2

jMarshal
Mega Sage
Mega Sage

@Gudu wrote:

1. i have to create a service account .for this and what roles i have to give this user?

"sn_incident_read" is the role you'll wanna use.

 


@Gudu wrote:

2. i have to goto rest api explorer and i have to select GET method and in path parameters i have to give incident table name but confused about the sys_id part as it is mandatory. 


If it is looking for the sys_id of the incident table, it's "3a2e71bedb0232000fd9d211ce9619d2"....if you're looking for the sys_id of a specific record on that table, you may need to do a 2 step process, where you first ask for the INC number from the source (whatever is sending the request) and then query the table for the associated sys_id and then query based on the returned value (that record's sys_id)...but my guess is the former (you need the sys_id of the incident table).

Gudu
Tera Contributor

Thank you for your reply jMarshal. I will get this checked and update you.