Understanding incremental article exports

TheList Articlessection in the API reference docs lists several ways to get articles. One option lets you list all the articles with metadata that changed after a specified start time. This approach is also known as an增加出口.

The incremental article export endpoint looks as follows:

             
https://{subdomain}.亚博.com/api/v2/help_center/incremental/articles?start_time={start_time}

where{start_time}is an时代的时间such as 1618348927. The endpoint returns any article that had any of its metadata change after the start time.

Making incremental exports

To make sure you don't skip articles or get the same articles again over successive exports, use the end time of the previous export as the start time for the next export. For example, if the end time of your last export was the epoch time of 1617224682 (2021-03-31T21:04:42 UTC), then use that time as the start time for your next export.

Authenticating the requests

Unlike the other list article options, which allow anonymous requests, you must be an agent or admin to use the incremental article export endpoint. For more information, seeSecurity and authenticationin the reference docs.

方法通过the results

The pagination method of the incremental List Articles endpoint differs in two important ways from theoffset pagination methodof the Help Center API.

  1. The endpoint returns up to 1,000 articles per page.

    While 1000 articles seems like plenty, it's surprisingly easy for a large and active help center to reach and surpass the 1000-article limit. The reason is that the endpoint returns articles withanymetadata change. It's a good idea to filter the results.

  2. Thenext_pageurl doesn't specify a next page number such aspage=2. Instead, it specifies a new start time, which is the time of the last change of the last item on the current page. The response also records this time as theend_timeof the current page.

    For example, if the request's initialstart_timeis 1617731790, the response may contain the followingnext_pageandend_timevalues:

                   
    "next_page":"https://support.zendesk.com/hc/api/v2/incremental/articles.json?start_time=1617733880","end_time":1617733880,...

    Note that the start time ofnext_pageis different than the initial start time and is equal to the page'send_time.

Example

For an example of using incremental article exports, seeDownloading articles edited after a start time.