wit icon indicating copy to clipboard operation
wit copied to clipboard

How can I delete all intents programatically?

Open DavidCampaneroGarcia opened this issue 8 years ago • 5 comments

I just want to try with differents data sets, and program a function that allows me to reset the app.

I already can create new Traits and test the application.

But now if I want to try a different dataset I want to delete the Intents I created previously and add the new ones.

I don't want to delete the entire app and create a new one, cause I want to use the same Authentication Bearer everytime.

Is there any way to delete only the intents?

DavidCampaneroGarcia avatar Mar 02 '18 12:03 DavidCampaneroGarcia

You can use https://wit.ai/docs/http/20170307#delete--entities-:entity-id-link

l5t avatar Mar 02 '18 17:03 l5t

But that would delete the entity "intent" isn't it? I want to delete the traits inside the entity "Intent" not intent itself.

DavidCampaneroGarcia avatar Mar 02 '18 17:03 DavidCampaneroGarcia

Let me clarify, an intent = a trait entity. Each entity has value so in your case you want to remove the intent values? if so: https://wit.ai/docs/http/20170307#delete--entities-:entity-id-values-link

l5t avatar Mar 02 '18 17:03 l5t

@DavidCampaneroGarcia Indeed - to remove a single value, you can use DELETE https://api.wit.ai/entities/$ENTITY_ID/values/$ENTITY_VALUE.

patapizza avatar Mar 02 '18 17:03 patapizza

@l5t @patapizza Oh I understand, yeah there were the values what I wanted to delete. I made it work know :)

I was Posting them with this: https://wit.ai/docs/http/20170307#post--samples-link So i thought I would have to use something similar. You can close the thread now, thank you guys!

DavidCampaneroGarcia avatar Mar 02 '18 18:03 DavidCampaneroGarcia