- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
I have a requirement to expose the status of a Service Catalog RITM through REST API.
I am using the Table API on sc_req_item with the GET method to retrieve the ticket details. I am able to get the normal field-level values like:
number
state
approval
stage
However, the issue is with the stage/status details shown in the list view.
In the list view, ServiceNow shows the complete stage progress like:
Request Approval - Completed Pre-Checks - Completed AWS Account Provisioning - Completed Network - Completed Infra Pre-Requisites - Completed Infra Provisioning - Completed Database Configuration - Completed Application Pre-Requisites - In Progress Application Deployment - Pending / Has not started Assessment - Pending / Has not started URL Publishing - Pending / Has not started
But on the RITM form, the stage field only shows the current stage, for example:
Application Deployment
My question is:
Is there any supported way to get the full stage progress/status details through REST API, the same way it is visible in the list view?
I want to know whether this data is available through:
sc_req_item Table API itself,
any related workflow/flow context tables,
any Service Catalog stage history table,
or whether a custom Scripted REST API is required to return this information.
The requirement is to return each stage name along with its status, such as Completed, In Progress, or Pending / Has not started, for a given RITM.
Please suggest the correct table/API or recommended approach.
Thanks,
Sravani C
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @Sravani36
You can retrieve the information about which stages have been completed by reviewing the audit history of the Requested Item (RITM). The audit history records changes made to the stage field, allowing you to determine the progression of the request.
If you need to expose this information through an API, you can create a Scripted REST API that reads the stage history from the audit records and returns a custom response containing all completed stages, along with any additional details required by your consumer application.
This approach provides flexibility to format the response according to your business requirements while leveraging the existing audit data maintained by ServiceNow.
If you found my response helpful and it answered your question, please consider marking it as the accepted solution and giving it a thumbs up. It helps others in the community find the solution more easily.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @Sravani36
You can retrieve the information about which stages have been completed by reviewing the audit history of the Requested Item (RITM). The audit history records changes made to the stage field, allowing you to determine the progression of the request.
If you need to expose this information through an API, you can create a Scripted REST API that reads the stage history from the audit records and returns a custom response containing all completed stages, along with any additional details required by your consumer application.
This approach provides flexibility to format the response according to your business requirements while leveraging the existing audit data maintained by ServiceNow.
If you found my response helpful and it answered your question, please consider marking it as the accepted solution and giving it a thumbs up. It helps others in the community find the solution more easily.
Thank you!