# API Spec
## Authentication
All API must use this authentication
Request :
- Header :
- X-Api-Key : "your secret api key"
## Create Product
Request :
- Method : POST
- Endpoint : `/api/products`
- Header :
- Content-Type: application/json
- Accept: application/json
- Body :
```json
{
"id" : "string, unique",
"name" : "string",
"price" : "long",
"quantity" : "integer"
}
```
Response :
```json
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "string, unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
}
}
```
## Get Product
Request :
- Method : GET
- Endpoint : `/api/products/{id_product}`
- Header :
- Accept: application/json
Response :
```json
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "string, unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
}
}
```
## Update Product
Request :
- Method : PUT
- Endpoint : `/api/products/{id_product}`
- Header :
- Content-Type: application/json
- Accept: application/json
- Body :
```json
{
"name" : "string",
"price" : "long",
"quantity" : "integer"
}
```
Response :
```json
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "string, unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
}
}
```
## List Product
Request :
- Method : GET
- Endpoint : `/api/products`
- Header :
- Accept: application/json
- Query Param :
- size : number,
- page : number
Response :
```json
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "string, unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
},
{
"id" : "string, unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
}
]
}
```
## Delete Product
Request :
- Method : DELETE
- Endpoint : `/api/products/{id_product}`
- Header :
- Accept: application/json
Response :
```json
{
"code" : "number",
"status" : "string"
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
计算机技术是指评价计算机系统的各种知识和技能的总称。它涵盖了计算机硬件、软件、网络和信息安全等方面。计算机技术的发展使我们能够进行高效的数据处理、信息存储和传输。现代计算机技术包括操作系统、数据库管理、编程语言、算法设计等。同时,人工智能、云计算和大数据等新兴技术也在不断推动计算机技术的进步。计算机技术的应用广泛,涵盖了各个领域,如商业、医疗、教育和娱乐等。随着计算机技术的不断革新,我们可以更加高效地实现预期自动化、标准化
资源推荐
资源详情
资源评论







格式:pptx 资源大小:1.7MB 页数:34
















格式:zip 资源大小:1.7KB






收起资源包目录
































































共 34 条
- 1
资源评论


若明天不见
- 粉丝: 2w+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 微机原理与接口技术习题答案3.doc
- 楼宇自动化控制网络技术的新发展.doc
- 富士施乐刷卡软件方案.pptx
- 基于lms算法的自适应组合滤波器.doc
- 某酒店综合布线系统设计专业技术方案.doc
- 网络通信交换业务租用合约.docx
- 薄煤层自动化开采介绍(与“煤层”有关的文档共32张).pptx
- 中小企业市场营销和网络营销的策略研究-毕业论文.doc
- 数据库系统及应用上机实验报告.doc
- 信息化方案.doc.doc
- B2U5Understandingideas.pptx
- 基于java的在线考试系统(包含试题自动生成功能)
- 招标师考试《项目管理及招标采购》模拟试卷及参考完整答案.doc
- 2019年常州市网络推广调查报告.doc
- 2023年互联网项目合作协议书(5篇).docx
- 微机原理与接口技术实验定时计数器应用实验.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
