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
  libId:
    name: libId
    in: path
    description: The id of the library
    required: true
    type: string
  itemId:
    name: itemId
    in: path
    description: The id of the block
    required: true
    type: string
  ownerType:
    name: ownerType
    in: header
    description: Type of the library (PUBLIC/USER/ORG)
    required: false
    type: string
  sessionId:
    name: sessionid
    in: header
    description: the user sessionId
    required: true
    type: string
  threadId:
    name: threadId
    in: path
    description: the comment thread
    required: true
    type: string
  markupId:
    name: markupId
    in: path
    description: the markup
    required: true
    type: string
  commentId:
    name: commentId
    in: path
    description: the 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
    post:
      description: XRef search
      # used as the method name of the controller
      operationId: xref_search
      tags:
        - ARES Kudo Optional
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/optionalSessionId"
        - name: body
          in: body
          required: true
          schema:
            required:
              - path
            properties:
              path:
                type: array
                description: xrefs paths to search
                items:
                  type: string
      responses:
        "200":
          description: Success
          schema:
            type: array
            items:
              type: object
              properties:
                path:
                  type: string
                files:
                  type: array
                  items:
                    type: object
                    properties:
                      "_id":
                        type: string
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"
  /files/{fileId}/preview:
    # binds a127 app logic to a route
    x-swagger-router-controller: files
    post:
      description: Optionally handle receiving updates previews
      # used as the method name of the controller
      operationId: preview_post
      tags:
        - ARES Kudo Optional
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/optionalSessionId"
        - in: formData
          name: file
          required: true
          type: file
      responses:
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                type: string
                default: "ok"
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /files/{fileId}/info:
    # binds a127 app logic to a route
    x-swagger-router-controller: files
    get:
      description: Returns file information
      # used as the method name of the controller
      operationId: info_get
      tags:
        - ARES Kudo Required
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/optionalSessionId"
      responses:
        "200":
          description: Success
          schema:
            required:
              - status
            type: object
            properties:
              status:
                type: string
                default: "ok"
              filename:
                type: string
              folderId:
                type: string
              owner:
                type: string
        # responses may fall through to errors
        "401":
          description: User is not autenticated
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: File is not found
          schema:
            $ref: "#/definitions/ErrorResponse"
  /files/{fileId}/session:
    # binds a127 app logic to a route
    parameters:
      - $ref: "#/parameters/fileId"
      - $ref: "#/parameters/sessionId"

    x-swagger-router-controller: files_sessions
    get:
      description: get file sessions
      # used as the method name of the controller
      operationId: session_get
      tags:
        - File Sessions
      responses:
        "200":
          description: Success
          schema:
            # a pointer to a definition
            $ref: "#/definitions/SessionsResponse"
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"
    post:
      description: Create file session. Sessions need to be either of type "view" or "edit"
      # used as the method name of the controller
      operationId: session_post
      tags:
        - File Sessions
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - mode
            properties:
              mode:
                type: string
                description: Type of session requested
                enum: [view, edit]
              fileId:
                type: string
                description: fileId for the file for which the session is being requested
      responses:
        "200":
          description: Success
          schema:
            required:
              - status
              - "_id"
            properties:
              status:
                type: string
                default: "ok"
              "_id":
                type: string
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"
    delete:
      description: delete file session
      # used as the method name of the controller
      operationId: session_delete
      tags:
        - File Sessions
      responses:
        "200":
          description: Success
          schema:
            # a pointer to a definition
            $ref: "#/definitions/SessionsResponse"
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"
  /auth:
    # binds a127 app logic to a route
    x-swagger-router-controller: auth
    get:
      description: validate user session
      # used as the method name of the controller
      tags:
        - User Sessions
      operationId: auth_get
      parameters:
        - $ref: "#/parameters/optionalSessionId"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                type: string
                default: "ok"
        401:
          description: Authorization information is missing or invalid.
  /users:
    # binds a127 app logic to a route
    x-swagger-router-controller: users
    get:
      description: ReturnsGet user data and objectpreferences
      # used as the method name of the controller
      operationId: users_get
      tags:
        - UserUsers
Sessions       parameters:
        - $ref: "#/parameters/sessionId"
      responses:
        #200:
responses may fall through to errors         "200":description: Success
          descriptionschema:
Success            schema$ref: '#/definitions/GetUserResponse'
        400:
  type: object       description: Something went wrong while getting properties:the userdata from json file.
        default:
 status:         description:  Error
     type: string    schema:
            default$ref: "ok#/definitions/ErrorResponse"
    put:
         resultsdescription: Update user data and preferences
      # used as the method type:name arrayof the controller
      operationId: users_put
      itemstags:
        - Users
      parameters:
 type: object      - $ref: "#/parameters/sessionId"
        -  propertiesname: body
          in: body
       fname:   required: true
          schema:
       type: string    $ref: '#/definitions/UserPreferencesObject'

      responses:
         description200:
first name         description: Success
          surnameschema:
            type: object
         type: string  properties:
              status:
     description: last name of user       type: string
            "_id":    default: "ok"
        400:
        type: string description: Something went wrong while saving the userdata into the json file.
        emaildefault:
          description: Error
          typeschema:
string            $ref: "#/definitions/ErrorResponse"

      licenseExpirationDate/v1/files/{fileId}/annotations:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    typeget:
integer      description: Returns annotations for a file
      # used as preferences:the method name of the controller
      operationId: annotations_get
      tags:
  type: object     - Commenting
      parameters:
        - properties$ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - name: timestamp
       preferences_display:   type: integer
          in: query
          typerequired: objectfalse
          description: timestamp of last request to only send new items
      propertiesresponses:
        # responses may fall through to errors
        "200":
    graphicswinmodelbackgrndcolor:      description: Success
          schema:
            type: stringobject
            properties:
              status:
   default: White            type: string
           view:     default: "ok"
              results:
     type: object          type: object
             window:   properties:
                  timestamp:
    type: object               type: integer
        variables:            description: time of response
           type: object      commmentThreads:
                    propertiestype: array
                    description: ""
      dynasnap:              items:
                type: string     type: object
                  markups:
     default: "63"     put:       description: Returns usertype: objectarray
      # used as the method name of the controller       operationIddescription: users_put""
      tags:         - User Sessions   items:
   parameters:         - $ref: "#/parameters/sessionId"         - nametype: bodyobject
          in: body        status:
  required: true           schema:      type: string
     properties:               preferencesdefault: "ok"
  /v1/files/{fileId}/markups:
    # binds a127 app logic to a route
type: object   x-swagger-router-controller: comments
    get:
       description: userReturns preferencesmarkups for a file
      # used as the method name of properties:the controller
      operationId: markups_get
      tags:
  window:      - Commenting
      parameters:
        - type$ref: object"#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - propertiesname: timestamp
          type: integer
          editin: query
          required: false
           typedescription: objecttimestamp of last request to only send new items
      responses:
        # properties:responses may fall through to errors
        "200":
            dockwidgetsdescription: Success
          schema:
            type: object
  type: object         properties:
              status:
    properties:            type: string
                 layerwindowdefault: "ok"
              results:
                type: object
                properties:
                properties:  timestamp:
                    type: integer
          h:          description: time of response
                  markups:
    type: string               type: array
                    description: height""
o the layerwindow        responses:         # responsesitems:
may fall through to errors         "200":           description: Successtype: object
          schema:             typestatus:
object             properties:               status:
             type: string
  type: string                 default: "ok"
  /v1/files/{fileId}/annotationscommentThreads:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    get:
      description: Returns annotationscomments for a file
      # used as the method name of the controller
      operationId: annotationscommentThreads_get
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - name: timestamp
          type: integer
          in: query
          required: false
          description: timestamp of last request to only send new items
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                type: string
                default: "ok"
              results:
                type: object
                properties:
                  timestamp:
                    type: integer
                    description: time of response
                  commmentThreads:
                    type: array
                    description: ""
                    items:
                      type: object
                  markupsstatus:
                    type: arraystring
                    descriptiondefault: "ok"
  /v1/files/{fileId}/commentThread:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
 items:   post:
      description: Add a new commentThread for a file
     type: object# used as the method name of the controller
      operationId: commentThread_post
  status:    tags:
        - Commenting
      typeparameters:
