Trigger UI action through rest api call
This content was last updated in 2020. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 08:05 AM
Hello,
I want to be able to trigger a UI action that is located on a record on a specific table
I tried using this method found in this link: https://servicenowthink.wordpress.com/2019/10/15/call-any-ui-action-with-rest-api-or-ajax-ootb-updat...
This is in python:
url = 'https://URLHERE/api/now/ui/ui_action/sys_id_of_ui_action?' \
'sysparm_table=table_of_target_record&' \
'sysparm_sys_id=' sys_id_of_target_record& '\
'api=api'
headers = {"Content-Type":"application/json","Accept":"application/json"}
response = requests.post(url, auth=(user, pwd), headers=headers, verify = False )
if response.status_code != 200 and response.status_code != 201:
print('Status:', response.status_code, 'Headers:', response.headers, 'Error Response:',response.json())
exit()
data = response.json()
and i am receiving
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 10:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 10:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 11:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 11:19 AM