openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/ST04_DB4_GET_STAT_OVERVIEW:
    post:
      tags:
      - STU4_TCC
      summary: 'AS/400: Get Database statistics for ST04 Main Screen'
      operationId: /rfc/ST04_DB4_GET_STAT_OVERVIEW
      requestBody:
        content:
          application/json:
            schema:
              properties:
                CURRENT_SYSTEM:
                  type: object
                  properties:
                    SYSID:
                      type: string
                      maxLength: 8
                      description: Name of the SAP System
                    SAPREL:
                      type: string
                      maxLength: 4
                      description: Release Status of SAP System
                    DBREL:
                      type: string
                      maxLength: 10
                      description: 'DB6: Database Release Level'
                    RFCDEST:
                      type: string
                      maxLength: 32
                      description: Logical Destination (Specified in Function Call)
                    DBHOST:
                      type: string
                      maxLength: 255
                      description: 'DBA Cockpit: Server Name'
                    SCHEMANAME:
                      type: string
                      maxLength: 20
                      description: 'DB6: Schema Name'
                    ENTRYSTATE:
                      type: integer
                      format: int32
                      description: 'State of entry: 1=INITIAL,2=COMPLETE,3=DISABLED'
                    ENTRYTYPE:
                      type: integer
                      format: int32
                      description: 'kind of system: 1=R/3 ,2=Non R/3'
                    DBCNAME:
                      type: string
                      maxLength: 30
                      description: Logical name for a database connection
                    DBSYS:
                      type: string
                      maxLength: 3
                      description: 'Database system  enumValues: DB2=DB2 UDB for OS/390,MSS=Microsoft SQL Server,ADA=SAP DB (ADABAS/D),INF=Informix,ORA=Oracle,DB4=DB2 UDB for AS/400,DB6=DB2 UDB for Unix and Windows'
                      enum:
                      - DB2
                      - MSS
                      - ADA
                      - INF
                      - ORA
                      - DB4
                      - DB6
                    DB_OPSYS:
                      type: string
                      maxLength: 10
                      description: Operating System of Application Server
                    COCKREL:
                      type: string
                      maxLength: 4
                      description: Release Status of SAP System
                    REALSID:
                      type: string
                      maxLength: 8
                      description: Name of the SAP System
                    DBSID:
                      type: string
                      maxLength: 128
                      description: 'DBA Cockpit: Database Name'
                    RZ20_MON:
                      type: string
                      maxLength: 1
                      description: Remote Alert Monitoring active ('X')/inactive (' ')
                    HIST_MON:
                      type: string
                      maxLength: 1
                      description: Remote History Collection active('X')/inactive(' ')
                    DESCRIPTION:
                      type: string
                      maxLength: 80
                      description: ''
                    CHANGEDATE:
                      type: string
                      format: date
                      description: Current Date of Application Server
                    CHANGETIME:
                      type: string
                      maxLength: 6
                      description: Current Time of Application Server
                    CHANGED_BY:
                      type: string
                      maxLength: 12
                      description: User Name
                    SYSTEMTYPE:
                      type: string
                      maxLength: 7
                      description: 'SAP DB: Instance Type  enumValues: CS=Content Server Database,LVC=liveCache,BW=Business Warehouse Database,OLTP=Online Transaction Processing Database'
                      enum:
                      - CS
                      - LVC
                      - BW
                      - OLTP
                    RFCDEST_2:
                      type: string
                      maxLength: 32
                      description: Logical Destination (Specified in Function Call)
                    REMOTE_COLL:
                      type: string
                      maxLength: 1
                      description: Collect data remote('X') or local (' ')
                    DBCON_VIA_RFC:
                      type: string
                      maxLength: 1
                      description: DB Connection via RFC Destination
                    PROMPT_USER_DATA:
                      type: string
                      maxLength: 1
                      description: Store password permanent
                    SLD_NAME:
                      type: string
                      maxLength: 255
                      description: ''
                    SLD_UPDATE:
                      type: string
                      maxLength: 14
                      description: 'DB6: Timestamp (Format: YYYYMMDDHHMMSS)'
                    DB13C_MON:
                      type: string
                      maxLength: 1
                      description: DB13C Integration active('X')/inactive('')
                DBHOST:
                  type: string
                  maxLength: 255
                  description: R/3 System, Name of Application Server
                RESETFLAG:
                  type: string
                  default: ' '
                  maxLength: 1
                  description: Character field currently not used
                SCHEMANAME:
                  type: string
                  maxLength: 20
                  description: 'DB6: Schema Name'
                SYSTEM_ID:
                  type: string
                  maxLength: 8
                  description: Name of SAP R/3 System
                DBMON_HEADER_INFO:
                  type: array
                  items:
                    type: object
                    properties:
                      LINE:
                        type: string
                        maxLength: 100
                        description: Character 100
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  DATE:
                    type: string
                    format: date
                    description: Date of analysis
                  DB_STATS:
                    type: object
                    properties:
                      QQDMPTIME:
                        type: string
                        maxLength: 26
                        description: 'iSeries: Timestamp of Database Monitor Dump'
                      QQSUMCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Executed SQL Statements'
                      QQCOMCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: No. of Executed COMMITs (Database Monitor)'
                      QQRBKCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Executed ROLLBACKs (Database Monitor)'
                      QQSELCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Executed SELECTs (Database Monitor)'
                      QQINSCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Executed INSERTs (Database Monitor)'
                      QQUPDCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Executed UPDATEs (Database Monitor)'
                      QQDELCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Executed DELETEs (Database Monitor)'
                      QQDDLCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Executed DDL Statements'
                      QQOTHCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Miscellaneous Statements'
                      QQTSCCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Table Scans'
                      QQTSCTOTR:
                        type: integer
                        format: int64
                        description: 'iSeries: Total Rows Read by Table Scans'
                      QQTSCTTIME:
                        type: integer
                        format: int64
                        description: 'iSeries: Total Time Used by Table Scans'
                      QQSRTCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Sorts (Database Monitor)'
                      QQSRTTOTR:
                        type: integer
                        format: int64
                        description: 'iSeries: Total Rows Sorted (Database Monitor)'
                      QQSRTTTIME:
                        type: integer
                        format: int64
                        description: 'iSeries: Total Time Used by Sorts (Database Monitor)'
                      QQIDCCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Index Creates (Database Monitor)'
                      QQIDCTTIME:
                        type: integer
                        format: int64
                        description: 'iSeries: Total Time Used by Index Creates (Database Monitor)'
                      QQTMFCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Temporary Files Created'
                      QQTMFTTIME:
                        type: integer
                        format: int64
                        description: 'iSeries: Total Time Used by Temp. File Creates'
                      QQIDACNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Index Advice (Database Monitor)'
                      QQIDATBCNT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Tables over which Indexes are Advised'
                      QQIDAQRYCT:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Index Advices (Database Monitor)'
                      QQODFTIME:
                        type: string
                        maxLength: 26
                        description: 'iSeries: Timestamp of Oldest Data (Database Monitor)'
                      QQTOTAVGT:
                        type: integer
                        format: int64
                        description: 'iSeries: Overall Average Execution Time (Database Monitor)'
                      QQTOTTIME:
                        type: integer
                        format: int64
                        description: 'iSeries: Total Database Processing Time (Database Monitor)'
                      PHYSREAD:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Physical Reads'
                      LOGICREAD:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Logical Reads'
                      QUALITY:
                        type: integer
                        format: int64
                        description: 'iSeries: Hit Ratio'
                      READPCALL:
                        type: integer
                        format: int64
                        description: 'iSeries: Number of Logical Reads per User Call'
                      TIMEPCALL:
                        type: integer
                        format: int64
                        description: 'iSeries: Database Processing Time per User Call'
                  SUM_WAITS:
                    type: integer
                    format: int32
                    description: Sum of waits (db + non-db + int.machine)
                  SUM_WAIT_TIMES:
                    type: integer
                    format: int64
                    description: Sum of wait times (db + non-db + int.machine)
                  TIME:
                    type: string
                    maxLength: 6
                    description: Time of analysis
                  WAIT_STATS_DATE:
                    type: string
                    format: date
                    description: date of wait statistic analysis
                  WAIT_STATS_SUMMARY:
                    type: object
                    properties:
                      NAME:
                        type: string
                        maxLength: 20
                        description: Char 20
                      WDB:
                        type: integer
                        format: int32
                        description: Cumulative number of process waits for database locks
                      WNDB:
                        type: integer
                        format: int32
                        description: Cumulative number of process waits for non-database locks
                      WIM:
                        type: integer
                        format: int32
                        description: Cumulative no. of process waits for internal machine locks
                      WDBT:
                        type: integer
                        format: int64
                        description: Total cumulative time spent on DB lock waits (all processes)
                      WNDBT:
                        type: integer
                        format: int64
                        description: Total cumulative time spent on non-database lock waits
                      WIMT:
                        type: integer
                        format: int64
                        description: Total cumulative time spent on internal machine waits
                      WDBT_AVG:
                        type: integer
                        format: int64
                        description: Average of total cumulative database lock wait time
                      WNDBT_AVG:
                        type: integer
                        format: int64
                        description: Average of total cumulative non-database lock wait time
                      WIMT_AVG:
                        type: integer
                        format: int64
                        description: Average of total cumulative internal machine lock wait time
                  WAIT_STATS_TIME:
                    type: string
                    maxLength: 6
                    description: time of wait statistic analysis
                  WAIT_STAT_SUBRC:
                    type: integer
                    format: int32
                    description: Error code of DB4_GET_WAIT_STATISTIC
                  DBMON_HEADER_INFO:
                    type: array
                    items:
                      type: object
                      properties:
                        LINE:
                          type: string
                          maxLength: 100
                          description: Character 100
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
