How to get list of all snippets available in Bitbucket server

This article helps you in getting the list of all snippets including the private ones from the Database for all the users available in the Bitbucket server.

Instructions

All the snippets of related information can be found in the listed tables below:

AO_E7AC78_SNIPPET_ENTITY

AO_E7AC78_SNIPPET_PERMISSION

AO_E7AC78_SNIPPET_TO_CATEGORY

AO_E7AC78_SNIPPET_WATCHER

  1. To get the list of all the snippets including the private snippets for all the users, use the select statement for the table AO_E7AC78_SNIPPET_ENTITY, as mentioned below:

    SELECT * FROM public."AO_E7AC78_SNIPPET_ENTITY"


    The results are as follows:

     

  2. To associate the username with the snippet information, use the below statement:

    SELECT * FROM public."AO_E7AC78_SNIPPET_ENTITY" ao JOIN sta_normal_user u ON ao."USER_ID" = u.user_id


    The results are as follows: