swagger.in.yaml 1.73 KB
Newer Older
1 2 3 4 5
---
swagger: "2.0"
info:
  description: An API for Stork
  title: Stork API
6
  version: 0.9.0
7 8 9 10 11 12 13 14 15 16 17 18 19 20
consumes:
  - application/json
produces:
  - application/json
schemes:
- http
basePath: /api

securityDefinitions:
  Token:
    type: apiKey
    in: header
    name: Cookie

21 22 23
security:
  - Token: []

24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
paths:
  /version:
    get:
      summary: Get version.
      operationId: getVersion
      security: []
      tags:
        - General
      responses:
        200:
          description: Version of Stork
          schema:
            $ref: "#/definitions/Version"
        default:
          description: generic error response
          schema:
            $ref: "#/definitions/ApiError"

42 43 44 45
  $include: users-paths.yaml
  $include: services-paths.yaml
  $include: dhcp-paths.yaml
  $include: settings-paths.yaml
46
  $include: search-paths.yaml
47
  $include: events-paths.yaml
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96


parameters:
  paginationStartParam:
    name: start
    in: query
    description: First record to retrieve.
    type: integer

  paginationLimitParam:
    name: limit
    in: query
    description: Number of records to retrieve.
    type: integer

  filterTextParam:
    name: text
    in: query
    description: >-
      Filtering text, e.g. hostname for the machines
      or version for the apps.
    type: string


definitions:
  Version:
    type: object
    required:
      - version
      - date
    properties:
      version:
        type: string
      date:
        type: string

  ApiError:
    type: object
    required:
      - message
    properties:
      message:
        type: string

  principal:
    type: string

  $include: users-defs.yaml
  $include: services-defs.yaml
97
  $include: dhcp-defs.yaml
98
  $include: settings-defs.yaml
99
  $include: search-defs.yaml
100
  $include: events-defs.yaml