Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Swagger open api macro
swagger: "2.0"
info:
  version: "0.0.1"
  title: ARES Kudo API server
# during dev, should point to your local machine
host: localhost:3000
# basePath prefixes all resource paths

basePath: /api
#

tags:
  - name: ARES Kudo Required
    description: Required APIs to load and store a drawing
  - name: ARES Kudo Optional
    description: Optional APIs to improve interactions for loading and storing a drawing
  - name: File Sessions
    description: Optional File Session Handling
  - name: Commenting
    description: API support for commenting panel
  - name: User Sessions
    description: Optional User Session Handling
  - name: Block Library
    description: API support for Block Library

schemes:
  # tip: remove http to make production-grade
  - http
  - https
# format of bodies a client can send (Content-Type)
consumes:
  - application/json
# format of the responses to the client (Accepts)
produces:
  - application/json
parameters:
  fileId:
    name: fileId
    in: path
    description: The id of the file
    required: true
    type: string
  sessionIdlibId:
    name: sessionIdlibId
    in: headerpath
    description: The id of the userlibrary
sessionId     required: true
    type: string
  threadIditemId:
    name: threadIditemId
    in: path
    description: The id of the comment threadblock
    required: true
    type: string
  markupIdownerType:
    name: markupIdownerType
    in: pathheader
    description: Type of the markuplibrary (PUBLIC/USER/ORG)
    required: truefalse
    type: string
  commentIdsessionId:
    name: commentIdsessionid
    in: pathheader
    description: the commentuser sessionId
    required: true
    type: string
  attachmentIdthreadId:
    name: attachmentIdthreadId
    in: path
    description: the attachmentcomment thread
    required: true
    type: string
  optionalSessionIdmarkupId:
    name: sessionIdmarkupId
    in: headerpath
    description: the user sessionId (optional)markup
    required: falsetrue
    type: string
paths:   /files/{fileId}/diffscommentId:
    parametersname: commentId
    in: -path
$ref: '#/parameters/fileId'   description: the   - $ref: '#/parameters/optionalSessionId'comment
    required: true
    type: string
  attachmentId:
    name: attachmentId
    in: path
    description: the attachment
    required: true
    type: string
  optionalSessionId:
    name: sessionid
    in: header
    description: the user sessionId
    required: false
    type: string
paths:
  /library/blocks:
    parameters:
      - $ref: "#/parameters/optionalSessionId"
      - $ref: "#/parameters/ownerType"

    x-swagger-router-controller: blocks

    get:
      description: Returns block libraries

      operationId: libraries_get
      tags:
        - Block Library
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/LibrariesResponse"
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /library/blocks/{libId}/items:
    parameters:
      - $ref: "#/parameters/libId"
      - $ref: "#/parameters/optionalSessionId"

    x-swagger-router-controller: blocks

    get:
      description: Returns blocks of a library

      operationId: blocks_get
      tags:
        - Block Library
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/BlocksResponse"
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /library/blocks/{libId}/items/{itemId}/content:
    parameters:
      - $ref: "#/parameters/libId"
      - $ref: "#/parameters/itemId"
      - $ref: "#/parameters/optionalSessionId"
      - in: query
        name: fileType
        required: false
        default: "dwg"
        type: string

    x-swagger-router-controller: blocks

    get:
      description: Returns block file

      operationId: block_getfile
      tags:
        - Block Library
      produces:
        - application/octet-stream
      responses:
        "200":
          description: Success
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /library/blocks/{libId}/items/{itemId}/thumbnail:
    parameters:
      - $ref: "#/parameters/libId"
      - $ref: "#/parameters/itemId"
      - $ref: "#/parameters/optionalSessionId"
      - in: query
        name: fileType
        required: false
        default: "png"
        type: string

    x-swagger-router-controller: blocks

    get:
      description: Returns block thumbnail

      operationId: block_getthumbnail
      tags:
        - Block Library
      produces:
        - application/octet-stream
      responses:
        "200":
          description: Success
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /files:
    parameters:
      - $ref: "#/parameters/optionalSessionId"
    x-swagger-router-controller: files
    post:
      description: Create/Update a file
      # used as the method name of the controller
      operationId: post_file
      tags:
        - ARES Kudo Required
      consumes:
        - multipart/form-data
      parameters:
        - in: header
          name: fileId
          description: ID of the file (New file will be created if this value is not specified)
          required: false
          type: string
        - in: formData
          name: file
          required: true
          type: file
      responses:
        "200":
          description: Success
          schema:
            required:
              - id
              - filename
              - isNewFile
              - changeId
            properties:
              id:
                type: string
              filename:
                type: string
              isNewFile:
                type: boolean
              changeId:
                type: string
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"
  /files/{fileId}/data:
    parameters:
      - $ref: "#/parameters/fileId"
      - $ref: "#/parameters/optionalSessionId"
    # binds a127 app logic to a route
    x-swagger-router-controller: files

    get:
      description: Returns file content
      # used as the method name of the controller
      operationId: data_get
      tags:
        - ARES Kudo Required
      produces:
        - application/octet-stream
      responses:
        "200":
          description: Success
        # responses may fall through to errors
        "404":
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /files/{fileId}/xref/search:
    # binds a127 app logic to a route
    x-swagger-router-controller: files
     getpost:
      description: ReturnsXRef file contentsearch
      # used as the method name of the controller
      operationId: diffsxref_getsearch
      tags:
        - ARES Kudo RequiredOptional
      responsesparameters:
        "200":- $ref: "#/parameters/fileId"
        -  description$ref: Success"#/parameters/optionalSessionId"
        -  schemaname: body
           requiredin: body
          required: true
 - status        schema:
      - baseContent             propertiesrequired:
              status:- path
            properties:
   type: string          path:
      default: "ok"         type: array
    baseContent:            description: xrefs paths to  type:search
