Fetching all Items
Items include all the data you have in the catalogue including documents, folders, and products. In this section, we will take a look at how to fetch items collectively.
There are two ways to query items contained within a tenant. You can do so by using the children field or using the subtree field. Both return the same results but the latter allows you to add pagination.
To fetch all items using the children field, you can do the following:
The query above gets the name and the type of all the children. You can ask for any of the query fields to get more information.
The subtree field can be used to fetch all the items in the following manner:
Using subtree is recommended for when you are adding pagination. Otherwise, the children field would fulfil the purpose just fine.