---
basePath: "/PRODUCTION/SupportManager/1.0"
consumes:
- "application/json"
- "text/xml"
definitions:
  SupportCase:
    properties:
      id:
        type: "string"
      customerID:
        type: "string"
      customerName:
        type: "string"
      date:
        format: "date-time"
        type: "string"
      shortDescription:
        type: "string"
      status:
        type: "string"
    type: "object"
  RESTError:
    properties:
      code:
        type: "string"
      message:
        type: "string"
    type: "object"
  SupportCaseInfo:
    properties:
      supportCaseCount:
        type: "integer"
      customers:
        items:
          type: "string"
        type: "array"
    type: "object"
  ListOfSupportCases:
    properties:
      supportCases:
        items:
          $ref: "#/definitions/SupportCase"
        type: "array"
    type: "object"
  ResolveMessage:
    properties:
      message:
        type: "string"
    type: "object"
  RESTErrorPlus:
    properties:
      code:
        type: "string"
      message:
        type: "string"
      additionalInfo:
        type: "string"
    type: "object"
info:
  description: "# Manage support cases\n\_\nThis REST service provides you with a\
    \ simple support manager. You can create, resolve and close support cases, and\
    \ get support case information."
  title: "SupportAPI"
  version: "1.0"
paths:
  /supportcases:
    get:
      description: "Get some general info on existing support cases (number, affected\
        \ customers)."
      responses:
        200:
          description: "General support case info."
          schema:
            $ref: "#/definitions/SupportCaseInfo"
        default:
          description: "- 400 - Logical error, Bad Request\n- 404 - Technical error,\
            \ Not Found\n- 500 - Technical error\n\n(See message string for error\
            \ details.)"
          schema:
            $ref: "#/definitions/RESTError"
      summary: "Get some general info on existing support cases (number, affected\
        \ customers)."
      tags:
      - "Support Case Info"
    post:
      description: "Create a new support case."
      parameters:
      - description: "Provide\n* customerID\n* customerName\n* shortDescription\n\n\
          All other values will be generated automatically."
        in: "body"
        name: "supportCase"
        required: true
        schema:
          $ref: "#/definitions/SupportCase"
      responses:
        201:
          description: "Provide\n* customerID\n* customerName\n* shortDescription\n\
            \nAll other values will be generated automatically."
          schema:
            $ref: "#/definitions/SupportCase"
        default:
          description: "- 400 - Logical error, Bad Request\n- 404 - Technical error,\
            \ Not Found\n- 500 - Technical error\n\n(See message string for error\
            \ details.)"
          schema:
            $ref: "#/definitions/RESTError"
      summary: "Create a new support case."
      tags:
      - "Create a New Support Case"
  /supportcases/:
    get:
      description: "Query support cases by status and customer name."
      parameters:
      - description: "(Optional) Status the selected support cases should be in."
        in: "query"
        name: "status"
        required: false
        type: "string"
      - description: "(Optional) Name of the customer who's support cases should be\
          \ selected."
        in: "query"
        name: "customerName"
        required: false
        type: "string"
      responses:
        200:
          description: "A list of support cases that correspond to the query."
          schema:
            $ref: "#/definitions/ListOfSupportCases"
        default:
          description: "- 400 - Logical error, Bad Request\n- 404 - Technical error,\
            \ Not Found\n- 500 - Technical error\n\n(See message string for error\
            \ details.)"
          schema:
            $ref: "#/definitions/RESTError"
      summary: "Query support cases by status and customer name."
      tags:
      - "Support Case Info"
  /supportcases/date%3D{date}:
    get:
      description: "Get all support cases of a specific day."
      parameters:
      - format: "date-time"
        in: "path"
        name: "date"
        required: true
        type: "string"
      responses:
        200:
          description: "A list of support cases that correspond to the query."
          schema:
            $ref: "#/definitions/ListOfSupportCases"
        default:
          description: "- 400 - Logical error, Bad Request\n- 404 - Technical error,\
            \ Not Found\n- 500 - Technical error\n\n(See message string for error\
            \ details.)"
          schema:
            $ref: "#/definitions/RESTError"
      summary: "Get all support cases of a specific day."
      tags:
      - "Support Case Info"
  /supportcases/{id}:
    delete:
      description: "Close a specific support case."
      parameters:
      - description: "Support case id."
        in: "path"
        name: "id"
        required: true
        type: "string"
      responses:
        200:
          description: "A success message."
          schema:
            $ref: "#/definitions/ResolveMessage"
        401:
          description: "- 401 - Unauthorized\n- 404 - Technical error, Not Found\n\
            \n(See message string and additionalInfo for error details.)"
          schema:
            $ref: "#/definitions/RESTErrorPlus"
        default:
          description: "- 400 - Logical error, Bad Request\n- 404 - Technical error,\
            \ Not Found\n- 500 - Technical error\n\n(See message string for error\
            \ details.)"
          schema:
            $ref: "#/definitions/RESTError"
      summary: "Close a specific support case."
      tags:
      - "Transition Support Case"
    get:
      description: "Get a specific support case."
      parameters:
      - description: "Support case id."
        in: "path"
        name: "id"
        required: true
        type: "string"
      responses:
        200:
          description: "Support case data."
          schema:
            $ref: "#/definitions/SupportCase"
        default:
          description: "- 400 - Logical error, Bad Request\n- 404 - Technical error,\
            \ Not Found\n- 500 - Technical error\n\n(See message string for error\
            \ details.)"
          schema:
            $ref: "#/definitions/RESTError"
      summary: "Get a specific support case."
      tags:
      - "Support Case Info"
  /supportcases/{id}/resolve:
    put:
      description: "Set a specific support case to resolved."
      parameters:
      - description: "Support case id."
        in: "path"
        name: "id"
        required: true
        type: "string"
      responses:
        200:
          description: "A success message."
          schema:
            $ref: "#/definitions/ResolveMessage"
        401:
          description: "- 401 - Unauthorized\n- 404 - Technical error, Not Found\n\
            \n(See message string and additionalInfo for error details.)"
          schema:
            $ref: "#/definitions/RESTErrorPlus"
        default:
          description: "- 400 - Logical error, Bad Request\n- 404 - Technical error,\
            \ Not Found\n- 500 - Technical error\n\n(See message string for error\
            \ details.)"
          schema:
            $ref: "#/definitions/RESTError"
      summary: "Set a specific support case to resolved."
      tags:
      - "Transition Support Case"
  /supportcases/customer/{customerID}/:
    get:
      description: "Get all support cases of a specific customer."
      parameters:
      - description: "ID of the customer."
        in: "path"
        name: "customerID"
        required: true
        type: "string"
      responses:
        200:
          description: "A list of support cases of the specified customer."
          schema:
            $ref: "#/definitions/ListOfSupportCases"
        404:
          description: "- 401 - Unauthorized\n- 404 - Technical error, Not Found\n\
            \n(See message string and additionalInfo for error details.)"
          schema:
            $ref: "#/definitions/RESTErrorPlus"
        default:
          description: "- 400 - Logical error, Bad Request\n- 404 - Technical error,\
            \ Not Found\n- 500 - Technical error\n\n(See message string for error\
            \ details.)"
          schema:
            $ref: "#/definitions/RESTError"
      summary: "Get all support cases of a specific customer."
      tags:
      - "Support Case Info"
produces:
- "application/json"
- "text/xml"
swagger: "2.0"
tags:
- description: "Create a new support case."
  name: "Create a New Support Case"
- description: "Get information on support cases."
  name: "Support Case Info"
- description: "Transition a support case to a new state."
  name: "Transition Support Case"
host: "api.scheer-acme.com:8444"