string                 descriptionitems: Base64
encoded content of file               type: string
# responses may fall through to errorsresponses:
        "404200":
          description: ErrorSuccess
          schema:
            $reftype: "#/definitions/ErrorResponse"array
     put:       descriptionitems:
Update file content       # used as the method nametype: ofobject
the controller       operationId: diffs_put     properties:
 tags:         - ARES Kudo Required   path:
   parameters:         - name: body    type: string
     in: body          files:
required: true           schema:      type: array
     required:             items:
 - baseContent             properties:     type: object
        baseContent:            properties:
    type: string                 description"_id":
Base64 encoded content of file                    responsestype: string
       "200": # responses may fall through to errors
   description: Success      default:
    schema:      description: Error
     required:     schema:
         - status  $ref: "#/definitions/ErrorResponse"
  /files/{fileId}/preview:
    # binds a127 app -logic changeIdto a route
    x-swagger-router-controller: files
    propertiespost:
      description: Optionally handle receiving updates previews
   status:   # used as the method name of the controller
      typeoperationId: stringpreview_post
      tags:
        - default: "ok"
ARES Kudo Optional
      parameters:
      changeId:  - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/optionalSessionId"
 type: string      - in: formData
# responses may fall through to errors    name: file
   default:       required: true
  description: Error       type: file
  schema:    responses:
        $ref"200":
"#/definitions/ErrorResponse"     /files:     postdescription: Success
      description: Create a new fileschema:
      # used as the method name oftype: theobject
controller       operationId: post_file    properties:
  tags:         - ARES Kudo Optionalstatus:
      consumes:          - multipart/form-datatype: string
      parameters:         - indefault: "ok"
header        # responses may name:fall folderIdthrough to errors
        requireddefault:
true          description: type:Error
string         - inschema:
 formData           name$ref: file"#/definitions/ErrorResponse"

  /files/{fileId}/info:
    # binds required:a127 trueapp logic to a route
      typex-swagger-router-controller: filefiles
    get:
 responses:     description: Returns file information
"200":      # used as the method description: Success
name of the controller
      operationId: info_get
 schema:     tags:
       required: - ARES Kudo Required
      parameters:
   - status    - $ref: "#/parameters/fileId"
        - changeId
$ref: "#/parameters/optionalSessionId"
      responses:
    properties:    "200":
          statusdescription: Success
          schema:
      type:  string    required:
            default: "ok" - status
            changeIdtype: object
            properties:
  type: string         # responses maystatus:
fall through to errors         default:    type: string
     description: Error           schemadefault: "ok"
           $ref: "#/definitions/ErrorResponse"   /files/{fileId}/xref/searchfilename:
    # binds a127 app logic to a route     x-swagger-router-controllertype: filesstring
       post:       descriptionfolderId:
XRef  search       # used as the method name of thetype: controllerstring
      operationId: xref_search       tagsowner:
          - ARES Kudo Optional   type: string
  parameters:      # responses may -fall $ref: '#/parameters/fileId'
through to errors
       - $ref"401":
'#/parameters/optionalSessionId'         - name: bodydescription: User is not autenticated
          inschema:
 body           required: true$ref: "#/definitions/ErrorResponse"
        "404":
  schema:        description: File is not found
required:          schema:
    - path       $ref: "#/definitions/ErrorResponse"
  /files/{fileId}/session:
 properties:   # binds a127 app logic to a route
    pathparameters:
      - $ref: "#/parameters/fileId"
      - type$ref: array"#/parameters/sessionId"

    x-swagger-router-controller: files_sessions
         descriptionget:
xrefs paths to search   description: get file sessions
      # used as the method name of the controller
       itemsoperationId: session_get
      tags:
        - File Sessions
type: string       responses:
        "200":
          description: Success
          schema:
            type:# arraya pointer to a definition
        items:    $ref: "#/definitions/SessionsResponse"
        # type:responses objectmay fall through to errors
          propertiesdefault:
          description: Error
    path:      schema:
             type$ref: string"#/definitions/ErrorResponse"
                files:
