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.

Alert creation via API POST request

YevheniiK
Mega Contributor

Hi Community!

I trying to investigate how to create an Alert via API and face with issue.

When I do API call, like 

curl "https://dev286647.service-now.com/api/now/table/em_alert" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{\"source\":\"Nagios\",\"node\":\"Server123\",\"type\":\"CPU\",\"severity\":\"1\",\"description\":\"CPU usage has exceeded 90% on Server123\",\"classification\":\"3\",\"additional_info\":\"cpu_load\",\"resource\":\"Server123\"}" \
--user 'admin':'admin'

 

getting almost empty Alert in the UI

YevheniiK_0-1730192488215.png

Alert created via API explorer with full admin rights. I didn't create any restriction ACL, etc.. Use instance out of the box.

I only face this issue when creating an alert. Incidents and Security Incidents are created correctly with all needed fields.

1 REPLY 1

TJ29
Tera Contributor

Hi @YevheniiK - did you manage to find a solution for this? We've run into the same problem