🔌后端接口定义
后端接口定义文档用于定义后端服务的接口,包括接口的URL、请求方法(如GET、POST等)、请求参数、返回数据格式。
1 概述
本文档是软件后端接口定义文档,遵循Swagger2.0协议,是对Swagger自动生成的API文档的详细标注。该文档主要起到如下作用:
对开发团队/第三方开发者
前端可以根据本文档进行后端接口调用
测试可以根据本文档进行接口测试
后端可以参考该文档进行迭代开发
对用户
用户可以了解后端系统的可用功能
本文档由 唐锦洲 负责编写。
2 用户模块
2.1 用户注册和登录
用户登录获取JWT
登录成功
认证失败
创建新用户
Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
^[\w.@+-]+$用户创建成功
请求无效
Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.
2.2 用户个人信息
获取所有用户的列表
A page number within the paginated result set.
获取成功
获取成功
获取指定用户的详细信息
A unique integer value identifying this user.
获取成功
用户未找到
更新指定用户的详细信息
A unique integer value identifying this user.
Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
^[\w.@+-]+$更新成功
请求无效
删除指定用户
A unique integer value identifying this user.
删除成功
用户未找到
部分更新指定用户的详细信息
A unique integer value identifying this user.
Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
^[\w.@+-]+$部分更新成功
请求无效
2.3 绑定电动车通行证
绑定用户车辆通行证信息
绑定成功
请求无效
解绑用户车辆通行证信息
解绑成功
通行证未找到
2.4 删除用户(需要管理员权限)
删除用户
用户删除成功
用户未找到
3 电动车信息模块
3.1 电动车基本信息
获取所有电动车的列表
brand
rating
release_date
min_price
max_price
Which field to use when ordering the results.
A page number within the paginated result set.
获取成功
No content
获取成功
No content
创建新的电动车
创建成功
请求无效
No content
获取所有电动车ID列表
A page number within the paginated result set.
获取成功
No content
获取失败
No content
获取指定电动车的详细信息
A unique integer value identifying this bike.
获取成功
No content
获取失败
No content
更新指定电动车的信息
A unique integer value identifying this bike.
更新成功
No content
请求无效
电动车未找到
No content
删除指定电动车
A unique integer value identifying this bike.
删除成功
电动车未找到
No content
部分更新指定电动车的信息
A unique integer value identifying this bike.
部分更新成功
No content
请求无效
电动车未找到
No content
3.2 电动车图片
创建电动车图片
创建成功
请求无效
No content
删除电动车图片
A unique integer value identifying this bike image.
删除成功
图片未找到
No content
3.3 电动车商家渠道
获取所有渠道的列表
A page number within the paginated result set.
获取成功
No content
获取成功
No content
创建新的渠道
创建成功
请求无效
No content
获取所有渠道ID列表
A page number within the paginated result set.
获取成功
No content
获取成功
No content
获取指定渠道的详细信息
A unique integer value identifying this channel.
获取成功
No content
渠道未找到
No content
更新指定渠道的信息
A unique integer value identifying this channel.
更新成功
No content
请求无效
渠道未找到
No content
删除指定渠道
A unique integer value identifying this channel.
删除成功
渠道未找到
No content
部分更新指定渠道的信息
A unique integer value identifying this channel.
部分更新成功
No content
请求无效
渠道未找到
No content
4 社交模块
4.1 车小圈帖子
获取所有车小圈帖子
A page number within the paginated result set.
获取成功
No content
请求无效
No content
创建车小圈帖子
00帖子创建成功
请求无效
No content
获取用户发布过的帖子
A page number within the paginated result set.
获取成功
No content
请求无效
No content
获取指定的车小圈帖子
A UUID string identifying this post.
获取成功
No content
帖子未找到
No content
更新指定的车小圈帖子
A UUID string identifying this post.
00更新成功
No content
请求无效
帖子未找到
No content
删除指定的车小圈帖子
A UUID string identifying this post.
删除成功
帖子未找到
No content
部分更新指定的车小圈帖子
A UUID string identifying this post.
00部分更新成功
No content
请求无效
帖子未找到
No content
4.2 车小圈帖子评论
获取所有评论
A page number within the paginated result set.
获取成功
No content
请求无效
No content
为帖子创建新评论
0评论创建成功
请求无效
No content
获取指定的车小圈帖子评论
A unique integer value identifying this comment.
获取成功
No content
评论未找到
No content
更新指定的车小圈帖子评论
A unique integer value identifying this comment.
0更新成功
No content
请求无效
评论未找到
No content
删除指定的车小圈帖子评论
A unique integer value identifying this comment.
删除成功
评论未找到
No content
部分更新指定的车小圈帖子评论
A unique integer value identifying this comment.
0部分更新成功
No content
请求无效
评论未找到
No content
4.3 车小圈用户互动
获取当前用户的所有点赞过的帖子
A page number within the paginated result set.
获取成功
No content
请求无效
No content
获取当前用户的所有收藏过的帖子
A page number within the paginated result set.
获取成功
No content
请求无效
No content
修改当前用户对特定帖子点赞/收藏状态
操作成功
操作取消
请求无效
No content
获取特定帖子的点赞/收藏数量
获取成功
No content
请求无效
No content
修改当前用户对另一用户的关注状态
操作成功
No content
请求无效
No content
4.4 车小圈首页
获取首页的车小圈帖子,支持指定页码
A page number within the paginated result set.
Number of results to return per page.
获取成功
No content
请求无效
No content
5 二手交易模块
发布新的商品
发布成功
请求无效
服务器内部错误
No content
获取当前用户发布的所有商品
获取成功
No content
获取成功
No content
获取指定商品的详细信息
A unique value identifying this goods.
获取成功
No content
请求无效
商品未找到
No content
A unique value identifying this goods.
A unique value identifying this goods.
No content
A unique value identifying this goods.
6 维修模块
6.1 维修预约
获取用户的所有预约
A page number within the paginated result set.
获取成功
No content
请求无效
No content
创建新的预约
pendingPossible values: 创建成功
请求无效
No content
获取指定的预约详情
A unique integer value identifying this appointment.
获取成功
No content
预约未找到
No content
更新指定的预约信息
A unique integer value identifying this appointment.
pendingPossible values: 更新成功
No content
请求无效
预约未找到
No content
删除指定的预约
A unique integer value identifying this appointment.
删除成功
预约未找到
No content
部分更新指定的预约信息
A unique integer value identifying this appointment.
pendingPossible values: 部分更新成功
No content
请求无效
预约未找到
No content
6.2 维修商家
获取所有服务商家
A page number within the paginated result set.
获取成功
No content
请求无效
No content
创建新的服务商家
创建成功
请求无效
No content
获取指定的服务商家详情
A unique integer value identifying this service shop.
获取成功
No content
商家未找到
No content
更新指定的服务商家信息
A unique integer value identifying this service shop.
更新成功
No content
请求无效
商家未找到
No content
删除指定的服务商家
A unique integer value identifying this service shop.
删除成功
商家未找到
No content
部分更新指定的服务商家信息
A unique integer value identifying this service shop.
部分更新成功
No content
请求无效
商家未找到
No content
6.3 维修贴士
获取所有服务提示
A page number within the paginated result set.
获取成功
No content
请求无效
No content
创建新的服务提示
创建成功
请求无效
No content
获取指定的服务提示详情
A unique integer value identifying this service tip.
获取成功
No content
提示未找到
No content
更新指定的服务提示信息
A unique integer value identifying this service tip.
更新成功
No content
请求无效
提示未找到
No content
删除指定的服务提示
A unique integer value identifying this service tip.
删除成功
提示未找到
No content
部分更新指定的服务提示信息
A unique integer value identifying this service tip.
部分更新成功
No content
请求无效
提示未找到
No content
7 安全和举报模块
获取所有举报报告
A page number within the paginated result set.
获取成功
No content
请求无效
No content
创建或更新举报报告
pendingPossible values: 报告更新成功
No content
报告创建成功
请求无效
No content
获取指定举报报告的详细信息
A UUID string identifying this 举报.
获取成功
No content
报告未找到
No content
更新指定举报报告的信息
A UUID string identifying this 举报.
pendingPossible values: 更新成功
No content
请求无效
报告未找到
No content
部分更新指定举报报告的信息
A UUID string identifying this 举报.
pendingPossible values: 部分更新成功
No content
请求无效
报告未找到
No content
Last updated