How to insert, update or retrieve encrypted data via REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2017 04:09 AM
Hello Guys,
Need help please.
We have encrypted certain fields in our instance (only field level encryption via encryption context)
Now when I test it and retrieve the data via any REST API client, i cant see original value of that field instead see some encrypted value. But User must be able to view his queried issue and able to submit the issues.
So how do I handle this. Please help. example I ran the GET method to retrieve a record but i don't see original value. even though I have proper role.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2017 11:03 AM
Hi,
Are you using EDGE Encryption: Edge Encryption ?
Or you are doing it using some custom scripting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2018 01:10 PM
This is an OOB Behavior!
Suggested Workaround :
***GET***
- For retrieving records from the table that has an encrypted text field as a user WITH the necessary encryption context, send query parameter (sysparm_display_value=true) in request
http://INSTANCENAME.service-now.com/api/now/table/tab1?sysparm_display_value=true
***POST***
- For creating records with user that HAS the necessary encryption context, send query parameter (sysparm_input_display_value=true) in request
http://INSTANCENAME.service-now.com/api/now/table/tab1?sysparm_input_display_value=true
{"c1":"e25","password":"password25"} where password is encrypted text field"