Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-7129

Create new WS api/components/tree to navigate through components

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4
    • Component/s: Web API
    • Labels:
      None

      Description

      The goal is to be able to navigate through components easily.

      • URL: api/components/tree
      • Method: GET
      • Description: Navigate through components based on the chosen strategy. The baseComponentId or the baseComponentKey parameter must be provided
      • Permissions: Requires one of the following permissions:
        • 'Administer System' permission
        • 'Administer' rights on the specified project
        • 'Browse' and 'See Source Code' on the specified project
      • Errors:
        • 404 if the base component is not found
        • 400 if a qualifier is not managed by the platform
        • 400 if the language is unknown
      • Parameters:
        • baseComponentId: base component id. The search is based on this component. The response does not include the component.
        • baseComponentKey: base component key. The search is based on this component. The response does not include the component.
        • strategy:
          • children: return the direct children components of the base component. Grandchildren components are not returned.
          • all: return all the children components of the base component. Grandchildren components are returned.
          • leaves: return all the children components (in general files) which don't have other children. They are the leaves of the component tree.
        • qualifiers: list of qualifiers available with associated meaningful name. By default all the managed qualifiers are returned.
        • q: query on component name or key of the returned components (depends on the strategy). Directories are not returned by the search query (due to resource index limitation)
        • s: sort by component name or path
        • p, ps: usual paging parameters. Max. 500
      • Response fields:
        • components: the base component is not returned
          • id: uuid
          • key
          • projectId
          • name
          • description
          • qualifier
          • path
          • createdAt
        • paging: usual paging fields

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                teryk.bellahsene Teryk Bellahsene (Inactive)
                Reporter:
                teryk.bellahsene Teryk Bellahsene (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: