Delete items via Import Set

lucaburgazzoli
Mega Contributor

Hi,

 

according to the Service Now rules to interact with Service Now tables via REST API one has to use Import Sets which work fine as long as people need to insert data but how can I delete a record ? Table API supports DELETE verb but Import Set doesn't.

 

 

1 ACCEPTED SOLUTION

That is correct that if you're modifying data you must use import sets. We actually won't certify a solution that deletes data at all and we recommend that you set records as inactive rather than deleting. What is the use case that is requiring deletes?

View solution in original post

8 REPLIES 8

lucaburgazzoli
Mega Contributor

I do not have a specific use case, I'm just collection what I can do through the Import Set comparing to the Table API.

As a developer it looks strange to me that the Table API can be used only to query a table but not to perform any other action even if they are documented and exposed through REST interface.

There are a number of capabilities that the platform has that exist for various reasons. The app certification process is very strict in order to protect customers and ensure that store apps are stable and secure.

jonathonbarton
Mega Expert

Here's why deleting records is a bad idea...

There are a few Asset records that come in with Demo Data loaded on a bare instance in Eureka (which is where we started). Our Asset Manager wanted them out of there to have a clean slate before loading "live" Asset Data, so she removed those "starter" asset records, which included things like, "ServiceNow" and "Linux Server".

Those "starter" asset records were linked as CIs (via Related Records) on about 65,000 INC and CHG records going back to 2015. The CI on those Incidents and Changes disappeared. 

It took HI about 2 weeks and standing up a temporary server to cleanly recover those 65,000 links and restore the missing CIs and Asset Records. 

Never. Every. Delete. Anything. Just flag it as inactive. Trust.

lucaburgazzoli
Mega Contributor

I perfectly understand that delete thing is a bad idea 🙂 - trust - but as Table API allows to do so and as I need to expose ServiceNow functionalities to our customers I was checking what a certified application can do and what not so I can prepare workflows to accommodate user needs without violating the rules.