---
components:
  schemas:
    archHostOs:
      properties:
        architecture:
          example: amd64
          type: string
        hostname:
          example: idefix
          type: string
        os:
          example: Linux
          type: string
        osversion:
          example: '5.15.0-48-generic [Ubuntu 22.04.1 LTS (jammy)]'
          type: string
      type: object
    cCompiler:
      properties:
        cc:
          example: cc
          type: string
        ccversion:
          example: 11.2.0
          type: string
        index:
          example: 1
          format: int64
          type: integer
        key:
          example: cc##11.2.0
          type: string
      type: object
    compilerVersion:
      properties:
        comp:
          example: cc
          type: string
        compversion:
          example: 11.2.0
          type: string
      type: object
    flatReport:
      properties:
        applied_patches:
          example: SMOKE5e0c3e4a3b85ccc05e1127d901a87d55a48e5b98
          type: string
        architecture:
          example: x86_64
          type: string
        compiler_messages:
          example: ''
          type: string
        config_count:
          example: 2
          format: int64
          type: integer
        configs:
          items:
            $ref: '#/components/schemas/testConfig'
          type: array
        cpu_count:
          example: '2[8 cores]'
          type: string
        cpu_description:
          example: AMD Ryzen 7 5700G with Radeon Graphics (3792 MHz)
          type: string
        duration:
          example: 3833
          format: int64
          type: integer
        git_describe:
          example: v5.37.2-535-g5e0c3e4a3b
          type: string
        git_id:
          example: 58b390f21b8cbcf54ebe4dfb3786c00da473edd5
          type: string
        harness3opts:
          example: null
          type: string
        harness_only:
          example: 0
          type: string
        hostname:
          example: lx09
          type: string
        id:
          example: 42
          format: int64
          type: integer
        lc_all:
          example: null
          type: string
        log_file:
          example: ''
          type: string
        osname:
          example: Linux
          type: string
        osversion:
          example: '5.15.0-48-generic [Ubuntu 22.04.1 LTS (jammy)]'
          type: string
        out_file:
          example: ''
          type: string
        perl_id:
          example: 5.31.10
          type: string
        plevel:
          example: 5.037002zzz535
          type: string
        smoke_branch:
          example: blead
          type: string
        smoke_date:
          example: 2022-09-16T23:25:02+02:00
          format: date-time
          type: string
        summary:
          example: PASS
          type: string
        username:
          example: smoker
          type: string
      type: object
    fullReport:
      properties:
        applied_patches:
          example: SMOKE5e0c3e4a3b85ccc05e1127d901a87d55a48e5b98
          type: string
        architecture:
          example: x86_64
          type: string
        average_in_hhmm:
          example: 31 minutes 56 seconds
          type: string
        c_compilers:
          items:
            $ref: '#/components/schemas/cCompiler'
          type: array
        compiler_messages:
          example: ''
          type: string
        config_count:
          example: 2
          format: int64
          type: integer
        configs:
          items:
            $ref: '#/components/schemas/testConfig'
          type: array
        cpu_count:
          example: '2[8 cores]'
          type: string
        cpu_description:
          example: AMD Ryzen 7 5700G with Radeon Graphics (3792 MHz)
          type: string
        duration:
          example: 3833
          format: int64
          type: integer
        duration_in_hhmm:
          example: 1 hour 3 minutes
          type: string
        git_describe:
          example: v5.37.2-535-g5e0c3e4a3b
          type: string
        git_id:
          example: 58b390f21b8cbcf54ebe4dfb3786c00da473edd5
          type: string
        harness3opts:
          example: null
          type: string
        harness_only:
          example: 0
          type: string
        hostname:
          example: lx09
          type: string
        id:
          example: 42
          format: int64
          type: integer
        lc_all:
          example: null
          type: string
        log_file:
          example: ''
          type: string
        osname:
          example: Linux
          type: string
        osversion:
          example: '5.15.0-48-generic [Ubuntu 22.04.1 LTS (jammy)]'
          type: string
        out_file:
          example: ''
          type: string
        perl_id:
          example: 5.31.10
          type: string
        plevel:
          example: 5.037002zzz535
          type: string
        smoke_branch:
          example: blead
          type: string
        smoke_date:
          example: 2022-09-16T23:25:02+02:00
          format: date-time
          type: string
        summary:
          example: PASS
          type: string
        username:
          example: smoker
          type: string
      type: object
    perlVersion:
      properties:
        label:
          type: string
        value:
          type: string
      type: object
    reportList:
      properties:
        latest_plevel:
          example: 5.037002zzz535
          type: string
        page:
          example: 2
          format: int64
          type: integer
        report_count:
          example: 1
          format: int64
          type: integer
        reports:
          items:
            $ref: '#/components/schemas/shortReport'
          type: array
        rpp:
          example: 25
          format: int64
          type: integer
      type: object
    searchFormValues:
      properties:
        branches:
          items:
            example: blead
            type: string
          type: array
        perl_versions:
          items:
            $ref: '#/components/schemas/perlVersion'
          type: array
        sel_arch_os_ver:
          items:
            $ref: '#/components/schemas/archHostOs'
          type: array
        sel_comp_ver:
          items:
            $ref: '#/components/schemas/compilerVersion'
          type: array
      type: object
    shortReport:
      properties:
        architecture:
          example: x86_64
          type: string
        cpu_count:
          example: '2[8 cores]'
          type: string
        cpu_description:
          example: AMD Ryzen 7 5700G with Radeon Graphics (3792 MHz)
          type: string
        git_describe:
          example: v5.37.2-535-g5e0c3e4a3b
          type: string
        git_id:
          example: 58b390f21b8cbcf54ebe4dfb3786c00da473edd5
          type: string
        hostname:
          example: lx09
          type: string
        id:
          example: 42
          format: int64
          type: integer
        osname:
          example: Linux
          type: string
        osversion:
          example: '5.15.0-48-generic [Ubuntu 22.04.1 LTS (jammy)]'
          type: string
        perl_id:
          example: 5.31.10
          type: string
        plevel:
          example: 5.037002zzz535
          type: string
        smoke_branch:
          example: blead
          type: string
        smoke_date:
          example: 2022-09-16T23:25:02+02:00
          format: date-time
          type: string
        summary:
          example: PASS
          type: string
        username:
          example: smoker
          type: string
      type: object
    statusRecord:
      properties:
        active_since:
          example: 2022-09-25T20:19:29+02:00
          format: date-time
          type: string
        app_name:
          example: Perl5::CoreSmokeDB
          type: string
        dancer2:
          example: v1.3513
          type: string
        hostname:
          example: idefix
          type: string
        rpc_plugin:
          example: v1.05
          type: string
        running_pid:
          example: 74020
          format: int64
          type: integer
      type: object
    testConfig:
      properties:
        arguments:
          example: -Duseithreads
          type: string
        cc:
          example: cc
          type: string
        ccversion:
          example: 11.2.0
          type: string
        debugging:
          enum:
            - D
            - N
          type: string
        duration:
          example: 1850
          format: int64
          type: integer
        id:
          example: 968
          format: int64
          type: integer
        report_id:
          example: 165
          format: int64
          type: integer
        results:
          items:
            $ref: '#/components/schemas/testResult'
          type: array
      type: object
    testFailure:
      properties:
        failure_id:
          example: 6
          format: int64
          type: integer
        result_id:
          example: 968
          format: int64
          type: integer
      type: object
    testResult:
      properties:
        config_id:
          example: 356
          format: int64
          type: integer
        failures:
          items:
            $ref: '#/components/schemas/testFailure'
          type: array
        id:
          example: 968
          format: int64
          type: integer
        io_env:
          example: stdio
          type: string
        locale:
          example: en_US.UTF-8
          type: string
        stat_cpu_time:
          example: 333.31
          type: string
        stat_tests:
          example: 1174882
          format: int64
          type: integer
        statistics:
          example: u=4.42  s=1.73  cu=302.89  cs=31.80  scripts=2494  tests=1174882
          type: string
        summay:
          example: F
          type: string
      type: object
    version:
      properties:
        db_version:
          description: (schema)version stored in the database
          example: 3
          type: string
        schema_version:
          description: schema version stored in the database handler
          example: 3
          type: string
        version:
          description: backend app version
          example: 1.00
          type: string
      type: object
