API Requests ListAuthorizationModelsRequest - evansims/openfga-php GitHub Wiki
Request for listing all authorization models in a store. This request retrieves a paginated list of authorization models, including their IDs and metadata. It's useful for browsing available models, model management interfaces, and selecting models for operations.
Table of Contents
OpenFGA\Requests
- ListAuthorizationModelsResponse (response)
- ListAuthorizationModelsRequestInterface (interface)
public function getContinuationToken(): ?string
Get the continuation token for paginated results. Returns the pagination token from a previous list models operation to continue retrieving results from where the last request left off. This enables efficient pagination through stores with many model versions without missing or duplicating entries.
string
| null
— The continuation token from a previous operation, or null for the first page
public function getPageSize(): ?int
Get the maximum number of models to return per page. Specifies the page size for paginated results. This controls how many authorization models are returned in a single response. Smaller page sizes reduce memory usage and latency, while larger page sizes reduce the number of API calls needed to retrieve all model versions.
int
| null
— The maximum number of models to return per page, or null to use the default page size
public function getRequest(Psr\Http\Message\StreamFactoryInterface $streamFactory): OpenFGA\Network\RequestContext
Build 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(): string
Get the store ID containing the authorization models to list. Identifies which OpenFGA store contains the authorization models to enumerate. Each store maintains its own independent collection of model versions, representing the evolution of that store's authorization schema over time.
string
— The store ID containing the authorization models to list