Table API get all Variables for RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 08:26 PM
Using the Table API I can get the response of a sc_task and sc_req_item however to get any variable on those I need to add the specific variable name to the sysparm_fields like this:
https://<instance>.service-now.com/api/now/table/sc_req_item/<id>?sysparm_fields=variables.xyz
I need to grab all of the variables regardless of the particular RITM I'm looking at, I've read about ways to grab the variables by going through the sc_item_option and sc_item_option_mtom tables but that doesn't make sense from a security or design standpoint, if I can sysparm_fields for the variables I'm looking for then I should have access to the variables without access to the other tables.
I'm looking for a way to get all variables for a given RITM when I'm not sure what the variable names are.
Is there really no way to simply fetch all of the variables instead of dot walking every individual variable by name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2024 08:16 AM - edited 09-29-2024 08:18 AM
Hello @JakobR,
Please refer to the links below:
https://www.servicenow.com/community/developer-forum/get-variable-values-from-ritm-using-rest-api/m-...
If it is helpful, please mark it as helpful and accept the correct solution. In future, it might be helpful for someone to refer to this solution.
Thanks & Regards,
Abbas Shaik