string        - $ref: "#/parameters/fileId"
        -  default$ref: "ok#/parameters/sessionId"
  /v1/files/{fileId}/markups:      - #name: bindsbody
a127 app logic to a route     x-swagger-router-controllerin: commentsbody
     get:     required: true
description: Returns markups for a file     schema:
 # used as the method name of the controller   type: object
  operationId: markups_get       tags:  properties:
      - Commenting       parameterstitle:
         - $ref: "#/parameters/fileId"     type: string
  - $ref: "#/parameters/sessionId"         - nametext:
  timestamp              type: integer
string
         in: query    state:
      required: false         type: string
description: timestamp of last request to only send new items       responsesenum: [ACTIVE, RESOLVED]
      # responses may fall through to errors  ids:
      "200":           descriptiontype: Successarray
          schema:      items:
      type: object             propertiestype: string
      responses:
      status:  # responses may fall through to errors
        type"200": string
          description: Success
    default: "ok"     schema:
         results:   type: object
            typeproperties:
object                 propertiesstatus:
                  timestamptype: string
                   typedefault: integer"ok"
              timestamp:
     description: time of response        type: integer
         markups:       description: time of response
  /v1/files/{fileId}/commentThread/{threadId}:
    # binds a127 type:app arraylogic to a route
    x-swagger-router-controller: comments
    put:
      description: ""Update a commentThread
      # used as the method name of the controller
   items:   operationId: commentThread_put
      tags:
        - Commenting
 type: object    parameters:
        - $ref: "#/parameters/fileId"
   status:     - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
  type: string     - name: body
          in: body
 default: "ok"   /v1/files/{fileId}/commentThreads:     #required: bindstrue
a127 app logic to a route     x-swagger-router-controllerschema:
comments     get:       descriptiontype: Returnsobject
comments for a file       # used asproperties:
the method name of the controller       operationId: commentThreads_get title:
     tags:         - Commenting type: string
    parameters:         - $reftext:
"#/parameters/fileId"         - $ref: "#/parameters/sessionId"     type: string
  -    name: timestamp       ids:
   type:  integer           intype: query array
                requireditems:
false           description: timestamp of last request to only send new itemstype: string
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                type: string
                default: "ok"
              resultstimestamp:
                type: objectinteger
                propertiesdescription: time of response
    get:
      description: get a commentThread
timestamp:      # used as the method name of the controller
      typeoperationId: integercommentThread_get
      tags:
        - Commenting
   description: time of responseparameters:
        - $ref: "#/parameters/fileId"
       commmentThreads: - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
      typeresponses:
array        # responses may fall through to errors
       description: "200":
          description: Success
          itemsschema:
            type: object
        type: object   properties:
               status:
                type: string
      type: string         default: "ok"
          default: "ok"   /v1/files/{fileId}/commentThreadtimestamp:
    # binds a127 app logic to a route     x-swagger-router-controller: commentstype: integer
                postdescription: time of response
    descriptiondelete:
Add    a new commentThreaddescription: forDelete a filecomment Thread
      # used as the method name of the controller
      operationId: commentThread_postdelete
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - name$ref: body"#/parameters/threadId"
          inresponses:
body        # responses may required:fall truethrough to errors
        schema"200":
            typedescription: objectSuccess
            propertiesschema:
              titletype: object
               type: stringproperties:
              textstatus:
                type: string
              state:  default:  "ok"
            type  timestamp:
string                type: enum:integer
[ACTIVE, RESOLVED]               idsdescription: time of response
  /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}:
    # binds a127 app logic to a type:route
array    x-swagger-router-controller: comments
    put:
      itemsdescription: Update a comment
      # used as the method name of the controller
type: string     operationId: comment_put
responses:      tags:
  # responses may fall through to errors- Commenting
       "200"parameters:
        -  description$ref: Success"#/parameters/fileId"
        -  schema$ref: "#/parameters/sessionId"
        -   type$ref: object"#/parameters/threadId"
        -    properties$ref: "#/parameters/commentId"
        - name: body
  status:        in: body
          typerequired: stringtrue
          schema:
        default: "ok"   type: object
          timestamp:  properties:
              typetext:
integer                type: description:string
 time of response   /v1/files/{fileId}/commentThread/{threadId}responses:
        # bindsresponses a127may appfall logicthrough to aerrors
route     x-swagger-router-controller: comments  "200":
  put:        description: UpdateSuccess
a commentThread       # used asschema:
the method name of the controller       operationIdtype: commentThread_putobject
      tags:      properties:
  - Commenting       parameters:    status:
    - $ref: "#/parameters/fileId"         - $reftype: "#/parameters/sessionId"string
          - $ref: "#/parameters/threadId"    default: "ok"
   - name: body           intimestamp:
body           required: true    type: integer
     schema:           description: time type:of objectresponse
    get:
       propertiesdescription: Retrieve a comment
      # used as the method title:name of the controller
      operationId: comment_get
      typetags:
 string       - Commenting
      textparameters:
        - $ref: "#/parameters/fileId"
     type: string  - $ref: "#/parameters/sessionId"
        -  ids$ref: "#/parameters/threadId"
        - $ref: "#/parameters/commentId"
    type: array responses:
        # responses may fall through to errors
items:        "200":
          typedescription: stringSuccess
      responses:    schema:
    # 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
    getdelete:
      description: getDelete a commentThreadcomment
      # used as the method name of the controller
      operationId: commentThreadcomment_getdelete
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
        - $ref: "#/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}/commentThread/{threadId}/comment:
 delete:   # binds a127 app description:logic Deleteto a commentroute
Thread    x-swagger-router-controller: comments
 # used as thepost:
method name of the controller  description: Post a new comment
operationId: commentThread_delete      # used as the method name of the controller
      operationId: comment_post
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"

     responses:   - name: body
   # responses may fall through to errors in: body
      "200":           descriptionrequired: Successtrue
          schema:
            type: object
            properties:
              statustext:
                type: string
      responses:
        # default: "ok"
   responses may fall through to errors
        "200":
 timestamp:         description: Success
      type: integer   schema:
             descriptiontype: timeobject
of response   /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}:     # binds a127 appproperties:
logic to a route     x-swagger-router-controller: comments     putstatus:
      description:  Update a comment      type: #string
used as the method name of the controller       operationId: comment_put default: "ok"
    tags:         - Commentingtimestamp:
      parameters:         - $reftype: "#/parameters/fileId"integer
         - $ref: "#/parameters/sessionId"     description: time of response
- $ref: "#/parameters/threadId" /v1/files/{fileId}/markup:
    # binds a127 app -logic $ref: "#/parameters/commentId"
to a route
       - name: bodyx-swagger-router-controller: comments
    post:
      indescription: bodyAdd a new markup for a file
    required: true # used as the method name of the controller
 schema:     operationId: markup_post
      typetags:
object        - Commenting
    properties:  parameters:
        -    text$ref: "#/parameters/fileId"
        -   $ref: "#/parameters/sessionId"
   type: string    -   responsesname: body
       # responses may fallin: throughbody
to errors         "200"required: true
         description schema:
Success            schematype: object
           type properties:
 object             propertiestitle:
              status  type: string
               typetext:
string                 defaulttype: "ok"string
              timestampstate:
                type: integerstring
                descriptionenum: time of response[ACTIVE, RESOLVED]
       get:       descriptionids:
Retrieve   a comment       # used as the method nametype: ofarray
the controller       operationId: comment_get       tagsitems:
        - Commenting       parameters:  type: string
     - $refresponses:
"#/parameters/fileId"        # - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
        - $ref: "#/parameters/commentId"
      responses:
        # responses mayresponses 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
    deletex-swagger-router-controller: comments
    put:
      description: DeleteUpdate a commentmarkup
      # used as the method name of the controller
      operationId: commentmarkup_deleteput
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadIdmarkupId"
        - $refname: "#/parameters/commentId"body
          responsesin: body
       # responses may fallrequired: throughtrue
to errors         "200"schema:
          description  type: object
Success            schemaproperties:
            type  title:
 object               propertiestype: string
             status text:
                type: string
              ids:
 default: "ok"              type: timestamp:array
                typeitems:
integer                  descriptiontype: string
time  of response   /v1/files/{fileId}/commentThread/{threadId}/commentresponses:
        # bindsresponses a127may appfall logicthrough to errors
a route     x-swagger-router-controller: comments "200":
   post:       description: PostSuccess
a new comment       # usedschema:
as the method name of the controller       operationIdtype: comment_postobject
      tags:      properties:
  - Commenting       parameters:    status:
    - $ref: "#/parameters/fileId"         - $reftype: "#/parameters/sessionId"string
        - $ref: "#/parameters/threadId"      default: "ok"
 - name: body           intimestamp:
body           required: true    type: integer
     schema:           description: time type:of objectresponse
    get:
       propertiesdescription: get a markup
      # used as the method name text:of the controller
      operationId: markup_get
      typetags:
string       responses: - Commenting
      # responses may fall through to errorsparameters:
        -   $ref: "200#/parameters/fileId":
        -  description$ref: Success"#/parameters/sessionId"
        -  schema$ref: "#/parameters/markupId"
      responses:
    type: object   # responses may fall through to errors
   properties:     "200":
         status description: Success
          schema:
     type:  string     type: object
            defaultproperties:
"ok"               timestampstatus:
                type: integerstring
                descriptiondefault: time of response
  /v1/files/{fileId}/markup "ok"
              timestamp:
    # binds a127 app logic to a route     x-swagger-router-controller: commentstype: integer
                postdescription: time of response
    descriptiondelete:
Add    a new markupdescription: fordelete a filemarkup
      # used as the method name of the controller
      operationId: markup_postdelete
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - name$ref: body"#/parameters/markupId"
      responses:
   in: body    # responses may fall through to errors
required: true       "200":
   schema:       description: Success
    type: object     schema:
       properties:     type: object
        title:    properties:
            type  status:
string                texttype: string
                typedefault: string"ok"
              statetimestamp:
                type: stringinteger
                enumdescription: [ACTIVE, RESOLVED]
time of response
  /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:
    # binds a127 app logic to ids:a route
    x-swagger-router-controller: comments
    put:
    type: array description: Update a comment
      # used as the method name items:of the controller
      operationId: markupcomment_put
        typetags:
string       responses: - Commenting
      #parameters:
responses may fall through to errors         "200":- $ref: "#/parameters/fileId"
        -  description$ref: Success"#/parameters/sessionId"
        -  schema$ref: "#/parameters/markupId"
        - $ref:  type: object"#/parameters/commentId"
        - name: body
   properties:       in: body
      status:    required: true
           typeschema:
string            type: object
   default: "ok"        properties:
      timestamp:        text:
        type: integer       type: string
        descriptionresponses:
time of response   /v1/files/{fileId}/markup/{markupId}:     # bindsresponses a127may appfall logicthrough to aerrors
 route     x-swagger-router-controller: comments "200":
   put:       description: UpdateSuccess
a markup       # used asschema:
the method name of the controller       operationIdtype: markup_putobject
      tags:      properties:
       - Commenting       status:
                parameters:type: string
               - $refdefault: "#/parameters/fileIdok"
        - $ref: "#/parameters/sessionId"      timestamp:
               - $reftype: "#/parameters/markupId" integer
               - namedescription: bodytime of response
    get:
     in: body description: Retrieve a markup comment
      # used as the method name of the controller
      operationId: markupcomment_get
      required: truetags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/markupId"
        - $ref: "#/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
    delete:
      description: Delete a markup comment
      # used as the method name of the controller
      operationId: markupcomment_delete
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        -  schema$ref: "#/parameters/sessionId"
        -   type$ref: object"#/parameters/markupId"
        - $ref: "#/parameters/commentId"
 properties:     responses:
        # title:responses may fall through to errors
        "200":
  type: string       description: Success
      text:    schema:
            type: object
string            properties:
  ids:            status:
     type: array          type: string
     items:           default: "ok"
      type: string       responsestimestamp:
        # responses may fall through to errors  type: integer
     "200":           description: Successtime of response
  /v1/files/{fileId}/markup/{markupId}/comment:
    # schema:binds a127 app logic to a route
      type: objectx-swagger-router-controller: comments
    post:
      description: Post a properties:new markup comment
      # used as the method name status:of the controller
      operationId: markupcomment_post
      typetags:
string        - Commenting
       defaultparameters:
"ok"        - $ref: "#/parameters/fileId"
    timestamp:    - $ref: "#/parameters/sessionId"
        -  type$ref: integer"#/parameters/markupId"
        - name: body
     description: time of response     getin: body
     description: get a markup  required: true
   # used as the method name of the controller  schema:
    operationId: markup_get       tagstype: object
       - Commenting       parametersproperties:
        - $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
      parametersconsumes:
        - $ref: "#/parameters/fileId"multipart/form-data
      parameters:
        - $ref: "#/parameters/sessionIdfileId"
        - $ref: "#/parameters/markupIdsessionId"
      responses:  - in: formData
    # responses may fall through to errors
        "200" name: attachment
         description: Success
          schema required: true
           type: objectfile
            propertiesresponses:
              status:
    "200":
          description: type:Success
string          schema:
      default: "ok"     required:
         timestamp:     - status
          type: integer   - changeId
            descriptionproperties:
 time of response   /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:     # binds a127 appstatus:
logic to a route     x-swagger-router-controller: comments     put:  type: string
   description: Update a comment       # used as the method name of the controllerdefault: "ok"
          operationId: markupcomment_put   changeId:
   tags:         - Commenting   type: string
  parameters:      # responses may -fall $ref: "#/parameters/fileId"
through to errors
       - $refdefault:
"#/parameters/sessionId"         - $refdescription: "#/parameters/markupId"Error
         - $refschema:
"#/parameters/commentId"         - name: body $ref: "#/definitions/ErrorResponse"
  /v1/files/{fileId}/attachments:
     inx-swagger-router-controller: bodycomments
    get:
     required description: trueRetrieve all attachments
      # used schema:as the method name of the controller
      typeoperationId: objectattachments_get
      tags:
     properties:   - Commenting
      parameters:
   text:     - $ref: "#/parameters/fileId"
        - type$ref: string"#/parameters/sessionId"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                type: string
                default: "ok"
              timestamp:
                type: integer: integer
                description: time of response
  /v1/files/{fileId}/attachments/{attachmentId}:
    # binds a127 app logic to a route
     descriptionx-swagger-router-controller: timecomments
of response     get:
      description: Retrieve a markup commentattachment
      # used as the method name of the controller
      operationId: markupcommentattachment_get
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/markupId"
        - $ref: "#/parameters/commentId"attachmentId"
      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
    delete:
      description:
Delete a markup comment       # used as the method name of the controller
      operationId: markupcomment_delete       tagstype: integer
       -  Commenting       parametersdescription: time of response
  /swagger:
    x- $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"swagger-pipe: swagger_raw
# complex objects have schema definitions
definitions:
  SessionsResponse:
    required:
    - $ref: "#/parameters/markupId"
 - status
       - $ref: "#/parameters/commentId"results
    properties:
  responses:    status:
    # responses may fall throughtype: tostring
errors        default: "200ok":
      results:
    description: Success   type: array
      schema:  items:
          type: object
            properties:
              statusmode:
                type: string
              enum:  default: "ok"[view, edit]
            username:
        timestamp:      type: string
         type: integer  sessionId:
              descriptiontype: timestring
of response   /v1/files/{fileId}/markup/{markupId}/comment:     # binds a127 appuserId:
logic to a route     x-swagger-router-controller: comments     posttype: string

    descriptionLibrariesResponse:
Post a new markup commentrequired:
      #- used asstatus
the method name of the controller - results
    operationIdproperties:
markupcomment_post       tagsstatus:
        -type: Commentingstring
      parameters:  default: "ok"
     - $ref: "#/parameters/fileId"results:
        - $reftype: "#/parameters/sessionId"array
        - $refitems:
"#/parameters/markupId"         - nametype: bodyobject
          inproperties:
body            requiredid: true
          schema:    type: string
       type: object    name:
        properties:      type: string
  BlocksResponse:
    textrequired:
      - status
      - results
type: string   properties:
   responses:   status:
     # responses may falltype: throughstring
to errors        default: "200ok":
      results:
   description: Success    type: array
     schema:   items:
          type: object
 
          properties:
              statusid:
                type: string
            name:
    default: "ok"         type: string
    timestamp:        thumbnail:
        type: integer     type: string

  ErrorResponse:
    required:
 description: time of response   /v1/files/{fileId}/attachment:- message
    x-swagger-router-controllerproperties:
comments      postmessage:
       description type: Createstring
a markup attachment    errrorId:
   # used as the method nametype: ofstring
the
controller  GetUserResponse:
    operationIdrequired: attachment_post
      tags:-  status
      - Commentingresults
      consumesproperties:
      status:
 - multipart/form-data       parameterstype: string
       - $refdefault: "#/parameters/fileIdok"
        - $refresults:
"#/parameters/sessionId"        type: -array
in: formData       items:
   name: attachment      $ref: '#/definitions/UserPreferencesObject'

  requiredUserPreferencesObject:
true    type: object
     typeproperties:
file       responsespreferences:
        "200"type: object
         descriptionproperties:
Success           schemavariables:
            requiredtype: object
            properties:
-  status            polarang:
  - changeId             propertiestype: string
             status   default: "90"
               typeosmode:
string                type: default: "ok"string
                changeIddefault: "663"
               type: string
  zoomWheel:
     # responses may fall through to errors         defaulttype: string
         description: Error      default: "0"
   schema:           lwdefault:
 $ref: "#/definitions/ErrorResponse"   /v1/files/{fileId}/attachments:     x-swagger-router-controller: comments     gettype: string
     description:   Retrieve all attachments      default: #"25"
used as the method name of the controller       operationIddynasnap:
attachments_get       tags:         -type: Commentingstring
      parameters:         - $refdefault: "#/parameters/fileId39"
        - $ref: "#/parameters/sessionId"       responsesgraphicswinmodelbackgrndcolor:
        # responses may fall through to errors  type: string
     "200":           descriptiondefault: Success"White"
           schema:   cursorMode:
         type: object      type: string
     properties:           default: "2"
  status:        preferences_display:
        type: string   type: object
            defaultproperties:
"ok"               timestampgraphicswinmodelbackgrndcolor:
                type: integerstring
                descriptiondefault: time of response"White"
   /v1/files/{fileId}/attachments/{attachmentId}:     # binds a127 app logic to apropertieswindowdisplaymode:
route     x-swagger-router-controller: comments     get:     type: string
description: Retrieve attachment       # used as the method name of the controllerdefault: "0"
      operationId: attachment_get   window:
   tags:         -type: Commentingobject
      parameters:      properties:
  - $ref: "#/parameters/fileId"         - $refedit: "#/parameters/sessionId"
        - $ref: "#/parameters/attachmentId"       responsestype: object
       # responses may fall through to errors     properties:
   "200":           description: Success   dockwidgets:
       schema:             type: object
            properties:        properties:
      status:                 typelayerwindow:
string                 default: "ok"      type: object
       timestamp:                 typeproperties: integer
                description: time of response   /swagger:     x-swagger-pipevisible:
swagger_raw # complex objects have schema definitions definitions:
  SessionsResponse:     required:       - status      type: - resultsstring
    properties:       status:         type: string         default: "ok1"
      results:          type: array         itemsiscollapsed:
          type: object           properties:      type: string
     mode:               type: string       default: "false"
      enum: [view, edit]             username:       description: true/false if the layer panel is collapsed type:or string
not
           sessionId:               typeh:
string             userId:               type: string

  LibrariesResponse:     required:       - status       - results     propertiesdescription: height of the layerwindow
  status:          type: string         defaultpropertywindow:
"ok"        results:         type: array      type: object
 items:           type: object           properties:
            id:               typevisible:
string             name:               type: string
  BlocksResponse:     required:       - status       - results     propertiesdefault: "1"
     status:         type: string         default: "ok"   iscollapsed:
   results:         type: array         items:      type: string
   type: object           properties:             iddefault: "false"
             type:  string             namedescription: true/false if the properties panel is collapsed or  not
    type: string             thumbnail:        h:
      type: string    ErrorResponse:     required:       - message     propertiestype: string
     message:         type: string       errrorId:      description: height of type:property string
panel