post:
      description: Create file session. Sessions need to be either of  type: array"view" or "edit"
      # used as the method name of the controller
 items:     operationId: session_post
      tags:
       type: object- File Sessions
      parameters:
        - name:  properties:body
          in: body
          "_id"required: true
          schema:
            typerequired: string
 
      # responses may fall through to errors  - mode
     default:       properties:
   description: Error           schemamode:
            $ref: "#/definitions/ErrorResponse"   /files/{fileId}/previewtype: string
   #  binds a127 app logic to a route     x-swagger-router-controllerdescription: filesType of session  requested
post:       description: Optionally handle receiving updates previews    enum: [view, edit]
# used as the method name of the controller       operationIdfileId: preview_post
      tags:         - AREStype: Kudostring
Optional       parameters:         - $refdescription: '#/parameters/fileId' for the file for which the session is - $ref: '#/parameters/optionalSessionId'being requested
      responses:
        "200":
          description: Success
          schema:
            typerequired:
object              - status
  properties:            - "_id"
 status:           properties:
      type: string       status:
         default: "ok"      type: string
 # responses may fall through to errors         default: "ok"
           description: Error   "_id":
                schematype: string
        # responses may fall $ref: "#/definitions/ErrorResponse"through to errors
        default:
          description: Error
      /files/{fileId}/info:    schema:
# binds a127 app logic to a route     x-swagger-router-controller$ref: files"#/definitions/ErrorResponse"
    getdelete:
      description: Returnsdelete file informationsession
      # used as the method name of the controller
      operationId: infosession_getdelete
      tags:
        - ARES Kudo Required
      parameters:
        - $ref: '#/parameters/fileId'
        - $ref: '#/parameters/optionalSessionId'
File Sessions
      responses:
        "200":
          description: Success
          schema:
            required:# a pointer to a   definition
       - status             type: object$ref: "#/definitions/SessionsResponse"
            properties:
     # responses may fall through to errors
        statusdefault:
          description: Error
     type: string    schema:
            default$ref: "ok#/definitions/ErrorResponse"
  /auth:
    # binds a127 app logic to a filename:route
    x-swagger-router-controller: auth
    get:
      typedescription: validate stringuser session
      # used as the method name of folderId:the controller
      tags:
        - type:User stringSessions
      operationId: auth_get
      ownerparameters:
        - $ref: "#/parameters/optionalSessionId"
      typeresponses:
string         # responses may fall through to errors
        "401200":
          description: Success
User is not autenticated       schema:
   schema:         type: object
  $ref: "#/definitions/ErrorResponse"         "404":properties:
             description status:
File   is not found           schema:type: string
                $refdefault: "#/definitions/ErrorResponseok"
  /files/{fileId}/session:     # binds401:
a127 app logic to a route     parametersdescription: Authorization information is missing or invalid.
 - $ref/users:
'#/parameters/fileId'    # binds a127 app -logic $ref: '#/parameters/optionalSessionId'
to a route
    x-swagger-router-controller: filesusers
    get:
      description: Get user getdata fileand sessionspreferences
      # used as the method name of the controller
      operationId: sessionusers_get
      tags:
        - Users
      parameters:
        - File Sessions$ref: "#/parameters/sessionId"
      responses:
        "200":
          description: Success
          schema:
            $ref: # a pointer to a definition'#/definitions/GetUserResponse'
           400:
    $ref: "#/definitions/SessionsResponse"     description: Something went wrong #while responsesgetting maythe falluserdata throughfrom tojson errorsfile.
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"
    postput:
      description: CreateUpdate fileuser session.data Sessions need to be either of type "view" or "edit"
 and preferences
      # used as the method name of the controller
      operationId: sessionusers_postput
      tags:
        - FileUsers
Sessions
      parameters:
        - name$ref: body"#/parameters/sessionId"
        -  inname: body
          requiredin: true
          schema:body
            required: true
             - mode
            propertiesschema:
              mode:
                type: string$ref: '#/definitions/UserPreferencesObject'

      responses:
         description200: Type
of session requested        description: Success
          enumschema: [view,
edit]               fileIdtype: object
            properties:
  type: string           status:
     description: fileId for the file for which the session is being requested type: string
        responses:        default: "200ok":
          description400:
Success           schemadescription: Something went wrong while saving the userdata into the json file.
 required:       default:
       - status  description: Error
          schema:
- "_id"           $ref:  properties:"#/definitions/ErrorResponse"

  /v1/files/{fileId}/annotations:
    # binds a127 app logic to a status:route
    x-swagger-router-controller: comments
    get:
      typedescription: Returns stringannotations for a file
      # used as the method name of default: "ok"the controller
      operationId: annotations_get
      "_id"tags:
        - Commenting
      typeparameters:
string        - $ref: # responses may fall through to errors"#/parameters/fileId"
        -     default$ref: "#/parameters/sessionId"
        - descriptionname: Errortimestamp
          schematype: integer
           $refin: "#/definitions/ErrorResponse"query
    delete:       descriptionrequired: deletefalse
