Introduction

The Publisher Tasks API is used to query the execution status of publishing tasks. Each task created through the Publish API can be tracked for its progress, publishing results, and published URLs via the Tasks API.

Basic Usage

Query a Single Task

curl -X POST 'https://api.acedata.cloud/publisher/tasks' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "action": "retrieve",
    "id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890"
  }'

Response Example

{
  "id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
  "request": {
    "title": "Introduction to AI APIs",
    "content": "# Introduction...",
    "channel": "zhihu"
  },
  "response": {
    "success": true,
    "task_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
    "channel": "zhihu",
    "state": "completed",
    "url": "https://zhuanlan.zhihu.com/p/123456789"
  },
  "created_at": 1705312200.0,
  "started_at": 1705312205.0,
  "finished_at": 1705312260.0
}

Batch Query Tasks

curl -X POST 'https://api.acedata.cloud/publisher/tasks' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "action": "retrieve_batch",
    "ids": [
      "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
      "a9b8c7d6-e5f4-3210-abcd-ef1234567890"
    ]
  }'

Task Status Description

Status Description
pending Task created, waiting for execution
running Task is currently executing
completed Task completed, URL available
failed Task execution failed, error information available

Notes

  • Task queries are free operations and do not consume points.
  • Task results will be retained for 30 days.
  • It is recommended to periodically poll the task status after submitting a publishing task.