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 (has to be implemented if sessionId query parameter is passed to editor url) - name: Commenting description: API support for commenting panel - name: User Sessions description: Optional User Session Handling (has to be- implementedname: ifBlock sessionIdLibrary query parameter is passed todescription: editorAPI url)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 commentblock thread required: true type: string markupIdownerType: name: markupIdownerType in: pathheader description: Type of the markup library (PUBLIC/USER/ORG) required: truefalse type: string commentIdsessionId: name: commentIdsessionid in: pathheader description: the user commentsessionId required: true type: string attachmentIdthreadId: name: attachmentIdthreadId in: path description: the comment attachmentthread required: true type: string optionalSessionIdmarkupId: name: sessionIdmarkupId in: headerpath description: the usermarkup sessionId (optional; sent only if sessionId query parameter was passed to editor url) required: false required: true type: string fileSessionIdcommentId: name: xSessionIdcommentId in: headerpath description: the file sessionIdcomment required: true type: string paths: /files/{fileId}/diffsattachmentId: parametersname: attachmentId in: -path $ref: '#/parameters/fileId' description: the attachment - $ref: '#/parameters/optionalSessionId' required: true # binds a127type: appstring logic to aoptionalSessionId: route x-swagger-router-controllername: filessessionid getin: header description: Returnsthe fileuser contentsessionId required: false # used as the methodtype: namestring ofpaths: the controller /library/blocks: operationIdparameters: diffs_get - tags$ref: "#/parameters/optionalSessionId" - ARES Kudo Required$ref: "#/parameters/ownerType" x-swagger-router-controller: blocks responses: get: "200": description: Returns block libraries description: Success operationId: libraries_get schematags: - Block Library required: responses: "200": - status description: Success - baseContent schema: properties: $ref: "#/definitions/LibrariesResponse" statusdefault: description: Error type: string schema: default$ref: "ok#/definitions/ErrorResponse" /library/blocks/{libId}/items: baseContentparameters: - $ref: "#/parameters/libId" - type$ref: string"#/parameters/optionalSessionId" x-swagger-router-controller: blocks get: description: Base64 encoded content of fileReturns blocks of a library operationId: blocks_get tags: - Block Library # responses may fall through to errorsresponses: "404200": description: ErrorSuccess schema: $ref: "#/definitions/ErrorResponseBlocksResponse" put: default: description: Update file content description: Error # used as the method name of the controller schema: operationId: diffs_put tags$ref: "#/definitions/ErrorResponse" /library/blocks/{libId}/items/{itemId}/content: - ARESparameters: Kudo Required - $ref: parameters:"#/parameters/libId" - name$ref: body"#/parameters/itemId" - $ref: "#/parameters/optionalSessionId" in: body required- in: truequery schemaname: fileType required: false default: "dwg" - baseContent type: string propertiesx-swagger-router-controller: blocks get: baseContentdescription: Returns block file typeoperationId: stringblock_getfile tags: - description:Block Base64Library encoded content of file produces: - application/octet-stream responses: "200": description: Success schemadefault: requireddescription: Error schema: - status $ref: "#/definitions/ErrorResponse" - changeId/library/blocks/{libId}/items/{itemId}/thumbnail: parameters: - properties$ref: "#/parameters/libId" - $ref: "#/parameters/itemId" status - $ref: "#/parameters/optionalSessionId" - in: query typename: stringfileType required: false default: "okpng" type: string changeId x-swagger-router-controller: blocks get: description: Returns block type:thumbnail string operationId: block_getthumbnail # responses may fall through to errorstags: default:- Block Library descriptionproduces: Error - application/octet-stream schema: responses: $ref: "#/definitions/ErrorResponse" /files200": post: description: CreateSuccess a new file default: # used as the method name of the controller description: Error operationId: post_file tagsschema: - ARES Kudo Optional $ref: "#/definitions/ErrorResponse" /files: consumes: parameters: - multipart/form-data $ref: "#/parameters/optionalSessionId" parametersx-swagger-router-controller: files post: - in: header description: Create/Update a file name: folderId# used as the method name of the controller required: true operationId: post_file typetags: string - in:ARES formDataKudo Required consumes: name: file - multipart/form-data required: true parameters: - typein: fileheader responses: name: "200":fileId description: SuccessID of the file (New file will be created if this value schema:is not specified) required: false type: string - status - in: formData - changeId name: file propertiesrequired: true type: file status responses: "200": type description: stringSuccess schema: default: "ok" required: changeId: - id type: string - filename # responses may fall through to errors - isNewFile default: description:- ErrorchangeId schema: properties: $ref: "#/definitions/ErrorResponse" /files/{fileId}/xref/searchid: # binds a127 app logic to a route x-swagger-router-controller: filestype: string post: descriptionfilename: XRef search # used as the method name of thetype: controllerstring operationId: xref_search tagsisNewFile: - ARES Kudo Optional type: boolean parameters: - $ref: '#/parameters/fileId' changeId: - $ref: '#/parameters/optionalSessionId' - nametype: bodystring # responses in:may bodyfall through to errors required default: true schemadescription: Error requiredschema: $ref: "#/definitions/ErrorResponse" - path /files/{fileId}/data: parameters: - properties:$ref: "#/parameters/fileId" - $ref: "#/parameters/optionalSessionId" # binds path:a127 app logic to a route x-swagger-router-controller: files typeget: array description: Returns file content # description:used xrefsas pathsthe tomethod searchname of the controller operationId: data_get tags: - ARES items:Kudo Required produces: - application/octet-stream type: string responses: "200": description: Success # responses schema:may fall through to errors type"404": object propertiesdescription: Error statusschema: $ref: "#/definitions/ErrorResponse" type/files/{fileId}/xref/search: string # binds a127 app logic to a route defaultx-swagger-router-controller: "ok"files post: resultdescription: XRef search # used as the method name of the type:controller array operationId: xref_search itemstags: - ARES Kudo Optional typeparameters: object - $ref: "#/parameters/fileId" - properties$ref: "#/parameters/optionalSessionId" - name: body pathin: body required: true typeschema: string required: files: - path properties: type: array path: items: type: array description: xrefs paths type:to search object items: properties: type: string responses: "_id200": description: Success schema: type: string type: array # responses may fall through to errors items: default: descriptiontype: Errorobject schema: properties: $ref: "#/definitions/ErrorResponse" /files/{fileId}/preview: path: # binds a127 app logic to a route x-swagger-router-controller: files posttype: string description: Optionally handle receiving updates previews files: # used as the method name of the controller operationId: preview_post tagstype: array - ARES Kudo Optional parameters: - $ref: '#/parameters/fileId' items: - $ref: '#/parameters/optionalSessionId' responses: "200"type: object description: Success schemaproperties: type: object properties: "_id": status: type: string default: "ok" # responses may fall through to errors default: description: Error schema: $ref: "#/definitions/ErrorResponse" /files/{fileId}/infopreview: # binds a127 app logic to a route x-swagger-router-controller: files getpost: description: ReturnsOptionally file informationhandle receiving updates previews # used as the method name of the controller operationId: infopreview_getpost tags: - ARES Kudo RequiredOptional parameters: - $ref: '"#/parameters/fileId'" - $ref: '"#/parameters/optionalSessionId'" responses:- in: formData "200"name: file descriptionrequired: Successtrue schematype: file responses: required:"200": description: Success - status schema: type: object properties: status: type: string default: "ok" # responses may fall through to filename:errors default: type: string description: Error folderIdschema: $ref: "#/definitions/ErrorResponse" type: string/files/{fileId}/info: # binds a127 app logic to a route ownerx-swagger-router-controller: files get: description: Returns file information type: string # used as the method #name responsesof maythe fallcontroller through to errors operationId: info_get "401" tags: - ARES description:Kudo UserRequired is not autenticated parameters: schema: - $ref: "#/parameters/fileId" - $ref: "#/definitionsparameters/ErrorResponse"optionalSessionId" responses: "404200": description: File is notSuccess found schema: $refrequired: "#/definitions/ErrorResponse" /files/{fileId}/session: # binds a127 app logic to a- routestatus parameters: - $reftype: '#/parameters/fileId'object - $ref: '#/parameters/optionalSessionId' properties: x-swagger-router-controller: files get: descriptionstatus: get file sessions # used as the method name of the controllertype: string operationId: session_get tagsdefault: "ok" - File Sessions filename: responses: "200"type: string description folderId: Success schematype: string # aowner: pointer to a definition $reftype: "#/definitions/SessionsResponse"string # responses may fall through to errors default"401": description: ErrorUser is not autenticated schema: $ref: "#/definitions/ErrorResponse" post: description"404": Create file session. Sessions need to be either of type "view" or "edit" description: File is not found # used as the method name of the controllerschema: operationId: session_post tags$ref: "#/definitions/ErrorResponse" /files/{fileId}/session: - File Sessions # binds a127 app logic to a route parameters: - $ref: "#/parameters/fileId" - name: body - $ref: "#/parameters/sessionId" inx-swagger-router-controller: bodyfiles_sessions get: requireddescription: trueget file sessions # used schema:as the method name of the controller requiredoperationId: session_get tags: - mode - File Sessions propertiesresponses: "200": mode: description: Success typeschema: string # a pointer to a description:definition Type of session requested $ref: "#/definitions/SessionsResponse" # enum: [view, edit] responses may fall through to errors default: fileId: description: Error type: string schema: $ref: description: fileId for the file for which the session is being requested responses: "#/definitions/ErrorResponse" post: description: Create file session. Sessions need to be either of type "view" or "edit" "200":# used as the method name of the controller description: Success operationId: session_post schematags: - File Sessions required: parameters: - statusname: body in: body - "_id" required: true properties: schema: status: required: type: string - mode defaultproperties: "ok" "_id"mode: type: string # responses may fall through to errors description: Type of session requested default: description enum: Error[view, edit] schema: fileId: $ref: "#/definitions/ErrorResponse" deletetype: string description: delete file session #description: usedfileId asfor the methodfile namefor ofwhich the controller session is being requested operationIdresponses: session_delete tags"200": - File Sessionsdescription: Success parameters: schema: - $ref: '#/parameters/fileSessionId' responsesrequired: "200": - status description: Success schema:- "_id" requiredproperties: status: - status propertiestype: string status: default: "ok" type"_id": string defaulttype: "ok"string # responses may fall through to errors default: description: Error schema: $ref: "#/definitions/ErrorResponse" /auth delete: # binds a127 app logic to a route x-swagger-router-controller: auth get: description: validatedelete userfile session # used as the method name of the controller operationId: session_delete tags: - UserFile Sessions operationIdresponses: auth_get parameters"200": - $refdescription: '#/parameters/sessionId'Success responses: schema: # responses may fall through to errors # a pointer to a definition "200": description$ref: Success"#/definitions/SessionsResponse" # responses schema:may fall through to errors typedefault: object description: Error properties: schema: status: $ref: "#/definitions/ErrorResponse" /auth: type: string default: "ok" 401: description: Authorization information is missing or invalid. /users: # binds a127 app logic to a route x-swagger-router-controller: usersauth get: description: Returnsvalidate user objectsession # used as the method name of the controller operationIdtags: users_get tags: - User Sessions - User SessionsoperationId: auth_get parameters: - $ref: '"#/parameters/sessionId'optionalSessionId" responses: # responses may fall through to errors "200": description: Success schema: type: object properties: status: type: string default: "ok" 401: results: description: Authorization information is missing or invalid. /users: type: array# binds a127 app logic to a route x-swagger-router-controller: users items get: description: Get user data and preferences # used as type:the objectmethod name of the controller operationId: users_get tags: properties: - Users parameters: fname: - $ref: "#/parameters/sessionId" responses: 200: type: string description: Success schema: description: first name $ref: '#/definitions/GetUserResponse' 400: surnamedescription: Something went wrong while getting the userdata from json file. default: type: string description: Error schema: description: last name of user $ref: "#/definitions/ErrorResponse" put: description: Update user data and preferences "_id": # used as the method name of the controller operationId: users_put typetags: string - Users parameters: email: - $ref: "#/parameters/sessionId" - name: body typein: stringbody required: true licenseExpirationDateschema: $ref: '#/definitions/UserPreferencesObject' typeresponses: integer 200: preferencesdescription: Success schema: type: object properties: properties status: type: string preferences_display: default: "ok" 400: typedescription: objectSomething went wrong while saving the userdata into the json file. default: propertiesdescription: Error schema: $ref: "#/definitions/ErrorResponse" /v1/files/{fileId}/annotations: graphicswinmodelbackgrndcolor: # binds a127 app logic to a route x-swagger-router-controller: comments get: description: Returns annotations for a type:file string # used as the method name of the controller operationId: annotations_get tags: default: White - Commenting parameters: - $ref: "#/parameters/fileId" window: - $ref: "#/parameters/sessionId" - name: timestamp type: objectinteger in: query required: false properties: description: timestamp of last request to only send new items responses: edit:# responses may fall through to errors "200": description: Success type: object schema: type: object viewproperties: status: type: objectstring default: "ok" variables: results: type: object type: object properties: propertiestimestamp: type: integer dynasnap: description: time of response typecommmentThreads: string type: array default: "63" put: description: "" description: Returns user object # used as the method name of the controlleritems: operationId: users_put tags: type: -object User Sessions parameters: - $refmarkups: '#/parameters/sessionId' - name: body intype: bodyarray required: true schemadescription: "" properties: items: preferences: type: object description status: user preferences properties: type: string window: default: "ok" /v1/files/{fileId}/markups: # binds a127 app logic to a type:route object x-swagger-router-controller: comments get: description: Returns markups for properties:a file # used as the method name of the controller editoperationId: markups_get tags: - Commenting typeparameters: object - $ref: "#/parameters/fileId" - $ref: "#/parameters/sessionId" properties: - name: timestamp type: integer dockwidgets: in: query required: false description: timestamp type:of objectlast request to only send new items responses: # responses may fall through to errors properties: "200": description: Success layerwindowschema: type: object properties: type: object status: type: string properties: default: "ok" results: h: type: object properties: type: string timestamp: type: integer description: height o the layerwindow responsesdescription: time of response # responses may fall through to errors markups: "200": description: Success type: array schema:description: "" type: object items: propertiestype: object status: 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" timestampresults: type: integerobject descriptionproperties: time of response commentThreadstimestamp: type: arrayinteger description: "" time of response itemscommmentThreads: type: array object markups:description: "" typeitems: array description: "" type: object items: status: type: object type: string default: "ok" /v1/files/{fileId}/markupscommentThread: # binds a127 app logic to a route x-swagger-router-controller: comments getpost: description: Add a Returnsnew markupscommentThread for a file # used as the method name of the controller operationId: markupscommentThread_getpost tags: - Commenting parameters: - $ref: '"#/parameters/fileId'" - $ref: '"#/parameters/sessionId'" - name: timestampbody typein: integerbody inrequired: querytrue requiredschema: false descriptiontype: object timestamp of last request to only send new items properties: responses: # responsestitle: may fall through to errors "200": type: string description: Success text: schema: type: objectstring propertiesstate: statustype: string typeenum: string[ACTIVE, RESOLVED] ids: default: "ok" results: type: objectarray propertiesitems: timestamptype: string responses: # responses may fall type:through integerto errors "200": description: time ofSuccess response schema: markups: type: object typeproperties: array descriptionstatus: "" itemstype: string typedefault: object"ok" status: timestamp: type: stringinteger description: time of default: "ok"response /v1/files/{fileId}/commentThread/{threadId}: # binds a127 app logic to a route x-swagger-router-controller: comments postput: description: AddUpdate a new commentThread for a file # used as the method name of the controller operationId: commentThread_postput tags: - Commenting parameters: - $ref: '"#/parameters/fileId'" - $ref: '"#/parameters/sessionId'" - name$ref: body"#/parameters/threadId" - inname: body requiredin: truebody schemarequired: true typeschema: object propertiestype: object titleproperties: typetitle: string text: type: string statetext: type: string enum: [ACTIVE, RESOLVED] ids: type: array items: 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}/commentThread/{threadId}: # binds a127 app logic to a route x-swagger-router-controller: comments putget: description: Updateget a commentThread # used as the method name of the controller operationId: commentThread_putget tags: - Commenting parameters: - $ref: '"#/parameters/fileId'" - $ref: '"#/parameters/sessionId'" - $ref: '"#/parameters/threadId'" - nameresponses: body # responses may in:fall bodythrough to errors required"200": true schemadescription: Success typeschema: object propertiestype: object titleproperties: status: type: string type: text:string typedefault: string"ok" idstimestamp: type: arrayinteger itemsdescription: time of response delete: description: Delete a comment type:Thread string # responses:used as the method name of the controller # responses may fall through to errorsoperationId: commentThread_delete tags: "200": - Commenting description: Success parameters: schema: - $ref: "#/parameters/fileId" - type$ref: object"#/parameters/sessionId" - $ref: "#/parameters/threadId" properties: responses: # status:responses may fall through to errors "200": type: string description: Success defaultschema: "ok" type: object timestamp: properties: type: integer status: description: time of response gettype: string description: get a commentThread default: #"ok" used as the method name of the controller operationIdtimestamp: commentThread_get tags: -type: Commentinginteger parameters: - $refdescription: '#/parameters/fileId' time of response /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}: - $ref: '#/parameters/sessionId' # binds a127 app logic to a route - $ref: '#/parameters/threadId' x-swagger-router-controller: comments put: responsesdescription: Update a comment # responsesused mayas fallthe throughmethod toname errorsof the controller "200"operationId: comment_put tags: description: Success - Commenting schemaparameters: - $ref: "#/parameters/fileId" type: object - $ref: "#/parameters/sessionId" - properties:$ref: "#/parameters/threadId" - $ref: "#/parameters/commentId" status: - name: body typein: stringbody required: true default: "ok" schema: timestamp: type: object typeproperties: integer text: description: time of response /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}: # binds a127 app logic to a route x-swagger-router-controller: commentstype: string responses: put: # responses may fall description:through Updateto aerrors comment #"200": used as the method name of the controller description: Success operationId: comment_put tagsschema: - Commenting type: object parameters: - $refproperties: '#/parameters/fileId' - $ref: '#/parameters/sessionId' status: - $ref: '#/parameters/threadId' - $reftype: '#/parameters/commentId'string - name: body default: "ok" in: body timestamp: required: true schema: type: integer type: object description: time of response propertiesget: description: Retrieve a comment text: # used as the method name of the controller typeoperationId: stringcomment_get responsestags: - #Commenting responses may fall throughparameters: to errors - $ref: "200#/parameters/fileId": - description$ref: Success"#/parameters/sessionId" - schema:$ref: "#/parameters/threadId" - $ref: "#/parameters/commentId" type: object responses: properties:# responses may fall through to errors status"200": description: Success type: string schema: defaulttype: "ok"object timestampproperties: typestatus: integer type: string default: "ok" timestamp: type: integer description: time of response getdelete: description: RetrieveDelete a comment # used as the method name of the controller operationId: comment_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 x-swagger-router-controller: comments # post: description: Post a new comment # used as the method name of the controller operationId: comment_deletepost tags: - Commenting parameters: - $ref: '"#/parameters/fileId'" - $ref: '"#/parameters/sessionId'" - $ref: '"#/parameters/threadId'" - $refname: '#/parameters/commentId' body responsesin: body # responses may fallrequired: throughtrue to errors "200"schema: description: Success type: object schemaproperties: type: object text: propertiestype: string responses: # responses status:may fall through to errors "200": type: string description: Success defaultschema: "ok" type: object timestamp: properties: type: integer status: description: time of response /v1/ type: string default: "ok" timestamp: type: integer description: time of response /v1/files/{fileId}/commentThread/{threadId}/commentmarkup: # binds a127 app logic to a route x-swagger-router-controller: comments post: description: PostAdd a new markup for commenta file # used as the method name of the controller operationId: commentmarkup_post tags: - Commenting parameters: - $ref: '"#/parameters/fileId'" - $ref: '"#/parameters/sessionId' - $ref: '#/parameters/threadId'" - name: body in: body required: true schema: type: object properties: texttitle: type: string responses: text: # responses may fall through to errors "200"type: string description: Success state: schema: type: string type: object propertiesenum: [ACTIVE, RESOLVED] status ids: type: stringarray defaultitems: "ok" timestamp: type: string responses: type: integer # responses may fall through to errors description"200": time of response /v1/files/{fileId}/markup: #description: bindsSuccess a127 app logic to a route x-swagger-router-controllerschema: comments post: descriptiontype: Addobject a new markup for a file #properties: used as the method name of the controller operationIdstatus: markup_post tags: -type: Commentingstring parameters: - $refdefault: '#/parameters/fileId'"ok" - $ref: '#/parameters/sessionId' timestamp: - name: body intype: bodyinteger required: true description: time of response schema/v1/files/{fileId}/markup/{markupId}: # binds a127 app logic to a route typex-swagger-router-controller: objectcomments put: description: properties:Update a markup # used as the method name title:of the controller operationId: markup_put typetags: string - Commenting textparameters: - $ref: "#/parameters/fileId" type: string - $ref: "#/parameters/sessionId" - state$ref: "#/parameters/markupId" - name: body in: body required: true schema: type: object properties: title: type: string text: enum type: [ACTIVE, RESOLVED] string ids: type: array items: 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/{markupId}:get: # binds a127 app logic to a route x-swagger-router-controller: comments put: description: Updateget a markup # used as the method name of the controller operationId: markup_putget tags: - Commenting parameters: - $ref: '"#/parameters/fileId'" - $ref: '"#/parameters/sessionId'" - $ref: '"#/parameters/markupId'" responses: # responses -may name:fall bodythrough to errors in"200": body requireddescription: trueSuccess schema: type: object properties: titlestatus: type: string text default: "ok" timestamp: type: string idstype: integer type description: arraytime of response delete: description: delete a items:markup # used as the method name of the controller type: string operationId: markup_delete tags: - Commenting parameters: - $ref: "#/parameters/fileId" - $ref: "#/parameters/sessionId" - $ref: "#/parameters/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}/markup/{markupId}/comment/{commentId}: get: # binds a127 app description:logic getto a markuproute x-swagger-router-controller: comments put: description: Update a comment # used as the method name of the controller operationId: markupmarkupcomment_getput tags: - Commenting parameters: - $ref: '"#/parameters/fileId'" - $ref: '"#/parameters/sessionId'" - $ref: '"#/parameters/markupId'" - responses$ref: "#/parameters/commentId" # responses- mayname: fallbody through to errors "200":in: body 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 delete: properties: description: delete a markup # usedstatus: as the method name of the controller operationId: markup_delete type: string tags: - Commenting default: "ok" parameters: - $reftimestamp: '#/parameters/fileId' - $ref: '#/parameters/sessionId' type: integer - $ref: '#/parameters/markupId' responses: description: time of response # responses may fall throughget: to errors description: Retrieve a markup "200":comment # used as the description:method Successname of the controller schemaoperationId: markupcomment_get tags: type: object - Commenting propertiesparameters: - $ref: "#/parameters/fileId" status: - $ref: "#/parameters/sessionId" - type$ref: string"#/parameters/markupId" - $ref: "#/parameters/commentId" default responses: "ok" # responses may fall through to errors timestamp: "200": type description: integerSuccess schema: description: time of response /v1/files/{fileId}/markup/{markupId}/comment/{commentId}type: object # binds a127 app logic to a route properties: x-swagger-router-controller: comments put: status: description: Update a comment # used as the method nametype: ofstring the controller operationId: markupcomment_put tagsdefault: "ok" - Commenting timestamp: parameters: - $ref: '#/parameters/fileId' type: integer - $ref: '#/parameters/sessionId' - $ref: '#/parameters/markupId' - $ref: '#/parameters/commentId'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" - $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 /v1/files/{fileId}/markup/{markupId}/comment: # binds a127 app logic to a route x-swagger-router-controller: comments post: description: Post a new markup comment # used as the method name of the controller operationId: markupcomment_post tags: - Commenting parameters: - $ref: "#/parameters/fileId" - $ref: "#/parameters/sessionId" - $ref: "#/parameters/markupId" - name: body in: body required: true schema: type: object properties: text: 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}/attachment: x-swagger-router-controller: comments post: description: Create a markup attachment # used as the method name of the controller operationId: attachment_post tags: - Commenting consumes: - multipart/form-data parameters: - $ref: "#/parameters/fileId" - $ref: "#/parameters/sessionId" - in: formData name: attachment required: true type: file responses: "200": description: Success schema: required: - status - changeId properties: status: type: string default: "ok" changeId: type: string # responses may fall through to errors default: description: Error schema: $ref: "#/definitions/ErrorResponse" /v1/files/{fileId}/attachments: x-swagger-router-controller: comments get: description: Retrieve all attachments # used as the method name of the controller operationId: attachments_get tags: - Commenting parameters: - $ref: "#/parameters/fileId" - $ref: "#/parameters/sessionId" responses: # responses may fall through to errors "200": description: Success schema: type: object properties: status: - 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 type get: string responsesdescription: Retrieve attachment # responsesused mayas fallthe throughmethod toname errorsof the controller "200"operationId: attachment_get tags: description: Success - Commenting schemaparameters: - $ref: "#/parameters/fileId" type: object- $ref: "#/parameters/sessionId" - properties$ref: "#/parameters/attachmentId" responses: status: # responses may fall through to errors type"200": string description: Success default: "ok" schema: timestamp: type: object typeproperties: integer status: description: time of response get: descriptiontype: Retrievestring a markup comment # used as the method name of the controller default: "ok" operationId: markupcomment_get tagstimestamp: - Commenting parameterstype: integer - $ref: '#/parameters/fileId' description: time -of $ref: '#/parameters/sessionId'response /swagger: - $ref: '#/parameters/markupId' - $ref: '#/parameters/commentId' x-swagger-pipe: swagger_raw # complex objects have schema definitions definitions: 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: object type: string 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" preferences_display: type: 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: - $ref: '#/parameters/fileId'edit: - $ref: '#/parameters/sessionId' responsestype: object # 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: "200":false" description: Success schema: description: true/false if the layer panel is collapsed or not type: object properties: h: status: type: string default: "ok" description: height of the layerwindow timestamp: type: integer propertywindow: description: time of response /swagger: x-swagger-pipetype: swagger_rawobject # complex objects have schema definitions definitions: SessionsResponse: required: - status properties: - results properties: status: visible: type: string default: "ok" results: type: string array items: type: object default: "1" properties: mode: iscollapsed: type: string type: string enum: [view, edit] username: default: "false" type: string sessionId: description: true/false if the properties panel is collapsed or type:not string userId: h: type: string ErrorResponse: required: - message propertiestype: string message: type: string errrorId: description: height of type:property stringpanel |
Content Comparison
General
Content
Integrations