Data statistics interface - interface analysis data interface

Data statistics interface - interface analysis data interface

WeChat public platform launched an invitation-based internal test of the data interface on January 6, 2015. Through the data interface, developers can obtain data similar to the statistical module of the official WeChat public platform website but more flexible, and can also perform advanced processing as needed.

During the invitation internal test, in order to ensure service quality, the data interface is only open to third-party platform developers. You can become a third-party platform developer by accessing the WeChat Open Platform and authorizing the public account login. The third-party platform can help operators manage public accounts and help authorized public accounts call data interfaces. In the permission set division of the public account login authorization mechanism, the interface analysis data interface belongs to the account management permission set.

The time for opening the data interface to all public account developers will be notified separately.

Please note:

1. The database of the public account data on the interface side only stores data after December 1, 2014. Data before that date cannot be queried. Even if data is found, it is unreliable and dirty data.
2. After calling the interface to obtain data, developers should save the data in their own database, which will speed up the next user's access and reduce unnecessary losses in calling the interface on the WeChat side.

The interface analysis data interface refers to the interface used to obtain the interface analysis data in the data statistics module of the official website of the public platform. The specific interface list includes the following:

Interface Name ***Time span Interface call address (must use https)
Get interface analysis data (getinterfacesummary) 30 https://api.weixin.qq.com/datacube/getinterfacesummary?access_token=ACCESS_TOKEN
Get interface analysis hourly data (getinterfacesummaryhour) 1 https://api.weixin.qq.com/datacube/getinterfacesummaryhour?access_token=ACCESS_TOKEN

***Time span refers to the time range in which data can be obtained when an API is called. For example, ***Time span of 7 means that a maximum of 7 days of data can be obtained at one time. The actual value of access_token can be obtained through "Get access_token".


Interface call request description

The interface analysis data interface (including all interfaces in the interface list) needs to POST the following sample data packet to the corresponding interface call address:

  1. {
  2. "begin_date": "2014-12-07",
  3. "end_date": "2014-12-07"
  4. }

Call parameter description

parameter Is it necessary illustrate
access_token yes Call interface credentials
begin_date yes Get the starting date of the data. The difference between begin_date and end_date must be less than the "*** time span" (for example, when the *** time span is 1, the difference between begin_date and end_date can only be 0 to be less than 1), otherwise an error will be reported.
end_date yes Get the end date of the data. The maximum value that end_date can be set to is yesterday.

Return Description

Under normal circumstances, the return JSON data packet of the interface for obtaining interface analysis data is as follows:

  1. {
  2. "list": [
  3. {
  4. "ref_date": "2014-12-07",
  5. "callback_count": 36974,
  6. "fail_count": 67,
  7. "total_time_cost": 14994291,
  8. "max_time_cost": 5044
  9. }
  10. //There will be data with different ref_date (between begin_date and end_date) later
  11. ]
  12. }

Under normal circumstances, the return JSON data packet of the interface for obtaining the time-sharing data analysis interface is as follows:

  1. {
  2. "list": [
  3. {
  4. "ref_date": "2014-12-01",
  5. "ref_hour": 0,
  6. "callback_count": 331,
  7. "fail_count": 18,
  8. "total_time_cost": 167870,
  9. "max_time_cost": 5042
  10. }
  11. //There will be data with different ref_hours later
  12. ]
  13. }

Return parameter description

parameter illustrate
ref_date Date of data
ref_hour Data hour
callback_count The number of times the user's message is passively replied to after receiving the message through the server configuration address
fail_count Number of failures of the above action
total_time_cost The total time consumed is divided by callback_count to get the average time consumed.
max_time_cost ***time consuming

WeChat will return error codes and other information when an error occurs. For specific error code queries, please see: Global Return Code Description

<<:  Data statistics interface-message analysis data interface

>>:  WeChat JS-SDK Description (1)

Recommend

Unveiling the promotional activities of mainstream e-commerce platforms!

Nowadays, there are more and more e-commerce acti...

This vegetable absorbs a lot of oil, but it is very suitable for losing weight!

There is a kind of food that is very suitable for...

What will Apple TV look like in China? Not worth looking forward to

At Apple's Spring Festival new product launch...

How are diamonds cut? Do they cut themselves?

Diamonds are considered money-eating beasts by so...

Can a non-rotating microwave oven still heat food evenly?

The microwave oven, a convenient tool in the fami...

5000 words to explain how to write a popular article on Xiaohongshu!

If you often use Douyin, you will always see some...

In-depth analysis of "Peak Burst": What does the active Indian Ocean plate mean?

The safety of people all over the world is protec...

Will QQ red envelopes be able to stop Alipay’s counterattack?

In just over 30 days, it will be the Chinese New ...

Where can I drink and taste tea in Changsha?

185-6916-1745 WeiQ is reliable, Changsha high-end...

NetEase Cloud Music product analysis!

This article is quite long. It comprehensively or...

False "freshness": How do fresh food lights "mislead" your eyes?

Shopping is an essential part of our daily lives....

TSMC needs the mainland market to break Samsung's game

Since TSMC lost to Samsung in the 14/16nm FinFET ...