What would you like to know more about?

Counting Live Articles

Learn how to approximate the number of live articles in a space by counting hrefs programmatically.

There is no endpoint to get the exact number of live articles, directly, but you should be able to get an approximation with these steps. If a live article is a page with an individual href (topics merged by chunking have 1 href), then you can count articles programmatically by downloading the structure and counting recursively.

Alternatively, IF your articles are tagged by product (using the taxonomy) and the statuses are accurately set, in this case to Published, you can count the number of articles in the CCMS to obtain a count that includes chunked articles.

  1. The structure of a space is located at: https://acstech.portal.heretto.com/api/structure/[spacename].
    https://acstech.portal.heretto.com/api/structure/ministryplatform
  2. Use Ctrl+F to search for href.
  3. Take the total number of hrefs and subtract 1 for the href on the sitemap.
    1218 -1 = 1217
This provides an estimate of live articles. Remember, chunked topics creates just 1 href, so this is not 100% accurate.