file session       # used as the method name description: timestamp of thelast controllerrequest to only send    operationId: session_deletenew items
      tagsresponses:
        -# Fileresponses Sessionsmay fall through to    responses:errors
        "200":
          description: Success
          schema:
            # a pointer to a definitiontype: object
            properties:
 $ref: "#/definitions/SessionsResponse"         # responses may fallstatus:
through to errors         default:     type: string
    description: Error           schemadefault: "ok"
           $ref: "#/definitions/ErrorResponse"   /authresults:
    # binds a127 app logic to a route     x-swagger-router-controllertype: authobject
      get:       description: validate user sessionproperties:
      # used as the method name of the controller    timestamp:
  tags:         - User Sessions       operationIdtype: auth_getinteger
      parameters:         - $ref: '#/parameters/optionalSessionId'    description: time of responses:response
        # responses may fall through to errors    commmentThreads:
    "200":           description: Success    type: array
     schema:             type: object description: ""
          properties:          items:
    status:                  type: stringobject
                  defaultmarkups:
"ok"         401:           descriptiontype: Authorizationarray
information is missing or invalid.   /users:     # binds a127 app logic to a route description: ""
  x-swagger-router-controller: users     get:       description: Returns user object  items:
    # used as the method name of the controller       operationId: users_get  type: object
   tags:         - User Sessions    status:
  parameters:         - $ref: '#/parameters/sessionId'       responsestype: string
       # responses may fall through to errors        default: "200ok":
  /v1/files/{fileId}/markups:
    # binds a127 description:app Successlogic to a route
       schemax-swagger-router-controller: comments
    get:
      typedescription: objectReturns markups for a file
      # used properties:as the method name of the controller
        statusoperationId: markups_get
      tags:
        - type:Commenting
string      parameters:
        -  default$ref: "ok#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
    results:    - name: timestamp
          type: arrayinteger
          in: query
    items:      required: false
              typedescription: objecttimestamp of last request to only send new items
      responses:
     properties:   # responses may fall through to errors
             fname"200":
          description: Success
          schema:
 type: string          type: object
             descriptionproperties:
first name             status:
         surname:       type: string
                typedefault: string "ok"
              results:
        description: last name of user     type: object
                "_id"properties:
                  timestamp:
     type: string              type: integer
       email:             description: time of response
        type: string         markups:
             licenseExpirationDate:       type: array
                type: integer   description: ""
                  preferences:  items:
                      type: object
                        propertiesstatus:
                    type: string
    preferences_display:                default: "ok"
  /v1/files/{fileId}/commentThreads:
    # binds a127 app type:logic objectto a route
    x-swagger-router-controller: comments
    get:
      description: Returns comments for a file
   properties:   # used as the method name of the controller
      operationId: commentThreads_get
       tags:
    graphicswinmodelbackgrndcolor:    - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - type: string$ref: "#/parameters/sessionId"
        - name: timestamp
          type: integer
          defaultin: Whitequery
          required: false
          description: timestamp of last window:request to only send new items
      responses:
        # responses may fall through to errors
 type: object      "200":
          description: Success
          propertiesschema:
            type: object
                editproperties:
               status:
                type: string
object                default: "ok"
              viewresults:
                type: object
              type: object properties:
                  timestamp:
      variables:              type:  integer
            type: object       description: time of response
                  propertiescommmentThreads:
                    type: array
         dynasnap:           description: ""
                    typeitems:
string                      type: object
         default: "63"     put:   status:
   description: Returns user object       # used as the method name of thetype: controllerstring
      operationId: users_put       tags:      default: "ok"
 - User Sessions /v1/files/{fileId}/commentThread:
    # binds a127 parameters:app logic to a route
    x-swagger-router-controller: $ref: '#/parameters/sessionId'comments
    post:
     - namedescription: bodyAdd a new commentThread for a file
     in: body# used as the method name of the controller
  required: true   operationId: commentThread_post
      schematags:
        - Commenting
  properties:    parameters:
        -  preferences:$ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
     type: object  - name: body
          in: body
description: user preferences        required: true
       properties:   schema:
            type: object
 window:           properties:
         type: object    title:
                propertiestype: string
              text:
       edit:         type: string
              typestate:
object                type: string
       properties:         enum: [ACTIVE, RESOLVED]
               dockwidgetsids:
                type: array
          type: object     items:
                  type: string
   properties:   responses:
        # responses may fall through to errors
        "200":
   layerwindow:       description: Success
          schema:
             type: object
            properties:
                   propertiesstatus:
                type: string
                hdefault: "ok"
              timestamp:
                type:  integer
 type: string              description: time of response
  /v1/files/{fileId}/commentThread/{threadId}:
    # binds a127 app logic to a route
    descriptionx-swagger-router-controller: heightcomments
 o the layerwindow put:
      responsesdescription: Update a commentThread
      # responsesused mayas fallthe throughmethod toname errorsof the controller
      "200"operationId: commentThread_put
      tags:
  description: Success     -  Commenting
   schema:   parameters:
        - type$ref: object"#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
 properties:       - $ref: "#/parameters/threadId"
     status:   - name: body
          in: body
