Posts Query

Overview

Posts Query API is capable of the following items:

  • Search all posts on the server that match the criteria

  • Scoped searching

  • Post types filtering

  • Deleted or non-deleted state filtering

  • Results ordering

Search and Results Behavior

Posts Query API searches all the posts in the database. Any posts that match the criteria will be put into the live collection, regardless of whether it is a parent or a child post.

Posts Query API returns a live collection, with the flattened post objects. The collection can contain parent and child posts, ordered by the sorting criteria.

Use-cases

Posts Query API can be useful for the use-cases that require flattening the search and results. For example:

  • Media gallery that shows the list of all images, posted by a user

  • List of all the text posts that are deleted in a community

Usage

The supported query post types are video, image, file, liveStream , poll and custom post.

For custom post, follow a namespace like format. Example: "upstra.customtype"

Pagination

Last updated