1.5 KiB
1.5 KiB
| title |
|---|
| 在线演示 | 免费体验MengStack接口服务 - MengStack官方 |
在线演示
演示地址
| 服务 | 地址 |
|---|---|
| API 服务 | https://mengstackdemo.softunis.com |
| Swagger UI | https://mengstackdemo.softunis.com/swagger/index.html |
| 健康检查 | https://mengstackdemo.softunis.com/health |
::: warning 注意 演示数据会定期重置,请勿存储重要数据。 :::
快速体验
1. 注册账号
curl -X POST https://mengstackdemo.softunis.com/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "demo@example.com",
"username": "demo_user",
"nickname": "Demo User",
"password": "demo12345"
}'
2. 登录获取 Token
curl -X POST https://mengstackdemo.softunis.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "demo@example.com",
"password": "demo12345"
}'
3. 访问受保护接口
curl https://mengstackdemo.softunis.com/api/v1/profile \
-H "Authorization: Bearer <your_access_token>" \
-H "X-Tenant-ID: demo-tenant"
Swagger UI 交互
打开 Swagger UI,可以:
- 浏览所有 API 端点
- 在线发送请求测试
- 查看请求/响应模型
- 下载 OpenAPI 规范文件
使用步骤
- 打开 Swagger UI
- 点击
/auth/register端点 - 点击 "Try it out"
- 填写请求参数
- 点击 "Execute"
- 查看响应结果