
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2019 12:36 PM
Trying to figure out Why I can insert a new from the GUI into cmdb_ci_storage_volume table without any relations, but when I try to do the same via API (see this thread https://community.servicenow.com/community?id=community_question&sys_id=20c5ed1ddbd7a3c0fa192183ca96...) I have to add relations.
Why is that so?
I want to use this CMDB API to get all functions and checks for input data and not just use table API.
Using Kingston at the moment.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2019 01:38 AM
I see there are some typos in the request body that you had tried earlier. Here is the one that is working for me in REST Client
Please use the following body and try again and also make sure that type and target sys_id's are valid
{
"attributes":
{
"name": "heju-test-20190204-008",
"fqdn": "heju-test-20190204-008",
"company": "d9efdcacdb4a620076fabc2ffe9619a8",
"location":"6b059335dbd18f0076fabc2ffe9619c9",
"storage_type": "LUN",
"last_discovered": "2019-01-21 08:33:29",
"short_description": "Here's a newly created storate volume ci related to computer Child created from ServiceNow API outbound - 8",
"object_id": "test2",
"volume_id":"test2",
"dns_domain": "blank-heju",
"ip_address": "10.14.121.124"
},
"source": "ServiceNow",
"depends_on":{
"inbound_relations" :
{ "type": "55c95bf6c0a8010e0118ec7056ebc54d",
"target":"00e0fc12db062f001c19b6bffe961931",
"sys_class_name": "cmdb_ci_computer"
}
}
}
Part of response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2019 04:44 AM
Wow, what a journey! But I think you finally nailed it! I got it to work on my side.
- CI got inserted
- Relations got added to CI
All done. Thank you very much!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2019 04:45 AM
You are very welcome 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2019 05:48 AM
I also got some good feedback from @charlieloza that you can generate payload in ServiceNow:
Generate and simulate payload execution using identification simulation