You need to enable JavaScript to run this app.
导航

内容信息获取接口

最近更新时间2023.01.12 14:47:59

首次发布时间2022.09.26 17:42:59

概述

本文档提供通过内容ID查询内容管理平台内容信息的功能。

内容信息获取接口

调前准备

  1. 接口鉴权
    详见:接口鉴权
  2. 调用接口
    注意参数 是否必填,使用正确的ServiceName、Action、Version 等url信息
    详见:下方接口信息

请求接口

请求方式

post

请求url:

https://cms.volcengineapi.com?Action=MGetBaseArticlesByGroupIds&Version=2022-01-01

请求header:

ServiceName: volc_content_api

url组成:

Host: https://cms.volcengineapi.com

Action: MGetBaseArticlesByGroupIds

Version: 2022-01-01

请求参数

字段名
字段类型
是否必填
说明
GroupIds
list<number>
文章ID列表,最多为20

响应字段

字段名
字段类型
是否必填
说明
ResponseMetadata
ResponseMetadata
BaseResp
BaseResp
Data
ArticleList

相关字段取值

reason
描述
not_exist_or_delete
不存在或已删除
gid_illegal
gid 非法

请求示例

{
    "GroupIds": [
        123,
        1744988526306333
    ]
}

响应示例

正常响应示例

{
    "ResponseMetadata": {
        "RequestId": "2022092616100401021119908022CB7C41",
        "Action": "MGetBaseArticlesByGroupIds",
        "Version": "2022-01-01",
        "Service": "volc_content_api",
        "Region": "cn-north-1"
    },
    "Data": {
        "ArticleList": [
            {
                "GroupId": 1744xxxxxxxxxxxxx,
                "Title": "股价xxxx",
                "Author": {
                    "AuthorName": "xxxx",
                    "AuthorAvatarUrl": "https://xxxx",
                    "AuthorId": "1728xxxxx",
                    "Description": "让财经xxxxx",
                    "HomePage": "https://opexxxxxx",
                    "FollowerCount": 0,
                    "AuthorBizId": "195xxxxx"
                },
                "GroupType": "article",
                "GenerateType": "toutiao_api",
                "PublishTime": 1664150400,
                "Abstract": "股价一xxxxxxx",
                "OpenId": "714xxxxxxxx",
                "Tags": [
                    "江苏",
                    "居然之家","
                ],
                "CoverImages": [
                    {
                        "Url": "http://pxxxxx",
                        "Height": 680,
                        "Weight": 1228,
                        "Width": 1228
                    }
                ],
                "Extra": "",
                "Link": "https://opexxxxxx",
                "DiggCount": 10,
                "CommentCount": 4,
                "CommentUrl": "https://openxxxxx",
                "GoodsIds": [
                    "sh601828",
                    "sz000785"
                ],
                "GoodsList": [
                    {
                        "GoodsId": "sh601828",
                        "GoodsName": "美凯龙",
                        "Keywords": "sh601828",
                        "Description": "",
                        "GoodsSourceId": "706xxxxx"
                    },
                    {
                        "GoodsId": "sz000785",
                        "GoodsName": "居然之家",
                        "Keywords": "sz000785",
                        "Description": "",
                        "GoodsSourceId": "70644xxxxx"
                    }
                ],
            }
        ],
        "MissReasons": [
            {
                "GroupId": 123,
                "reason": "not_exist_or_delete"
            }
        ]
    },
    "BaseResp": {
        "StatusMessage": "success",
        "StatusCode": 1000
    }
}

异常响应示例

{
    "ResponseMetadata": {
        "RequestId": "2022092616521701021203522017C9A74E",
        "Action": "MGetBaseArticlesByGroupIds",
        "Version": "2022-01-01",
        "Service": "volc_content_api",
        "Region": "cn-north-1",
        "Error": {
            "CodeN": 1001,
            "Code": "1001",
            "Message": "GroupIds列表为空或超过20个"
        }
    },
    "Data": null,
    "BaseResp": {
        "StatusMessage": "GroupIds列表为空或超过20个",
        "StatusCode": 1001
    }
}

错误代码

详见:错误代码表:volc_content_api

注意

若需排查日志,请提供 RequestId