type: string         required: true
      default: "ok"   /v1/files/{fileId}/annotationsschema:
    # binds a127 app logic to a route     x-swagger-router-controller: commentstype: object
     get:       description: Returns annotations for a fileproperties:
        # used as the method name oftitle:
the controller       operationId: annotations_get       tagstype: string
       - Commenting      text:
parameters:         - $ref: '#/parameters/fileId'     type: string
  - $ref: '#/parameters/sessionId'         - nameids:
timestamp           type: integer    type:  array
    in: query           requireditems:
false           description: timestamp of last request to only send newtype: itemsstring
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                 type: string
                default: "ok"
              resultstimestamp:
                type: object integer
                description: time of response
    get:
      properties:description: get a commentThread
      # used as the method name of the controller
      timestampoperationId: commentThread_get
      tags:
        - Commenting
   type   parameters:
integer        - $ref: "#/parameters/fileId"
        -  description$ref: time of response"#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
      responses:
  commmentThreads:      # responses may fall through to errors
        type"200":
 array         description: Success
          descriptionschema:
""            type: object
         items:   properties:
              status:
    type: object           type: string
      markups:          default: "ok"
         type: array    timestamp:
                descriptiontype: ""integer
                description: time of response
items:    delete:
      description: Delete a comment Thread
      # type:used objectas the method name of the controller
      operationId: commentThread_delete
    status:  tags:
        - Commenting
      parameters:
 type: string      - $ref: "#/parameters/fileId"
        -    default$ref: "ok#/parameters/sessionId"
  /v1/files/{fileId}/markups:     # binds- a127 app logic to a route
    x-swagger-router-controller: comments$ref: "#/parameters/threadId"
      responses:
     get:   # responses may fall description:through Returnsto markupserrors
for a file      "200":
# used as the method name of the controller   description: Success
  operationId: markups_get       tagsschema:
        - Commenting   type: object
  parameters:         - $ref: '#/parameters/fileId'properties:
        - $ref: '#/parameters/sessionId'     status:
   - name: timestamp           type: integer
 string
        in: query       default: "ok"
  required: false           descriptiontimestamp:
timestamp  of last request to only send new items       responsestype: integer
       # responses may fall through to errors   description: time of response
  "200"/v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}:
    # binds a127 app logic to description:a Successroute
    x-swagger-router-controller: comments
    schemaput:
      description: Update a comment
  type: object   # used as the method name of the controller
 properties:     operationId: comment_put
      tags:
 status:       - Commenting
      parameters:
  type: string     - $ref: "#/parameters/fileId"
        - default$ref: "ok#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
        -  results$ref: "#/parameters/commentId"
        - name: body
    type: object     in: body
          propertiesrequired: true
           schema:
     timestamp:       type: object
            typeproperties:
integer              text:
      description: time of response       type: string
      responses:
   markups:     # responses may fall through to errors
        "200":
type: array         description: Success
          descriptionschema:
""            type: object
       items:     properties:
                 typestatus:
object                type: string
 status:               default: "ok"
    type: string         timestamp:
           default: "ok"    /v1/files/{fileId}/commentThread:type: integer
    # binds a127 app logic to a route     x-swagger-router-controllerdescription: commentstime of response
  post:  get:
    description: Add a new commentThreaddescription: forRetrieve a filecomment
      # used as the method name of the controller
      operationId: commentThreadcomment_postget
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - name$ref: body"#/parameters/threadId"
        -  in$ref: body"#/parameters/commentId"
          requiredresponses:
true        # responses may schema:fall through to errors
          type"200":
object             propertiesdescription: Success
             title:
   schema:
            type: stringobject
              textproperties:
                type: string
              statestatus:
                type: string
                enumdefault: [ACTIVE, RESOLVED]"ok"
               idstimestamp:
                type: arrayinteger
                itemsdescription: time of response
               typedelete:
string      description: responses:Delete a comment
      # responsesused mayas fallthe throughmethod toname errorsof the controller
      "200"operationId: comment_delete
      tags:
  description: Success     - Commenting
    schema:  parameters:
        -  type$ref: object"#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
 properties:       - $ref: "#/parameters/threadId"
     status:   - $ref: "#/parameters/commentId"
       responses:
    type: string   # responses may fall through to errors
       default: "ok200":
          description: Success
  timestamp:        schema:
        type: integer   type: object
            description: time of response
  /v1/files/{fileId}/commentThread/{threadId}:properties:
      # binds a127 app logic to a route status:
   x-swagger-router-controller: comments     put:       descriptiontype: Updatestring
a commentThread        # used as the method name of the controllerdefault: "ok"
      operationId: commentThread_put       tagstimestamp:
        - Commenting       parameterstype: integer
       -   $ref: '#/parameters/fileId'     description: time of response
- $ref: '#/parameters/sessionId' /v1/files/{fileId}/commentThread/{threadId}/comment:
    # binds a127 app logic to -a $ref: '#/parameters/threadId'route
    x-swagger-router-controller: comments
   - namepost:
body      description: Post a new comment
in: body     # used as the method name required:of truethe controller
      operationId: comment_post
 schema:     tags:
        type:- objectCommenting
      parameters:
     properties:   - $ref: "#/parameters/fileId"
        - title:$ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
     type: string  - name: body
          textin: body
          required: true
    type: string     schema:
         ids:   type: object
            typeproperties:
array                 itemstext:

                 type: string
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                 type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
  /v1/files/{fileId}/markup:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
     descriptionpost: time
of response     getdescription: Add a new markup  for description: get a commentThread file
      # used as the method name of the controller
      operationId: commentThreadmarkup_getpost
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $refname: '#/parameters/threadId' body
          responsesin: body
       # responses may fallrequired: throughtrue
to errors         "200"schema:
            descriptiontype: Successobject
            schemaproperties:
              typetitle:
object                propertiestype: string
              statustext:
                 type: string
               state:
default: "ok"               timestamptype: string
                type: integerenum: [ACTIVE, RESOLVED]
              ids:
    description:   time of response     /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}:  type: array
    # binds a127 app logic to a route     x-swagger-router-controller: commentsitems:
           put:       descriptiontype: Update a comment string
      responses:
        # usedresponses asmay thefall methodthrough nameto oferrors
the controller       operationId"200":
comment_put          tagsdescription: Success
       - Commenting  schema:
     parameters:       type: object
- $ref: '#/parameters/fileId'         - $ref: '#/parameters/sessionId'properties:
        - $ref: '#/parameters/threadId'    status:
    - $ref: '#/parameters/commentId'         - nametype: bodystring
           in: body    default: "ok"
     required: true        timestamp:
  schema:              type: objectinteger
             properties:   description: time of response
  /v1/files/{fileId}/markup/{markupId}:
    # text:binds a127 app logic to a route
    x-swagger-router-controller: comments
    typeput:
string      description: responses:Update a markup
      # responsesused mayas fallthe throughmethod toname errorsof the controller
      "200":operationId: markup_put
      tags:
    description: Success   - Commenting
      schemaparameters:
        - $ref: "#/parameters/fileId"
  type: object     - $ref: "#/parameters/sessionId"
     properties:   - $ref: "#/parameters/markupId"
        - statusname: body
          in: body
    type: string     required: true
          defaultschema:
"ok"            type: object
 timestamp:           properties:
     type: integer        title:
        description: time of response     gettype: string
     description: Retrieve a comment      text:
 # used as the method name of the controller       operationIdtype: comment_getstring
        tags:      ids:
  - Commenting       parameters:      type: array
 - $ref: '#/parameters/fileId'         - $ref: '#/parameters/sessionId'  items:
      - $ref: '#/parameters/threadId'         - $reftype: '#/parameters/commentId'string
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status: 
                type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
    deleteget:
      description: Deleteget a comment markup
      # used as the method name of the controller
      operationId: commentmarkup_deleteget
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/threadId'
        - $ref: '#/parameters/commentId'markupId"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                 type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
  /v1/files/{fileId}/commentThread/{threadId}/comment:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    postdelete:
      description: Postdelete a new commentmarkup
       # used as the method name of the controller
      operationId: commentmarkup_postdelete
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/threadId'markupId"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
         - nameschema:
body            intype: bodyobject
          required: true properties:
         schema:     status:
        type: object       type: string
    properties:            default: "ok"
 text:              timestamp:
  type: string       responses:      type: integer
 # responses may fall through to errors         "200"description: time of response
  /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:
    description:# Successbinds a127 app logic to a route
    schemax-swagger-router-controller: comments
    put:
      typedescription: objectUpdate a comment
      # used as the properties:method name of the controller
          statusoperationId: markupcomment_put
      tags:
        - type:Commenting
string      parameters:
        -  default$ref: "ok#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
   timestamp:     - $ref: "#/parameters/markupId"
        - type$ref: integer"#/parameters/commentId"
        - name: body
     description: time of response   /v1/files/{fileId}/markup:
    # binds a127 app logic to a routein: body
          x-swagger-router-controllerrequired: comments
true
   post:       descriptionschema:
Add a new markup for a file       # usedtype: asobject
the method name of the controller       operationIdproperties:
markup_post       tags:         -text:
Commenting       parameters:         - $reftype: '#/parameters/fileId'string
        - $refresponses:
'#/parameters/sessionId'        # - name: body
 responses may fall through to errors
        in"200":
