getMemberships

List DataSync memberships, optionally filtered by channel and/or user. Optional filters/paging are set via the returned builder.

This API always queries the built-in Membership relationship class — there is no class-name query, only classVersion. Querying a Membership subclass is not supported here; that is served by the general /relationships API. See filterFast, filter, and sort for the exact per-parameter rules. The built-in fields id, createdAt, updatedAt, and status are filterable and sortable, except that status may be excluded when the class declares it as a projected field and the token cannot fully reach it.

Results are scoped to the caller's access token: only memberships the token is permitted to read (get) are returned. Memberships the token cannot read are silently omitted — the call does not error and does not return a 403 for the un-readable memberships. Token scoping and the filterFast / filter / sort criteria are applied together, so the returned page never contains a membership the token cannot read regardless of the other criteria. 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 memberships are returned, subject only to filterFast / filter / sort and limit paging.