tracardi icon indicating copy to clipboard operation
tracardi copied to clipboard

Endpoint that finds what plugins use the given resource

Open atompie opened this issue 2 years ago • 3 comments

There is no easy way to find where the resource is used. When you want delete the resource we need a way to find all the plugins that use it. It can be helpful when the resource is deleted or on the resource details page.

Task

Create and enpoint

/resource/{id}/usage

Iterate over all workflows, unpack it and find plugins that use this workflow by id.

atompie avatar Jul 28 '22 10:07 atompie

we have to find the better way. Resources may be used by imports and destinations as well

DawidekZagajnik avatar Jul 30 '22 18:07 DawidekZagajnik

Your are right, then we have to look for the resources also in destinations and imports as well

atompie avatar Jul 31 '22 08:07 atompie

@atompie actually that can be checked once while saving every workflow. Situation is easy for destinations and imports - we know the field to look for. We get decoded workflow while saving anyway, so we can look through it before encoding it and save it in a new field, so we can run regular search, which requires less effort for database and less time.

DawidekZagajnik avatar Aug 01 '22 17:08 DawidekZagajnik