getEntities
List DataSync entities of a class.
Results are scoped to the caller's access token: only entities the token is permitted to read (get) are returned. Entities the token cannot read are silently omitted — the call does not error and does not return a 403 for the un-readable entities. This token scoping is applied before filterFast / filter / sort. When the PubNub instance is configured with a secretKey (a trusted server-side deployment, never a client — the secretKey must not be shipped to clients), or when using a token whose grants cover the whole result set, no permission-based filtering is applied and all matching entities are returned, subject only to filterFast / filter / sort and limit paging.
Parameters
Entity class identifier.
Restricts results to a single version of the entity class (and its subclasses). If null, items of every version are returned, while filterFast, filter and sort fields are checked against the latest version. Pass a version to make results stable when new class versions are published.
Optional level at which the entity class is defined (e.g. SubKey / Global).
Optional filter expression. Filtering is only allowed on properties the entity class marks as filterable; filtering on any other property returns a server error. Each property in the class declares a filtering mode — none, simple, or full — and the mode is cumulative: a simple property is usable with filterFast (and sort on the filterFast path); a full property is usable with both filterFast and filter; a none property is not filterable at all. So a simple property works here but is rejected by filter. The filterable set has no fixed default — it is whatever the (required) className declares. In addition, the built-in fields id, createdAt, updatedAt, and status (case-sensitive, exactly as spelled) behave as full and are always filterable and sortable on any class, on both the filterFast and filter paths, regardless of its declared properties. filterFast is strongly consistent — it always reflects the latest writes — but accepts fewer conditions than filter; a limit on the number of conditions applies and can be adjusted by PubNub support (see the PubNub DataSync documentation for the current limit). For larger or more complex queries use filter. At most one of filterFast and filter may be supplied; sending both is rejected by the server (HTTP 400).
Optional advanced filter expression. Uses the same syntax as filterFast, but only properties whose filtering mode is full (plus the built-in fields) are usable here — a simple property that works with filterFast is rejected by filter. It is not subject to the same condition limit, so use it for larger or more complex queries. The trade-off is consistency: filter is eventually consistent (recent writes may not yet be reflected), whereas filterFast is strongly consistent. At most one of filterFast and filter may be supplied; sending both is rejected by the server (HTTP 400).
Optional sort criteria applied in order; each PNDataSyncSortField sorts on a payload property either ascending (default) or descending. Sorting is governed by the same filtering-mode gate as filtering: a simple property is sortable on the strongly-consistent path (filterFast, or a sort-only / cursor request with neither filter); a full property is sortable on that path and on the filter path. The built-in fields id, createdAt, updatedAt, and status are always sortable.
Optional page size, 1–100 (server default 20). A value outside that range is rejected by the server (HTTP 400), not clamped.
Optional opaque cursor for pagination (from a previous result's next.cursor).