{ "info": { "_postman_id": "material-texture-api", "name": "材质管理系统 API", "description": "材质管理后端服务API集合", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "auth": { "type": "apikey", "apikey": [ { "key": "key", "value": "X-API-Token", "type": "string" }, { "key": "value", "value": "{{api_token}}", "type": "string" }, { "key": "in", "value": "header", "type": "string" } ] }, "variable": [ { "key": "base_url", "value": "http://localhost:8081", "type": "string" }, { "key": "api_token", "value": "seatons3d", "type": "string" } ], "item": [ { "name": "健康检查", "item": [ { "name": "Health Check", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [], "url": { "raw": "{{base_url}}/health", "host": ["{{base_url}}"], "path": ["health"] } } } ] }, { "name": "材质管理", "item": [ { "name": "1. 获取材质列表", "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/api/v1/materials?page=1&page_size=20&name=", "host": ["{{base_url}}"], "path": ["api", "v1", "materials"], "query": [ { "key": "page", "value": "1", "description": "页码" }, { "key": "page_size", "value": "20", "description": "每页数量" }, { "key": "name", "value": "", "description": "按名称搜索" } ] } } }, { "name": "2. 添加材质", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"新材质\",\n \"diffuse_r\": 255,\n \"diffuse_g\": 128,\n \"diffuse_b\": 64,\n \"alpha\": 255,\n \"shininess\": 20,\n \"specular_r\": 230,\n \"specular_g\": 230,\n \"specular_b\": 230,\n \"ambient_r\": 50,\n \"ambient_g\": 50,\n \"ambient_b\": 50,\n \"metallic\": 0.5,\n \"roughness\": 0.3,\n \"reflectance\": 0.5\n}" }, "url": { "raw": "{{base_url}}/api/v1/materials", "host": ["{{base_url}}"], "path": ["api", "v1", "materials"] } } }, { "name": "3. 获取材质详情", "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/api/v1/materials/4", "host": ["{{base_url}}"], "path": ["api", "v1", "materials", "4"] } } }, { "name": "4. 编辑材质", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"更新后的材质\",\n \"diffuse_r\": 200,\n \"diffuse_g\": 100,\n \"diffuse_b\": 50,\n \"alpha\": 255,\n \"shininess\": 30,\n \"specular_r\": 200,\n \"specular_g\": 200,\n \"specular_b\": 200,\n \"ambient_r\": 60,\n \"ambient_g\": 60,\n \"ambient_b\": 60,\n \"metallic\": 0.8,\n \"roughness\": 0.2,\n \"reflectance\": 0.6\n}" }, "url": { "raw": "{{base_url}}/api/v1/materials/4", "host": ["{{base_url}}"], "path": ["api", "v1", "materials", "4"] } } }, { "name": "5. 删除材质", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{base_url}}/api/v1/materials/999", "host": ["{{base_url}}"], "path": ["api", "v1", "materials", "999"] } } } ] }, { "name": "绑定管理", "item": [ { "name": "6. 绑定材质到Groups", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"group_ids\": [\"node_001\", \"node_002\", \"node_003\"]\n}" }, "url": { "raw": "{{base_url}}/api/v1/materials/4/bindings", "host": ["{{base_url}}"], "path": ["api", "v1", "materials", "4", "bindings"] } } }, { "name": "7. 解绑材质与Groups", "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"group_ids\": [\"node_001\", \"node_002\"]\n}" }, "url": { "raw": "{{base_url}}/api/v1/materials/4/bindings", "host": ["{{base_url}}"], "path": ["api", "v1", "materials", "4", "bindings"] } } }, { "name": "8. 获取材质关联的Groups", "request": { "method": "GET", "header": [], "url": { "raw": "{{base_url}}/api/v1/materials/4/groups", "host": ["{{base_url}}"], "path": ["api", "v1", "materials", "4", "groups"] } } }, { "name": "9. 根据Groups批量查询材质", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"group_ids\": [\"202510211057245681447\", \"aDsIXMkjxdm2CDUj9gTvf\"]\n}" }, "url": { "raw": "{{base_url}}/api/v1/groups/materials", "host": ["{{base_url}}"], "path": ["api", "v1", "groups", "materials"] } } } ] } ] }