/
API reference

API reference

The list of APIs presented by the application.

 

Key points

These Impersonate API Service REST endpoints are used to retrieve user visible knowledge base articles and catalog items, but these APIs can be used for other purposes as well.

get_is_allowed

This methods checks whether the objects are available for a user and returns the list in the format of: [{'sys_id': sys_id, 'allowed': true/false}, ...].

  • REST request type: GET

  • URL: /api/x_konve_snowimp/impersonated/get_is_allowed

Parameters

  • user_sys_id: sys_id of the users accessing the object.

  • table_name: table of the object (chat_queue_entry).

  • sys_id: the list of sys_id objects of the table.

Returns a list of objects such as:

[{'sys_id' : item_sys_id, 'allowed': true }, ... ]

get_objects

This method returns JSON with definitions of the objects a user can see.

  • REST request type: GET

  • URL: /api/x_konve_snowimp/impersonated/get_objects

Parameters

  • user_sys_id: sys_id of the users accessing the object.

  • table_name: table of the object (chat_queue_entry).

  • sys_id: the list of objects.

Returns a list of objects such as:

[{'sys_id' : object_1_sys_id, 'field_1': value_1 'field_2': value_2 ... }, ... ]

get_journal_field

There is a table in ServiceNow called sys_journal_field. This a system journal that keeps data on actions that were done to objects. A regular user cannot access this journal.

The get_journal_field method allows to retrieve records from sys_journal_field about objects of the table_name type that a user can see. Thus, if a user can see a given object, the associated records on this object are returned. If there are no objects a user can see, no records are returned.

  • REST request type: GET

  • URL: /api/x_konve_snowimp/impersonated/get_journal_field

Parameters

  • user_sys_id: sys_id of the users accessing the object.

  • table_name: table of the object (chat_queue_entry).

  • element_id: sys_id of the object.

  • element: an optional parameter; if set, the filtering of sys_journal_field objects takes place on this field with the defined value.

Related content

Overview
More like this
Service account
More like this
Impersonate API Service
Impersonate API Service
More like this
Troubleshooting
More like this