cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Delete an asset via API

eric_hansen_wor
New Contributor

After retrieving a list of assets a user has created via the log API, I would like to make another API call to delete them.

Is this possible using public or private APIs?

5 REPLIES 5

dmiller
Admin Admin
Admin

You could build a pipeline that uses the SnapLogic Delete Snap, then create a Triggered task to call it from a URL.


Diane Miller
Community Manager

Using SnapLogic to manage SnapLogic assets is not an option for me.

The activity API has to arguments: filter_asset and filter_project but thereโ€™s no example usage in the document.

Which values are compatible with those filters?

dmiller
Admin Admin
Admin

Per development:
filter_asset: filter activity by an assetโ€™s label
filter_project: filter activity by projectโ€™s label

There are some dependencies.
filter_ project also needs filter_project_space
filter_ asset needs filter_project_space and filter_ project

For example:
https://elastic.snaplogic.com/api/1/rest/public/activities/orgname?filter_project_space=projects&fil...


Diane Miller
Community Manager

Outstanding, thank you. I would love to see that included in the API documentation.

My solution will be to query the Activity API for activities in a project/Dir, and use the HTTP DELETE method for anything in the directory before deleting the directory itself.

Itโ€™s not ideal, but thankfully I was able to monitor the HTTP traffic in the Management UI and make the same kind of API calls to manage assets.

Thanks again.