API Call Address
{域名地址}/api/import/archive?token={token}
Description:{域名地址}Replace it with your domain address,{token}Replace it with the Token in the background content import interface function,https://en.anqicms.com/api/import/archive?token=xxx
Calling method
POST form-data
Request parameters
GET Parameters
| Field name |
Type |
Required |
Description |
| token |
string |
Yes |
Token in the background content import interface feature |
POST Parameters
| Field name |
Type |
Required |
Description |
| id |
int |
No |
Document ID, default auto-generated |
| title |
string |
Yes |
Document Title |
| content |
string |
Yes |
document content |
| category_id |
int |
Yes |
Document Category ID |
| Keywords |
string |
No |
Document Keywords |
| Description |
string |
No |
document summary, 250 words or less |
| url_token |
string |
No |
custom URL alias, supports numbers and letters only |
| Logo |
string |
No |
A thumbnail of the document, which can be an absolute address, such as:https://en.anqicms.com/logo.pngOr relative address, such as: /logo.png |
| images[] |
string |
No |
Article group photos, up to 9 photos can be set. Repeat this field for multiple photos. |
| publish_time |
string |
No |
Format: 2006-01-02 15:04:05 The publication time of the document, which can be in the future. If it is in the future, the document will be officially published only when the time arrives. |
| tag |
string |
No |
Document Tag, multiple tags separated by English commas, for example: aaa,bbb,ccc |
| Other custom fields |
any |
No |
If you also passed other custom fields, and the field exists in the document model, it is also supported. |
| draft |
boolean |
No |
Whether to save it to the draft, the supported values are: false |
| cover |
int |
No |
When the same title, ID document exists, whether to overwrite, supported values are: 0 |
Return parameters
| Field name |
Type |
Description |
| code |
int |
error code |
| msg |
string |
error reason description |
| data |
object |
result content |
data parameter
| Field name |
Type |
Description |
| id |
int |
Document ID |
| url |
string |
Document URL |
request data example
GET Parameters
token=4712a54b4c456bb29b7816d241db69a7
POST Parameters
Return Data Example
{
"code": 0,
"data": {
"id": 1,
"url": "https://en.anqicms.com/anqicms"
},
"msg": "发布成功"
}
Error Code
| error code |
Description |
| 0 |
OK |
| -1 |
Error, the reason is indicated in the msg |
| 1001 |
Not logged in |
| 1002 |
Unauthorized |
| 200 |
API request OK |