info:
  contact:
    email: abeltje@test-smoke.org
  description: |-
    This is the API for the [Perl5-CoreSmokeDB-Web](https://perl5-dev.test-smoke.org)
      Vue.js application.
  license:
    name: Artistic License 2.0
    url: https://www.perlfoundation.org/artistic-license-20.html
  title: 'Perl5::CoreSmokeDB::API::Web - openapi 3.0'
  version: 1.00
openapi: 3.0.0
paths:
  '/api/full_report_data/{reportId}':
    get:
      description: Get the full expanded smoke report for :id
      operationId: rpc_full_report_data
      parameters:
        - description: the id of the report
          in: path
          name: reportId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fullReport'
          description: We have a report
        400:
          description: Not a valid request
      summary: Get the full expanded smoke report
      tags:
        - report
  /api/latest:
    get:
      description: List of latest smoke reports per host
      operationId: rpc_latest
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/reportList'
          description: A object with information of the smoke report list
        400:
          description: Not a valid request
      summary: List of latest smoke reports
      tags:
        - reportlist
  '/api/report_data/{reportId}':
    get:
      description: Get the full expanded smoke report for :id
      operationId: rpc_report_data
      parameters:
        - description: the id of the report
          in: path
          name: reportId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flatReport'
          description: We have a report
        400:
          description: Not a valid request
      summary: Get the full expanded smoke report
      tags:
        - report
  '/api/reports_from_date/{epoch}':
    get:
      description: 'Get a list of ids, starting with epoch'
      operationId: rpc_reports_from_epoch
      parameters:
        - in: path
          name: epoch
          required: true
          schema:
            format: int64
            type: integer
      responses:
        200:
          content:
            application/json:
              schema:
                items:
                  format: int64
                  type: integer
                type: array
          description: We have a list (even empty)
        400:
          description: Not a valid request
      summary: Get report-ids from epoch
      tags:
        - report
  '/api/reports_from_id/{reportId}':
    get:
      description: 'Get a list of ids, starting with reportId'
      operationId: rpc_reports_from_id
      parameters:
        - in: path
          name: reportId
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: limit
          required: false
          schema:
            format: int32
            type: integer
      responses:
        200:
          content:
            application/json:
              schema:
                items:
                  format: int64
                  type: integer
                type: array
          description: We have a list (even empty)
        400:
          description: Not a valid request
      summary: Get report-ids from reportId
      tags:
        - report
  /api/searchparameters:
    get:
      description: Get the values for the search form from the database
      operationId: rpc_get_search_parameters
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/searchFormValues'
          description: We have data
        400:
          description: Not a valid request
      summary: Get the values to fill the search form
      tags:
        - search
  /api/searchresults:
    get:
      description: Get the results for the given search form values
      operationId: rpc_get_search_results
      parameters:
        - in: query
          name: selected_arch
          required: false
          schema:
            default: ''
            type: string
        - in: query
          name: selected_osnm
          required: false
          schema:
            default: ''
            type: string
        - in: query
          name: selected_osvs
          required: false
          schema:
            default: ''
            type: string
        - in: query
          name: selected_host
          required: false
          schema:
            default: ''
            type: string
        - in: query
          name: selected_comp
          required: false
          schema:
            default: ''
            type: string
        - in: query
          name: selected_cver
          required: false
          schema:
            default: ''
            type: string
        - in: query
          name: selected_perl
          required: false
          schema:
            default: latest
            type: string
        - in: query
          name: selected_branch
          required: false
          schema:
            default: ''
            type: string
        - in: query
          name: andnotsel_arch
          required: true
          schema:
            enum:
              - 0
              - 1
            type: string
        - in: query
          name: andnotsel_osnm
          required: true
          schema:
            enum:
              - 0
              - 1
            type: string
        - in: query
          name: andnotsel_osvs
          required: true
          schema:
            enum:
              - 0
              - 1
            type: string
        - in: query
          name: andnotsel_host
          required: true
          schema:
            enum:
              - 0
              - 1
            type: string
        - in: query
          name: andnotsel_comp
          required: true
          schema:
            enum:
              - 0
              - 1
            type: string
        - in: query
          name: andnotsel_cver
          required: true
          schema:
            enum:
              - 0
              - 1
            type: string
        - in: query
          name: page
          required: true
          schema:
            default: 1
            format: int64
            type: integer
        - in: query
          name: reports_per_page
          required: false
          schema:
            default: 25
            format: int64
            type: integer
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/reportList'
          description: We have results
        400:
          description: Not a valid request
      summary: Do an actual search
      tags:
        - search
        - reportlist
  /api/version:
    get:
      description: 'app_version, db_version, schema_version'
      operationId: rpc_version
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/version'
          description: we have versions
        400:
          description: Not a valid request
      summary: Get some versions
      tags:
        - misc
  /system/status:
    get:
      description: Get the current status of the Service
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/statusRecord'
          description: Status
        400:
          description: Not a valid request
      summary: Current service status
      tags:
        - system
servers:
  - url: https://perl5-preview.test-smoke.org
tags:
  - description: Nothing todo with the smoke reports
    name: misc
  - description: Single smoke report
    name: report
  - description: List of smoke report
    name: reportlist
  - description: Data to do with searching
    name: search
  - description: Information about the service
    name: system
