API Requests StreamedListObjectsRequest - evansims/openfga-php GitHub Wiki
Request for streaming objects that a user has a specific relationship with. This request finds all objects of a given type where the specified user has the requested relationship, returning results as a stream for efficient processing of large datasets. It's useful for building resource lists, dashboards, or any interface that shows what a user can access when dealing with thousands of objects.
Table of Contents
OpenFGA\Requests
- StreamedListObjectsResponse (response)
- StreamedListObjectsRequestInterface (interface)
public function getConsistency(): ?OpenFGA\Models\Enums\ConsistencyGet the consistency requirement for this request.
Consistency | null — The consistency requirement, or null if not specified
public function getContext(): ?objectGet the context object for this request.
object | null — The context object, or null if not specified
public function getContextualTuples(): ?OpenFGA\Models\Collections\TupleKeysInterfaceGet the contextual tuples for this request.
TupleKeysInterface | null — The contextual tuples collection, or null if not specified
public function getModel(): ?stringGet the authorization model ID for this request.
string | null — The authorization model ID, or null if not specified
public function getRelation(): stringGet the relation name for this request.
string — The relation name to check
public function getRequest(Psr\Http\Message\StreamFactoryInterface $streamFactory): OpenFGA\Network\RequestContextBuild a request context for HTTP execution. Transforms the request object into a standardized HTTP request context that can be executed by the OpenFGA HTTP client. This method handles all aspects of request preparation including parameter serialization, URL construction, header configuration, and body stream creation. The method validates that all required parameters are present and properly formatted, serializes complex objects to JSON, constructs the appropriate API endpoint URL, and creates the necessary HTTP message body streams.
| Name | Type | Description |
|---|---|---|
$streamFactory |
StreamFactoryInterface |
PSR-7 stream factory for creating request body streams from serialized data |
RequestContext — The prepared request context containing HTTP method, URL, headers, and body ready for execution
public function getStore(): stringGet the store ID for this request.
string — The store ID
public function getType(): stringGet the object type for this request.
string — The object type to list
public function getUser(): stringGet the user identifier for this request.
string — The user identifier