Create an incident related to a CI via the REST table API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2020 07:56 AM
Hi,
I'm new to Service Now and I need to create an incident related to a CI using the REST Table API.
Actually I was able to do it by sending POST to the api/now/v2/table/incident endpoint with the below JSON attached:
{
"short_description": "testing cmdb relation",
"description": "testing cmdb relation",
"impact": "3",
"urgency": "3",
"caller_id": "jarekk",
"cmdb_ci": "affd3c8437201000deeabfc8bcbe5dc3"
}
It seems that the cmdb_ci field accepts the sys_id value of a CI. Retrieving the sys_id requires one extra step before creating an incident. I would like to avoid it.
I started to wonder if there is any other way to identify CI in the above request: by name, serial number or etc… I couldn't find comprehensive documentation. I would appreciate any guidance regarding this topic.
Thanks,
Jarek

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2020 03:20 AM
I don't think there are any restrictions. Please make sure that you are using the right referenced record without any spaces.