get:
  summary: Get the build results for packages, architectures and repositories of the specified project.
  description: |
    Get the build results for packages, architectures and repositories of the specified project.

    Since the schema of the output of this endpoint depends on the value of the `lastsuccess` parameter,
    the case where `lastsuccess` is set to `1` is documented under this [other endpoint](#/Build/get_build__project_name___result_lastsuccess_1).
  security:
    - basic_authentication: []
  parameters:
    - $ref: '../components/parameters/project_name.yaml'
    - in: query
      name: view
      schema:
        type: string
        enum:
          - status
          - summary
          - binarylist
      default: status
      description: |
        Specify which sections should be included in the result list.

        * `status`: Include detailed infos about the build status.
        * `summary`: Include the summary of the status values.
        * `binarylist`: Include a list of generated binary files.
    - in: query
      name: package
      schema:
        type: string
      description: Name of the package. Limit results to the specified package.
      example: 'obs-server'
    - in: query
      name: arch
      schema:
        type: string
      description: Name of the build architecture. Limit results to the specified build architecture.
      example: 'x86_64'
    - in: query
      name: repository
      schema:
        type: string
      description: Name of the repository. Limit results to the specified repository.
      example: 'openSUSE_Leap_15.2'
    - in: query
      name: lastbuild
      schema:
        type: string
      description: Set to `1` to show the last build result (excludes current building job states).
      enum:
        - 0
        - 1
      default: 0
      example: 1
    - in: query
      name: locallink
      schema:
        type: string
      description: Set to `1` to include build results from packages with project local links.
      enum:
        - 0
        - 1
      default: 0
      example: 1
    - in: query
      name: multibuild
      schema:
        type: string
      description: Set to `1` to include build results from _multibuild definitions.
      enum:
        - 0
        - 1
      default: 0
      example: 1
    - in: query
      name: lastsuccess
      schema:
        type: string
      description: |
        Set to `1` to show the last build results.

        Since the schema of the output of this endpoint depends on the value of the `lastsuccess` parameter,
        the case where `lastsuccess` is set to `1` is documented under this [other endpoint](#/Build/get_build__project_name___result_lastsuccess_1).
  responses:
    '200':
      $ref: '../components/responses/resultlist.yaml'
    '400':
      description: Bad Request.
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/api_response.yaml'
          examples:
            Not Boolean:
              description: Passing a value different than `0` or `1` to `multibuild`, for example.
              value:
                code: 400
                summary: not boolean
    '401':
      $ref: '../components/responses/unauthorized.yaml'
    '404':
      $ref: '../components/responses/unknown_project.yaml'
  tags:
    - Build
