Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Risk Assessment AP

elenar016
Tera Contributor

Hi,

On Servicenow when I create a Change Request ticket type this has an option to add Risk Assessment data in UI.  What is the Restful API? 

Does someone know what API should I use? or How can I get this API from Service Now? 

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @elenar016 

 

Do you want to send this data to other systems? The risk assessment data captured / stored in Assessment table. Do you want to send all details or only risk value.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

jaycoover
Tera Expert

The Change Management (change request) documentation can be found here-

https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/integrate/inbound-rest/concept/chan...

 

Best,

Jay

derekgray
Kilo Contributor

This may be of some help.

 

The Risk Assessment data for a Change Request can be accessed via the REST API using the Table API. You can use the Change Request API (change_request table) and the Risk Assessment API (asmt_assessment_instance table) to retrieve or update risk assessment data.

 

  1. ServiceNow REST API for Risk Assessment in Change Requests
  2. Retrieve Risk Assessment for a Change Request

To get the risk assessment data for a specific change request, you can query the assessment instance linked to the change request.

API Endpoint:

GET https://your-instance.service-now.com/api/now/table/asmt_assessment_instance?sysparm_query=source=ch...

  • This API retrieves assessment instances related to change requests.
  • You can modify the query to filter for specific change records.

Example cURL Request:

curl -X GET "https://your-instance.service-now.com/api/now/table/asmt_assessment_instance?sysparm_query=source=ch..." \
--header "Accept: application/json" \
--header "Authorization: Basic YOUR_CREDENTIALS"

 

  1. Get Risk Assessment from the Change Request Table

You can also directly query the change_request table and retrieve the risk level field.

API Endpoint:

GET https://your-instance.service-now.com/api/now/table/change_request?sysparm_fields=sys_id,number,risk...

  • This retrieves all change requests with risk level and impact values.

Example cURL Request:

curl -X GET "https://your-instance.service-now.com/api/now/table/change_request?sysparm_fields=sys_id,number,risk..." \
--header "Accept: application/json" \
--header "Authorization: Basic YOUR_CREDENTIALS"

 

  1. How to Find the API in ServiceNow?

If you want to discover available APIs in your ServiceNow instance:

 

 

  • Navigate to REST API Explorer

 

      • In ServiceNow, go to System Web Services > REST API Explorer.
      • Select Table API and choose the change_request or asmt_assessment_instance table.
      • Experiment with API calls and test responses.

 

  • Use API Documentation

 

    • Go to System Web Services > REST API Explorer > API Documentation.
    • Look for Table API or Assessment API to find specific endpoints.

 

  1. Create a Risk Assessment via API

To create a new risk assessment for a change request, send a POST request to the assessment instance table.

API Endpoint:

POST https://your-instance.service-now.com/api/now/table/asmt_assessment_instance

Example JSON Body:

{
  "source": "change_request",
  "source_id": "CHANGE_REQUEST_SYS_ID",
  "state": "in_progress",
  "due_date": "2025-03-01 12:00:00"
}

Summary:

  • Use the asmt_assessment_instance table to fetch risk assessment data.
  • Use the change_request table to get the risk level.
  • Use REST API Explorer in ServiceNow to test and find the right API.