As an admin I would like to have a REST API call to retrieve IDs of all uploaded hook scripts

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: API - REST
    • None
    • 1

      It is not possible to use the REST API to get a list of all uploaded hook scripts that are not yet associated with any project or repository. If a customer didn't write down the script ID after uploading it and before it is associated with any project or repository, there is no REST API endpoint to retrieve the ID of that script.

      Workaround

      1. Iterate through projects and repositories and use REST API endpoints to retrieve a list of scripts associated with them. This is not feasible when there are many projects or repositories.
      2. Check the file system directory <BITBUCKET_HOME>/shared/config/hook-scripts/.
        There should be files named SOMENUMBER-0 inside that directory; the "SOMENUMBER" part is the script ID.
      3. Use the database query to get a list of all uploaded hook scripts:
        select * from bb_hook_script;
        

            Assignee:
            Unassigned
            Reporter:
            Nenad Opsenica (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: