代码拉取完成,页面将自动刷新
{
"info": {
"_postman_id": "0914fa8f-7af0-4dd5-be92-bd8d89220f64",
"name": "Backend_django_api",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "User",
"item": [
{
"name": "add_user",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"user_name\": \"Coderlzz\",\r\n \"user_pwd\": \"1234567\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/add_user",
"host": [
"{{url}}"
],
"path": [
"user",
"add_user"
]
}
},
"response": []
},
{
"name": "del_user",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "{{url}}/user/del_user/3",
"host": [
"{{url}}"
],
"path": [
"user",
"del_user",
"3"
]
}
},
"response": []
},
{
"name": "update_user",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "PATCH",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"user_pwd\": \"123456\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/update_user/2",
"host": [
"{{url}}"
],
"path": [
"user",
"update_user",
"2"
]
}
},
"response": []
},
{
"name": "get_user_info",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/user/get_user_info/1",
"host": [
"{{url}}"
],
"path": [
"user",
"get_user_info",
"1"
]
}
},
"response": []
},
{
"name": "get_user_list",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{ \r\n \"offset\": 0,\r\n \"size\": 10,\r\n \"filter_field\": {\r\n \"enable\": 1,\r\n \"create_at\": [\"2023-10-25\", \"2023-10-27\"]\r\n }\r\n \r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/get_user_list",
"host": [
"{{url}}"
],
"path": [
"user",
"get_user_list"
]
}
},
"response": []
}
]
},
{
"name": "Role",
"item": [
{
"name": "add_role",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"id\": 4,\r\n \"name\": \"Role Super User\",\r\n \"intro\": \"Role Super User\",\r\n \"menu_list\": [1, 130, 131]\r\n}"
},
"url": {
"raw": "{{url}}/user/add_role",
"host": [
"{{url}}"
],
"path": [
"user",
"add_role"
]
}
},
"response": []
},
{
"name": "del_role",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "{{url}}/user/del_role/3",
"host": [
"{{url}}"
],
"path": [
"user",
"del_role",
"3"
]
}
},
"response": []
},
{
"name": "update_role",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "PATCH",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"menu_list\": [1, 110, 111, 112, 113, 120, 121, 122, 123, 124]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/update_role/2",
"host": [
"{{url}}"
],
"path": [
"user",
"update_role",
"2"
]
}
},
"response": []
},
{
"name": "get_role_list",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{ \r\n \"offset\": 0,\r\n \"size\": 10,\r\n \"filter_field\": {\r\n \"name\": \"a\",\r\n \"create_at\": [\"2023-10-25\", \"2023-10-27\"]\r\n }\r\n \r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/get_role_list",
"host": [
"{{url}}"
],
"path": [
"user",
"get_role_list"
]
}
},
"response": []
}
]
},
{
"name": "Menu",
"item": [
{
"name": "add_menu",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"id\": 142,\r\n \"name\": \"general User\",\r\n \"type\": 3,\r\n \"parent_id\": 140,\r\n \"permission\": \"system:record:general\",\r\n \"sort\": \"142\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/add_menu",
"host": [
"{{url}}"
],
"path": [
"user",
"add_menu"
]
}
},
"response": []
},
{
"name": "del_menu",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "{{url}}/user/del_menu/142",
"host": [
"{{url}}"
],
"path": [
"user",
"del_menu",
"142"
]
}
},
"response": []
},
{
"name": "update_menu",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "PATCH",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"General User\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/update_menu/142",
"host": [
"{{url}}"
],
"path": [
"user",
"update_menu",
"142"
]
}
},
"response": []
},
{
"name": "get_menu_list",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "{ \r\n \"offset\": 0,\r\n \"size\": 10,\r\n \"filter_field\": {\r\n \"enable\": 1,\r\n \"create_at\": [\"2023-10-25\", \"2023-10-27\"]\r\n }\r\n \r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/get_menu_list",
"host": [
"{{url}}"
],
"path": [
"user",
"get_menu_list"
]
}
},
"response": []
},
{
"name": "get_user_menu_by_role_id",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"role_id\": \"2\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/get_user_menu_by_role_id",
"host": [
"{{url}}"
],
"path": [
"user",
"get_user_menu_by_role_id"
]
}
},
"response": []
}
]
},
{
"name": "permission",
"item": [
{
"name": "get_permission",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"url": {
"raw": "{{url}}/user/get_permissions",
"host": [
"{{url}}"
],
"path": [
"user",
"get_permissions"
]
}
},
"response": []
},
{
"name": "add_permission",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"Role Super User\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/add_permission",
"host": [
"{{url}}"
],
"path": [
"user",
"add_permission"
]
}
},
"response": []
},
{
"name": "request_permission",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{ \"permission\": \r\n {\"id\": 1, \"name\": \"Role Super User\", \"create_at\": \"2023-10-31 10:00:23\", \"updated_at\": \"2023-10-31 10:00:23\", \"requested\": false}\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/request_permission",
"host": [
"{{url}}"
],
"path": [
"user",
"request_permission"
]
}
},
"response": []
},
{
"name": "get_requests",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"offset\":0,\r\n \"size\":10,\r\n \"filter_field\": {\r\n \"user_id\": \"1\"\r\n }\r\n \r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/get_requests",
"host": [
"{{url}}"
],
"path": [
"user",
"get_requests"
]
}
},
"response": []
},
{
"name": "approve_request",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"user_name\": \"Coderlz\",\r\n \"permission_name\": \"Role Super User\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/approve_request",
"host": [
"{{url}}"
],
"path": [
"user",
"approve_request"
]
}
},
"response": []
}
]
},
{
"name": "login",
"event": [
{
"listen": "test",
"script": {
"exec": [
"const res = pm.response.json()\r",
"pm.globals.set(\"token\", res.data.token)"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"user_name\": \"Coderlz\",\r\n \"user_pwd\": \"123456\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/login",
"host": [
"{{url}}"
],
"path": [
"user",
"login"
]
}
},
"response": []
},
{
"name": "get_record",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"offset\":0,\r\n \"size\":10,\r\n \"filter_field\": {\r\n \"user_id\": \"1\",\r\n \"request_type\": \"role\"\r\n }\r\n \r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/user/get_records",
"host": [
"{{url}}"
],
"path": [
"user",
"get_records"
]
}
},
"response": []
}
]
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。