Splunk IT Service Intelligence

ITSI REST API delete : Can't manage to delete deep dives

jwillaime
Explorer

Hello,

I am trying to create and delete some deep dives view via the API.

While creating them is mostly done correctly (although they do not appear in the web GUI), I have issues deletting them.

Following are the cURL commands done to try to delete:

curl -k -u admin:pass  -X GET https://localhost:8089/servicesNS/nobody/SA-ITOA/itoa_interface/deep_dive?filter='\{"title":"Test+Em...;

Reponse:
[{"object_type": "deep_dive", "_key": "26acc2cf-15d4-11ea-812f-28924a399516"}]

Deletion command:

curl -k -u admin:pass  -X DELETE https://localhost:8089/servicesNS/nobody/SA-ITOA/itoa_interface/deep_dive?filter='\{"title":"Test+Em...;

No response

When I ask again for the same deepdice, I get the following:

curl -k -u admin:pass  -X GET https://localhost:8089/servicesNS/nobody/SA-ITOA/itoa_interface/deep_dive?filter='\{"title":"Test+Em...;

Reponse:
[{"object_type": "deep_dive", "_key": "26acc2cf-15d4-11ea-812f-28924a399516"}]

I would have thought that this last command would have given me a "element not found" or an empty list, but this is not the case.
The same thing happens even when using no filter, to delete all deep dives.

Am I missing something? Am I doing something wrong? Or is it a bug?

Thank you in advance.

0 Karma
1 Solution

esnyder_splunk
Splunk Employee
Splunk Employee

Try deleting the deep dive using the deep dive key in the URL. For example, “itoa_interface/deep_dive/DEEP_DIVE_KEY” instead of what you're currently doing, which is a query param.

View solution in original post

esnyder_splunk
Splunk Employee
Splunk Employee

Try deleting the deep dive using the deep dive key in the URL. For example, “itoa_interface/deep_dive/DEEP_DIVE_KEY” instead of what you're currently doing, which is a query param.

jwillaime
Explorer

Thanks for the help! That method works, but I still wonder if the previous method isn't bugged or something.

If you have a look at the documentation,
(https://docs.splunk.com/Documentation/ITSI/4.4.0/RESTAPI/ITSIRESTAPIreference#ITOA_Interface)
The example they give is the following:

curl -k -u admin:password https://localhost:8089/servicesNS/nobody/SA-ITOA/itoa_interface/entity?fields='title''&'filter='\{"t...' -X DELETE

Which is very similar to what I was trying to do.

0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...