Hello Akhil,
That depends on what you mean by no longer in use and valid. For example, are these the filters or dashboards that were created by inactive users for example, or filters that include deleted projects..etc. Generally, you can find and delete the shared filters and dashboard from System > Shared Items. However, you may need to use database queries to identify these filters. Examples of these queries are below:
-- shared filters that are shared and authored by inactive users
select * from searchrequest where id in (select entityid from sharepermissions where entitytype='SearchRequest') and authorname not in (select lower_user_name from cwd_user where active=1);
-- shared dashboards that are authored by inactive users
select * from portalpage where id in (select entityid from sharepermissions where entitytype ='PortalPage') and fav_count <1 and username not in (select lower_user_name from cwd_user where active=1);
-- filters that contains a certain project
select * from searchrequest where reqcontent like '%projectname%';
To delete them, you can either use the GUI or the REST API. It is not recommended to delete them from the database. You may also need to follow a kind of procedure to avoid deleting dashboards and filters that are still used. A good explanation of such is discussed in the following community post:
The rest API to delete dashboards and filters can be found below:
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.