Push Plan Management API
Last updated:2025-04-10
Expand all
Push Plan Management API
Overview
The API supports scheduled push at the API layer. For push methods, see Push plan usage guide;
This module API covers create, update, query, and delete operations for push plans themselves.
API host
Authentication
- See Authentication in the REST API overview.
Create push plan
Path: /v3/push_plan/create
Method: POST
Request body:
{
"name":string,
"description":string
}
{
"name":string,
"description":string
}
This code block is shown in the floating window
- Response
{
"code":int,
"message":string
}
成功返回0,success,失败返回对应错误码和描述
{
"code":int,
"message":string
}
成功返回0,success,失败返回对应错误码和描述
This code block is shown in the floating window
List push plans
Path: /v3/push_plan/list?page=1&page_size=10&info=xxx&send_source=1
Method: GET
Request parameters:
url查询参数格式
info: string 可选参数,模糊查询,表示推送计划或者推送标识,只要其中之一匹配到即可
page: int 可选参数,查询页数
page_size:int 可选参数,每页个数
send_source:int 可选参数,创建来源,0表示api,1表示web(控制台创建),不传或者非0和1值表示不区分
page和page_size不传取默认值(默认为1和50)
url查询参数格式
info: string 可选参数,模糊查询,表示推送计划或者推送标识,只要其中之一匹配到即可
page: int 可选参数,查询页数
page_size:int 可选参数,每页个数
send_source:int 可选参数,创建来源,0表示api,1表示web(控制台创建),不传或者非0和1值表示不区分
page和page_size不传取默认值(默认为1和50)
This code block is shown in the floating window
- Response
返回
{
"code":int,
"message":string
"data":{
"total":int,
"page":int,
"page_size":int,
"detail":[{
"name":string,
"description":string,
"push_count":int,
"create_time":string,
"last_used_time":string,
"send_source":int
}]
}
}
send_source: 1表示web,0表示api
push_count: 推送次数
name: 计划标识
description: 计划描述
create_time,last_used_time 格式"2025-01-01 00:00:00",分别表示计划创建时间和最后使用时间
返回
{
"code":int,
"message":string
"data":{
"total":int,
"page":int,
"page_size":int,
"detail":[{
"name":string,
"description":string,
"push_count":int,
"create_time":string,
"last_used_time":string,
"send_source":int
}]
}
}
send_source: 1表示web,0表示api
push_count: 推送次数
name: 计划标识
description: 计划描述
create_time,last_used_time 格式"2025-01-01 00:00:00",分别表示计划创建时间和最后使用时间
This code block is shown in the floating window
Update push plan description
Path: /v3/push_plan/update
Method: PUT
Request body:
{
"name":string,
"description":string
}
用于修改指定推送计划标识的描述
{
"name":string,
"description":string
}
用于修改指定推送计划标识的描述
This code block is shown in the floating window
- Response
{
"code":int,
"message":string
}
成功返回0,success,失败返回对应错误码和描述
{
"code":int,
"message":string
}
成功返回0,success,失败返回对应错误码和描述
This code block is shown in the floating window
Delete push plan
Path: /v3/push_plan/delete/{name}
Method: DELETE
Request parameters:
name is passed in through the URL path and indicates the push plan identifier to be deleted. Required.
Example: /v3/push_plan/delete/plan_001
name is passed in through the URL path and indicates the push plan identifier to be deleted. Required.
Example: /v3/push_plan/delete/plan_001
This code block is shown in the floating window
- Response
{
"code":int,
"message":string
}
Returns 0 and success on success. On failure, returns the corresponding error code and description.
{
"code":int,
"message":string
}
Returns 0 and success on success. On failure, returns the corresponding error code and description.
This code block is shown in the floating window
- Notes
1. After a push plan is deleted, the plan identifier cannot be reused, and a push plan with the same name cannot be created again.
2. Delete is used only to release the push plan quota occupied by the plan. For the quota limit, see Rate limits. After deletion, the plan no longer appears in the query list.
3. If the plan identifier does not exist or has already been deleted, error code 1003 is returned.
1. After a push plan is deleted, the plan identifier cannot be reused, and a push plan with the same name cannot be created again.
2. Delete is used only to release the push plan quota occupied by the plan. For the quota limit, see Rate limits. After deletion, the plan no longer appears in the query list.
3. If the plan identifier does not exist or has already been deleted, error code 1003 is returned.
This code block is shown in the floating window
Error codes
| httpStatus Code | Error Code | Error Description |
|---|---|---|
| 500 | 1000 | Internal service error |
| 400 | 1003 | Parameter Error, Specific Error View Description |
| 401 | 1004 | Frustration failure |
| 400 | 1008 | appkeydoes not exist |
| 429 | 2002 | Request frequency limit. Try again later. |
| 403 | 2006 | No permission to call this interface |
Rate limits
- Available only to Push VIP customers; non-VIP must upgrade
- Maximum 1000 plans
- All APIs in this document share a fixed rate of 100 requests/min
- All endpoints are VIP-only; non-VIP apps receive error code 2006.
Was this document helpful?