Solved

Issue with cognite events

  • 9 May 2023
  • 3 replies
  • 50 views

Hello Team,

i have deleted some of the events from cognite but still i can see its present and when i click on that then it’s giving resource not found. can anyone please help what can be the issue.

and also I am trying to delete all that also not able to delete due to previous issue.

PFA.

 

icon

Best answer by Dilini Fernando 9 May 2023, 15:27

View original

3 replies

Userlevel 4
Badge +2

Hi @Shah Ayushi,

Thank you for posting this question. 

This is the expected behavior of the system. If the event is deleted and you try to fetch the details, it fails. Due to that, you are observing the above shared image. If you have any questions, please feel free to post them here. 

Best regards,
Dilini 

Hello Dilini,

Thanks for reply.

I have doubt. if it’s deleted then it should not come right if i am retrieving list of events.

actually, i was trying to delete all events so i am retrieving and the based on list of ids i am trying to delete, so if it has already deleted then why it’s coming while retrieving.  please help me on this. this is blocker for us.

please find below source code.

all_ev = []

for event_list in clientobj.events(type="insight",limit=None):

    all_ev.append(event_list.id)

res = clientobj.events.delete(id=all_ev)

print("DONE")

Regards,

Aysuhi.

Userlevel 4
Badge +2

Hi @Shah Ayushi,

Since we received Support ticket for this I hope it is ok to further communicate through  the ticket.

Best regards,
Dilini 

Reply