University of Padua stats API

The stats API from University of Padua — 4 operation(s) for stats.

OpenAPI Specification

university-of-padua-stats-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  description: Documentation of the PHAIDRA API.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: PHAIDRA datastream stats API
  version: '3.0'
servers:
- description: API endpoint
  url: https://phaidra.unipd.it/api
tags:
- description: ''
  name: stats
paths:
  /stats/{pid}:
    get:
      description: Returns object's usage statistics
      parameters:
      - description: object id
        in: path
        name: pid
        schema:
          required: true
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  stats:
                    properties:
                      detail_page:
                        type: string
                      downloads:
                        type: string
                    type: object
                type: object
          description: Usage statistics
      summary: Get usage statistics
      tags:
      - stats
  /stats/{pid}/chart:
    get:
      description: Get /info and download count, with detailed timestamps.
      parameters:
      - description: object id
        in: path
        name: pid
        schema:
          required: true
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  alerts:
                    items:
                      properties:
                        msg:
                          type: string
                        type:
                          type: string
                      type: object
                    type: array
                  stats:
                    properties:
                      detail_page:
                        properties:
                          at:
                            type: object
                        type: object
                      downloads:
                        type: number
                    type: object
                  status:
                    type: number
                type: object
          description: details on object (download, detail_page, etc.)
      summary: Get timestamped /info and download count.
      tags:
      - stats
  /stats/{pid}/detail_page:
    get:
      description: Returns the number of /info calls, which are typically used when accessing the detail page.
      parameters:
      - description: object id
        in: path
        name: pid
        schema:
          required: true
          type: string
      responses:
        '200':
          content:
            text/plain:
              schema:
                type: number
          description: /info calls count (integer)
      summary: Get number of /info calls.
      tags:
      - stats
  /stats/{pid}/downloads:
    get:
      parameters:
      - description: object id
        in: path
        name: pid
        schema:
          required: true
          type: string
      responses:
        '200':
          content:
            text/plain:
              schema:
                type: number
          description: Download count (integer). Useful e.g. for ajax content update without any response parsing necessary.
      summary: Get downloads count.
      tags:
      - stats
components:
  securitySchemes:
    basicAuth:
      scheme: basic
      type: http
    tokenAuth:
      in: header
      name: X-XSRF-TOKEN
      type: apiKey