body           requireddescription: trueSuccess
          schema: 
            type: object
            properties:
              titlestatus:
                type: string
                default: "ok"
             text timestamp:
                type: stringinteger
              state:  description: time of response
    get:
      typedescription: stringRetrieve a markup comment
      # used as the method name of enum: [ACTIVE, RESOLVED]the controller
      operationId: markupcomment_get
       idstags:
        - Commenting
      typeparameters:
 array       - $ref: "#/parameters/fileId"
        - items:$ref: "#/parameters/sessionId"
        - $ref: "#/parameters/markupId"
        - type$ref: string"#/parameters/commentId"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                 type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
  /v1/files/{fileId}/markup/{markupId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    putdelete:
      description: UpdateDelete a markup comment
      # used as the method name of the controller
      operationId: markupmarkupcomment_putdelete
      tags:
        - Commenting
      parameters:
        - $ref: '#/parameters/fileId'
        - $ref:
'#/parameters/sessionId'
        - $ref: '#/parameters/markupId'
        - name: body
          in: body
 "#/parameters/fileId"
        - required$ref: true"#/parameters/sessionId"
        -  schema$ref: "#/parameters/markupId"
        - $ref: "#/parameters/commentId"
 type: object    responses:
        properties:# responses may fall through to errors
        title"200":
          description: Success
    type: string     schema:
         text:   type: object
            typeproperties:
string               idsstatus:
                type: arraystring
                itemsdefault: "ok"
              timestamp:
  type: string       responses:      type: integer
 # responses may fall through to errors         "200"description: time of response
  /v1/files/{fileId}/markup/{markupId}/comment:
    description:# Successbinds a127 app logic to a route
    schemax-swagger-router-controller: comments
    post:
      typedescription: objectPost a new markup comment
      # used properties:as the method name of the controller
        statusoperationId: markupcomment_post
      tags:
        - type: stringCommenting
      parameters:
        - default$ref: "ok#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
   timestamp:     - $ref: "#/parameters/markupId"
        - typename: integerbody
                descriptionin: timebody
of response     get:       descriptionrequired: get atrue
markup        # used asschema:
the method name of the controller       operationIdtype: markup_get
object
     tags:       properties:
 - Commenting       parameters:         - $ref: '#/parameters/fileId'
  text:
     - $ref: '#/parameters/sessionId'         - $reftype: '#/parameters/markupId'string
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                 type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
  /v1/files/{fileId}/attachment:
    x-swagger-router-controller: comments
    deletepost:
      description: deleteCreate a markup attachment
      # used as the method name of the controller
      operationId: markupattachment_deletepost
      tags:
        - Commenting
      consumes:
        - multipart/form-data
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - in: formData
          name: attachment
          required: true
          type: file
    -  $refresponses:
 '#/parameters/markupId'       responses"200":
        #  responsesdescription: maySuccess
fall through to errors       schema:
 "200":           description: Successrequired:
              - status
 schema:             type:- objectchangeId
            properties:
              status:
                 type: string
                default: "ok"
              timestampchangeId:
                type: integer string
        # responses may fall through to errors
        default:
          description: Error
  time  of response     /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:schema:
      # binds a127 app logic to a route      $ref: "#/definitions/ErrorResponse"
  /v1/files/{fileId}/attachments:
    x-swagger-router-controller: comments
    putget:
      description: UpdateRetrieve aall comment attachments
      # used as the method name of the controller
      operationId: markupcommentattachments_putget
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
           - $ref: '#/parameters/markupId'properties:
              status:
    - $ref: '#/parameters/commentId'         - nametype: bodystring
           in: body    default: "ok"
     required: true        timestamp:
  schema:              type: objectinteger
             properties:   description: time of response
  /v1/files/{fileId}/attachments/{attachmentId}:
    # text:binds a127 app logic to a route
    x-swagger-router-controller: comments
    typeget:
string       responsesdescription: Retrieve attachment
      # responsesused mayas fallthe throughmethod toname errorsof the controller
      "200"operationId: attachment_get
       tags:
 description: Success      - Commenting
   schema:   parameters:
        - type$ref: object"#/parameters/fileId"
        -    properties:
    $ref: "#/parameters/sessionId"
        - status$ref: "#/parameters/attachmentId"
      responses:
        # type:responses stringmay fall through to errors
         "200":
  default: "ok"       description: Success
      timestamp:    schema:
            type: integerobject
            properties:
      description: time of response     getstatus:
       description: Retrieve a markup comment     type: string
 # used as the method name of the controller       operationIddefault: markupcomment_get"ok"
      tags:        timestamp:
- Commenting       parameters:        type: -integer
$ref: '#/parameters/fileId'         - $ref: '#/parameters/sessionId'    description: time of response
 - $ref/swagger:
'#/parameters/markupId'    x-swagger-pipe: swagger_raw
# complex objects have schema -definitions
$refdefinitions:
'#/parameters/commentId'  SessionsResponse:
    responsesrequired:
      - status
# responses may fall through to errors- results
    properties:
  "200":    status:
      description: Success type: string
        schemadefault: "ok"
      results:
    type: object   type: array
        propertiesitems:
          type: object
  status:        properties:
         type: string  mode:
              defaulttype: "ok"string
              timestampenum: [view, edit]
              typeusername:
integer              type:  string
description: time of response     delete:    sessionId:
  description: Delete a markup comment        #type: usedstring
as the method name of the controller       operationIduserId:
markupcomment_delete       tags:       type: string
-
Commenting  LibrariesResponse:
    parametersrequired:
      - status
- $ref: '#/parameters/fileId'    - results
   - $refproperties: '#/parameters/sessionId'

      status:
       - $reftype: '#/parameters/markupId'string
        - $refdefault: '#/parameters/commentId'"ok"
      responsesresults:
        type: array
    # responses may fall throughitems:
to errors         "200"type: object
          descriptionproperties:
 Success           schemaid:
              type: objectstring
            propertiesname:
              statustype: string
  BlocksResponse:
    required:
      - status
 type: string    - results
    properties:
      defaultstatus:
"ok"        type: string
        timestampdefault: "ok"
      results:
        type: integerarray
        items:
       description   type: timeobject
of response
  /v1/files/{fileId}/markup/{markupId}/comment:         properties:
# binds a127 app logic to a route     x-swagger-router-controller: commentsid:
       post:       descriptiontype: Poststring
 a new markup comment        #name:
used as the method name of the controller       operationIdtype: markupcomment_post string
          tags:  thumbnail:
      - Commenting       parameterstype: string

  ErrorResponse:
   - $refrequired:
'#/parameters/fileId'      - message
   - $refproperties: '#/parameters/sessionId'
      message:
    - $ref: '#/parameters/markupId'  type: string
     - nameerrrorId:
  body      type: string

  inGetUserResponse:
  body  required:
      - status
required: true     - results
    schemaproperties:
      status:
        type: string
 object       default: "ok"
    properties:  results:
        type: array
  text:      items:
          type$ref: string'#/definitions/UserPreferencesObject'

  UserPreferencesObject:
  responses:  type: object
    properties:
# responses may fall through to errorspreferences:
        "200"type: object
         descriptionproperties: Success
          schemavariables:
            type: object
            properties:
              statuspolarang:
                 type: string
                default: "ok90"
              timestamposmode:
                type: integerstring
                descriptiondefault: time"663"
of response   /v1/files/{fileId}/attachments:     post:       descriptionzoomWheel:
Create a markup attachment       # used as the method name of the controller
      operationId type: post_markupstring
      tags:         - Commenting
      consumes default: "0"
        - multipart/form-data       parameterslwdefault:
        - $ref: '#/parameters/fileId'      type: string
 - $ref: '#/parameters/sessionId'         - in: formData  default: "25"
       name: file      dynasnap:
    required: true           type: filestring
        responses:        default: "20039":
          description: Success   graphicswinmodelbackgrndcolor:
       schema:         type: string
  required:              default: -"White"
status              cursorMode:
- changeId             properties:  type: string
           status:     default: "2"
           typepreferences_display:
string            type: object
    default: "ok"       properties:
       changeId:       graphicswinmodelbackgrndcolor:
         type: string      type: string
 # responses may fall through to errors         default:   "White"
       description: Error      propertieswindowdisplaymode:
    schema:             $ref: "#/definitions/ErrorResponse"
type: string
   get:       description: Retrieve all attachments   default: "0"
   # used as the method name of the controllerwindow:
      operationId: attachments_get     type: object
tags:         - Commenting  properties:
    parameters:         - $refedit: 
'#/parameters/fileId'         - $ref: '#/parameters/sessionId'     type: object
responses:         # responses may fall through to errors properties:
       "200":           descriptiondockwidgets:
Success           schema:         type: object
   type: object             properties:   properties:
           status:           layerwindow:
      type: string                 defaulttype: "ok"object
              timestamp:          properties:
      type: integer                 description: time ofvisible:
response   /v1/files/{fileId}/attachments/{attachmentId}:     # binds a127 app logic to a route     x-swagger-router-controller: comments     get:  type: string
   description: Retrieve attachment        # used as the method name of the controller       operationIddefault: attachment_get"1"
      tags:         - Commenting       parameters:   iscollapsed:
     - $ref: '#/parameters/fileId'         - $ref: '#/parameters/sessionId'         - $reftype: '#/parameters/attachmentId'string
      responses:
        # responses may fall through to errors        default: "200false":
          description: Success           schema:      description: true/false if the layer panel is type:collapsed objector not
           properties:               statush:
                  type: string         type: string
       default: "ok"               timestamp:     description: height of the layerwindow
       type: integer              propertywindow:
  description: time of response   /swagger:     x-swagger-pipe: swagger_raw # complex objects have schema definitions definitions:   SessionsResponsetype: object
   required:       - status       - results     properties:
      status:          type: string         defaultvisible:
"ok"         results:         type: array         itemstype: string
              type: object             propertiesdefault: "1"
              mode:            iscollapsed:
    type:   string                 enum: [view, edit]  type: string
           username:                 typedefault: string"false"
              sessionId:              description: true/false if type:the stringproperties panel is collapsed or not
         userId:                 type: stringh:
          ErrorResponse:     required:       - message     propertiestype: string
     message:         type: string       errrorId:      description: height of type:property stringpanel