DELETE server from the instance
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-18-2023 11:34 PM
I am using the below refrence to delete the server
DELETE /now/cmdb/instance/{classname}/{sys_id}/relation/{rel_sys_id}
below is the curl commnad i am using
curl "https://xyz.service-now.com/api/now/cmdb/instance/cmdb_ci_linux_server/412589b3db108514a7ee4b4913961..." \
--request DELETE \
--user 'xyz':'xyz'
below is the error i am getting
{"error":{"message":"Relation with sys id '412589b3db108514a7ee4b4913961936' does not exist","detail":null},"status":"failure"}
Please help - i can connect over zoom to shocase the issue in more detail.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-20-2023 09:39 AM
Hi,
The API endpoint is for deleting a CI relationship related to the server, not the server CI itself.
The error says there is no relationship with that sys_id.
Regards,
NIklas
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-23-2023 07:47 AM
Use delete jobs.. Try in non prod first