返回首页

API 文档

v1.0

NvwaX RESTful API 完整参考文档,包含所有端点、参数和使用示例

基础 URL

http://localhost:3001/api

💡 提示:所有 API 请求都需要添加此前缀

搜索 API

GET/api/search/agents

搜索 Agent

查询参数

qstring必填搜索关键词
pagenumber页码,默认 1
limitnumber每页数量,默认 20
GET /api/search/agents?q=ai+agent&page=1&limit=20
GET/api/search/skills

搜索 Skills

查询参数

qstring必填搜索关键词
pagenumber页码,默认 1
limitnumber每页数量,默认 20
GET /api/search/skills?q=python&page=1&limit=20
POST/api/search/unified

统一搜索(Agents + Skills)

请求体

qstring必填搜索关键词
pagenumber页码,默认 1
limitnumber每页数量,默认 20
POST /api/search/unified
{
  "q": "ai agent",
  "page": 1,
  "limit": 20
}
GET/api/search/recommend-skills

推荐相关 Skills

查询参数

qstring必填搜索关键词
limitnumber推荐数量,默认 5
GET /api/search/recommend-skills?q=chatbot&limit=5

爬虫管理

POST/api/search/crawl需要认证

手动触发爬虫任务

POST /api/search/crawl
Headers: {
  "Authorization": "Bearer <token>"
}
GET/api/search/crawler-status

获取爬虫状态

GET /api/search/crawler-status

用户认证

POST/api/auth/register

用户注册

请求体

emailstring必填邮箱地址
passwordstring必填密码
namestring用户名
POST /api/auth/register
{
  "email": "user@example.com",
  "password": "password123",
  "name": "John Doe"
}
POST/api/auth/login

用户登录

请求体

emailstring必填邮箱地址
passwordstring必填密码
POST /api/auth/login
{
  "email": "user@example.com",
  "password": "password123"
}
GET/api/auth/me需要认证

获取当前用户信息

GET /api/auth/me
Headers: {
  "Authorization": "Bearer <token>"
}

项目管理

GET/api/projects需要认证

获取用户项目列表

GET /api/projects
Headers: {
  "Authorization": "Bearer <token>"
}
POST/api/projects需要认证

创建新项目

请求体

namestring必填项目名称
descriptionstring项目描述
POST /api/projects
Headers: {
  "Authorization": "Bearer <token>"
}
{
  "name": "My AI Project",
  "description": "Building an AI agent"
}

需要更多帮助?

查看完整的项目文档或在 GitHub 上参与讨论