Details

      Description

      As a user of the REST API I want to be able to perform a search for people in the system so that I can build a client that can show and select people i.e. for assigning to a workflow.

      Acceptance Criteria

      basePath: /alfresco/api/-default-/public/alfresco/versions/1
      paths:
        '/queries/live-search-people':
          get:
            tags:
              - queries
              - 5.2 changes
            summary: Live search for people
            description: |
              Returns a list of people that match the given search criteria.
              
              The search term is used to look for matches against person id, firstname and lastname.
      
              The search term
              - must contain a minimum of 2 alphanumeric characters
              - can optionally use '*' for wildcard matching
            operationId: liveSearchPeople
            produces:
              - application/json
            parameters:
              - name: term
                in: query
                description: | 
                  The term to search for.
                type: string
                required: true
              - $ref: '#/parameters/skipCountParam'
              - $ref: '#/parameters/maxItemsParam'
              - $ref: '#/parameters/fieldsParam'
              - name: orderBy
                in: query
                description: |
                  The list of results can be ordered by the following:
                  * id
                  * firstName
                  * lastName
                type: string
                required: false
            responses:
              '200':
                description: Successful response
                schema:
                  $ref: '#/definitions/PersonPaging'
              '400':
                description: |
                  Invalid parameter: value of **maxItems** or **skipCount** is invalid, or search **term** too short, or **orderBy** invalid
              '401':
                description: If authentication fails          
              default:
                description: Error response
                schema:
                  $ref: '#/definitions/Error'
      definitions:
        PersonPaging:
          type: object
          properties:
            list:
              type: object
              properties:
                pagination:
                  $ref: '#/definitions/Pagination'
                entries:
                  type: array
                  items:
                    $ref: '#/definitions/PersonEntry'
        PersonEntry:
          type: object
          properties:
            entry:
              $ref: '#/definitions/Person'
      

      Notes

      • Used as one of the category types returned from the live search: documents, users, sites. Needs to be consistent with those.
      • Need to be consistent with the rest of the V1 people API and based on the implementation of the v0 "live search" REST API

      Open Questions

      • should we add an injected system property that allows the "query template" to be re-configured (as per v0 "live search")

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gcornwell Gavin Cornwell
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: