| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070 |
- basePath: /api
- definitions:
- api.AddressBookForm:
- properties:
- data:
- example: '{"tags":["tag1","tag2","tag3"],"peers":[{"id":"abc","username":"abv-l","hostname":"","platform":"Windows","alias":"","tags":["tag1","tag2"],"hash":"hash"}],"tag_colors":"{\"tag1\":4288585374,\"tag2\":4278238420,\"tag3\":4291681337}"}'
- type: string
- type: object
- api.AuditConnForm:
- properties:
- action:
- type: string
- conn_id:
- type: integer
- id:
- type: string
- ip:
- type: string
- peer:
- items:
- type: string
- type: array
- session_id:
- type: number
- type:
- type: integer
- uuid:
- type: string
- type: object
- api.AuditFileForm:
- properties:
- id:
- type: string
- info:
- type: string
- is_file:
- type: boolean
- path:
- type: string
- peer_id:
- type: string
- type:
- type: integer
- uuid:
- type: string
- type: object
- api.DeviceInfoInLogin:
- properties:
- name:
- type: string
- os:
- type: string
- type:
- type: string
- type: object
- api.LoginForm:
- properties:
- autoLogin:
- type: boolean
- deviceInfo:
- $ref: '#/definitions/api.DeviceInfoInLogin'
- id:
- type: string
- password:
- maxLength: 32
- minLength: 4
- type: string
- type:
- type: string
- username:
- maxLength: 32
- minLength: 2
- type: string
- uuid:
- type: string
- required:
- - username
- type: object
- api.LoginRes:
- properties:
- access_token:
- type: string
- secret:
- type: string
- tfa_type:
- type: string
- type:
- type: string
- user:
- $ref: '#/definitions/api.UserPayload'
- type: object
- api.PeerForm:
- properties:
- cpu:
- type: string
- hostname:
- type: string
- id:
- type: string
- memory:
- type: string
- os:
- type: string
- username:
- type: string
- uuid:
- type: string
- version:
- type: string
- type: object
- api.UserPayload:
- properties:
- email:
- type: string
- info:
- additionalProperties: true
- type: object
- is_admin:
- type: boolean
- name:
- type: string
- note:
- type: string
- status:
- type: integer
- type: object
- model.AddressBookCollection:
- properties:
- created_at:
- type: string
- id:
- type: integer
- name:
- type: string
- updated_at:
- type: string
- user_id:
- type: integer
- required:
- - name
- type: object
- model.Tag:
- properties:
- collection:
- $ref: '#/definitions/model.AddressBookCollection'
- collection_id:
- type: integer
- color:
- description: color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色,
- 可以转成rgba
- type: integer
- created_at:
- type: string
- id:
- type: integer
- name:
- type: string
- updated_at:
- type: string
- user_id:
- type: integer
- type: object
- model.TagList:
- properties:
- list:
- items:
- $ref: '#/definitions/model.Tag'
- type: array
- page:
- type: integer
- page_size:
- type: integer
- total:
- type: integer
- type: object
- response.DataResponse:
- properties:
- data: {}
- total:
- type: integer
- type: object
- response.ErrorResponse:
- properties:
- error:
- type: string
- type: object
- response.Response:
- properties:
- code:
- type: integer
- data: {}
- message:
- type: string
- type: object
- info:
- contact: {}
- description: 接口
- title: 管理系统API
- version: "1.0"
- paths:
- /:
- get:
- consumes:
- - application/json
- description: 首页
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 首页
- tags:
- - 首页
- /ab:
- get:
- consumes:
- - application/json
- description: 地址列表
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 地址列表
- tags:
- - 地址
- post:
- consumes:
- - application/json
- description: 地址更新
- parameters:
- - description: 地址表单
- in: body
- name: body
- required: true
- schema:
- $ref: '#/definitions/api.AddressBookForm'
- produces:
- - application/json
- responses:
- "200":
- description: "null"
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 地址更新
- tags:
- - 地址
- /ab/peer/add/{guid}:
- delete:
- consumes:
- - application/json
- description: 删除地址
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 删除地址
- tags:
- - 地址[Personal]
- post:
- consumes:
- - application/json
- description: 添加地址
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 添加地址
- tags:
- - 地址[Personal]
- /ab/peer/update/{guid}:
- put:
- consumes:
- - application/json
- description: 更新地址
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 更新地址
- tags:
- - 地址[Personal]
- /ab/peers:
- post:
- consumes:
- - application/json
- description: 地址
- parameters:
- - description: 页码
- in: query
- name: current
- type: integer
- - description: 每页数量
- in: query
- name: pageSize
- type: integer
- - description: guid
- in: query
- name: ab
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 地址列表
- tags:
- - 地址[Personal]
- /ab/personal:
- post:
- consumes:
- - application/json
- description: 个人地址
- parameters:
- - description: string valid
- in: body
- name: string
- schema:
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 个人地址
- tags:
- - 地址[Personal]
- /ab/settings:
- post:
- consumes:
- - application/json
- description: 设置
- parameters:
- - description: string valid
- in: body
- name: string
- schema:
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 设置
- tags:
- - 地址[Personal]
- /ab/shared/profiles:
- post:
- consumes:
- - application/json
- description: 共享
- parameters:
- - description: 页码
- in: query
- name: current
- type: integer
- - description: 每页数量
- in: query
- name: pageSize
- type: integer
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 共享地址簿
- tags:
- - 地址[Personal]
- /ab/tag/{guid}:
- delete:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签删除
- tags:
- - 地址[Personal]
- /ab/tag/add/{guid}:
- post:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签添加
- tags:
- - 地址[Personal]
- /ab/tag/rename/{guid}:
- put:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签重命名
- tags:
- - 地址[Personal]
- /ab/tag/update/{guid}:
- put:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签修改颜色
- tags:
- - 地址[Personal]
- /ab/tags/{guid}:
- post:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/model.TagList'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签
- tags:
- - 地址[Personal]
- /audit/conn:
- post:
- consumes:
- - application/json
- description: 审计连接
- parameters:
- - description: 审计连接
- in: body
- name: body
- required: true
- schema:
- $ref: '#/definitions/api.AuditConnForm'
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 审计连接
- tags:
- - 审计
- /audit/file:
- post:
- consumes:
- - application/json
- description: 审计文件
- parameters:
- - description: 审计文件
- in: body
- name: body
- required: true
- schema:
- $ref: '#/definitions/api.AuditFileForm'
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 审计文件
- tags:
- - 审计
- /currentUser:
- get:
- consumes:
- - application/json
- description: 用户信息
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.UserPayload'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - token: []
- summary: 用户信息
- tags:
- - 用户
- /device-group/accessible:
- get:
- consumes:
- - application/json
- description: 机器
- parameters:
- - description: 页码
- in: query
- name: page
- type: integer
- - description: 每页数量
- in: query
- name: pageSize
- type: integer
- - description: 状态
- in: query
- name: status
- type: integer
- - description: accessible
- in: query
- name: accessible
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.DataResponse'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 设备
- tags:
- - 群组
- /heartbeat:
- post:
- consumes:
- - application/json
- description: 心跳
- produces:
- - application/json
- responses:
- "200":
- description: OK
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 心跳
- tags:
- - 首页
- /login:
- post:
- consumes:
- - application/json
- description: 登录
- parameters:
- - description: 登录表单
- in: body
- name: body
- required: true
- schema:
- $ref: '#/definitions/api.LoginForm'
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.LoginRes'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: 登录
- tags:
- - 登录
- /login-options:
- get:
- consumes:
- - application/json
- description: 登录选项
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- items:
- type: string
- type: array
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: 登录选项
- tags:
- - 登录
- /logout:
- post:
- consumes:
- - application/json
- description: 登出
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: 登出
- tags:
- - 登录
- /oidc/auth:
- post:
- consumes:
- - application/json
- description: OidcAuth
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.LoginRes'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: OidcAuth
- tags:
- - Oauth
- /oidc/auth-query:
- get:
- consumes:
- - application/json
- description: OidcAuthQuery
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.LoginRes'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: OidcAuthQuery
- tags:
- - Oauth
- /oidc/callback:
- get:
- consumes:
- - application/json
- description: OauthCallback
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.LoginRes'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: OauthCallback
- tags:
- - Oauth
- /peers:
- get:
- consumes:
- - application/json
- description: 机器
- parameters:
- - description: 页码
- in: query
- name: page
- type: integer
- - description: 每页数量
- in: query
- name: pageSize
- type: integer
- - description: 状态
- in: query
- name: status
- type: integer
- - description: accessible
- in: query
- name: accessible
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.DataResponse'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 机器
- tags:
- - 群组
- /server-config:
- get:
- consumes:
- - application/json
- description: 服务配置,给webclient提供api-server
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - token: []
- summary: 服务配置
- tags:
- - WEBCLIENT
- /server-config-v2:
- get:
- consumes:
- - application/json
- description: 服务配置,给webclient提供api-server
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - token: []
- summary: 服务配置
- tags:
- - WEBCLIENT_V2
- /shared-peer:
- post:
- consumes:
- - application/json
- description: 分享的peer
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 分享的peer
- tags:
- - WEBCLIENT
- /sysinfo:
- post:
- consumes:
- - application/json
- description: 提交系统信息
- parameters:
- - description: 系统信息表单
- in: body
- name: body
- required: true
- schema:
- $ref: '#/definitions/api.PeerForm'
- produces:
- - application/json
- responses:
- "200":
- description: SYSINFO_UPDATED,ID_NOT_FOUND
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: 提交系统信息
- tags:
- - System
- /sysinfo_ver:
- post:
- consumes:
- - application/json
- description: 获取系统版本信息
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: 获取系统版本信息
- tags:
- - System
- /users:
- get:
- consumes:
- - application/json
- description: 用户列表
- parameters:
- - description: 页码
- in: query
- name: page
- type: integer
- - description: 每页数量
- in: query
- name: pageSize
- type: integer
- - description: 状态
- in: query
- name: status
- type: integer
- - description: accessible
- in: query
- name: accessible
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- allOf:
- - $ref: '#/definitions/response.DataResponse'
- - properties:
- data:
- items:
- $ref: '#/definitions/api.UserPayload'
- type: array
- type: object
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 用户列表
- tags:
- - 群组
- /version:
- get:
- consumes:
- - application/json
- description: 版本
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 版本
- tags:
- - 首页
- securityDefinitions:
- BearerAuth:
- in: header
- name: Authorization
- type: apiKey
- token:
- in: header
- name: api-token
- type: apiKey
- swagger: "2.0"
|