Mangogo 营业厅Mangogo 营业厅
首页API 参考Skills插件

11.2 APPS他人作品列表

POST/api/apps/other-works

11.2 APPS他人作品列表

APPS他人作品列表

接口地址: POST /api/apps/other-works

权限要求: 🔒 需要登录验证

请求头:

token: {token}

描述: 查询指定APP的他人作品列表,支持分页查询,按创建时间降序排列

请求参数:

{  "source_app_id": 1,  "page": 1,  "page_size": 20}
参数名类型必填说明
source_app_idint是APP ID
pageint否页码,从1开始,默认为1
page_sizeint否每页条数,默认为20,最大为100

请求示例:

curl -X POST "https://your-domain.com/api/apps/other-works" \  -H "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \  -H "Content-Type: application/json" \  -d '{    "source_app_id": 1,    "page": 1,    "page_size": 20  }'

返回数据:

{  "code": 0,  "success": true,  "message": "success",  "data": {    "total": 100,    "page": 1,    "page_size": 20,    "items": [      {        "id": 1,        "task_id": "task_123",        "user_id": 123,        "work_type": 2,        "save_method": 1,        "cover_url": "https://example.com/cover.jpg",        "resource_url": "https://example.com/resource.jpg",        "work_at": 1234567890,        "name": "作品名称",        "text": "",        "creation_prompt": "",        "classtag": "标签1,标签2",        "consume_quota": 50000,        "category_id": 0,        "source_type": 2,        "source_app_id": 1,        "source_id": 100,        "publish_status": 1,        "published_at": 1234567890,        "is_public": 1,        "fee_type": 1,        "fee": 0,        "view_count": 10,        "like_count": 5,        "collect_count": 2,        "use_count": 3,        "heat_value": 20,        "recommended_value": 10,        "total_earnings": 0,        "deleted": 0,        "created_at": 1234567890,        "updated_at": 1234567890      }    ]  }}

错误返回:

{  "code": 400,  "success": false,  "message": "参数错误: Key: 'ListAppsOtherWorksRequest.SourceAppId' Error:Field validation for 'SourceAppId' failed on the 'required' tag",  "data": null}
{  "code": -1,  "success": false,  "message": "数据库错误",  "data": null}

字段说明:

字段名类型说明
codeint状态码(0=成功,400=参数错误,-1=系统错误)
successbool是否成功
messagestring消息
data.totalint64总记录数
data.pageint当前页码
data.page_sizeint每页条数
data.itemsarray作品列表
items[].idint作品ID
items[].task_idstring任务ID
items[].user_idint用户ID
items[].work_typeint作品类型(1=文本,2=图片,3=视频,4=音频)
items[].save_methodint保存方式(1=AI创作,2=手动上传)
items[].cover_urlstring封面URL
items[].resource_urlstring资源URL
items[].work_atint64作品时间戳
items[].namestring作品名称
items[].textstring文本内容
items[].creation_promptstring创作提示词
items[].classtagstring分类标签
items[].consume_quotaint消耗配额
items[].category_idint分类ID
items[].source_typeint来源类型(0=无,1=常规,2=应用)
items[].source_app_idint来源APP ID
items[].source_idint来源ID
items[].publish_statusint发布状态(0=未发布,1=已发布)
items[].published_atint64发布时间戳
items[].is_publicint是否公开(0=不公开,1=公开)
items[].fee_typeint费用类型(1=免费,2=付费)
items[].feeint费用
items[].view_countint浏览次数
items[].like_countint点赞次数
items[].collect_countint收藏次数
items[].use_countint使用次数
items[].heat_valueint热度值
items[].recommended_valueint推荐值
items[].total_earningsint总收益
items[].deletedint删除状态(0=正常,1=已删除)
items[].created_atint64创建时间戳
items[].updated_atint64更新时间戳

注意事项:

  • 需要登录验证,token通过请求头传递
  • 查询条件:deleted = 0、is_public = 1、publish_status = 1、source_type = 2、source_app_id = 请求参数
  • 按创建时间降序排列
  • 支持分页查询,默认每页20条,最大100条
  • 查询已优化,使用索引确保查询效率