-
Notifications
You must be signed in to change notification settings - Fork 5
API Requests ListAuthorizationModelsRequestInterface
Interface for listing authorization models in a store. This interface defines the contract for requests that retrieve a paginated list of all authorization model versions within a specific OpenFGA store. Authorization models are versioned, and this operation allows you to browse through the evolution of your authorization schema over time. Listing authorization models is useful for: - Administrative interfaces showing model version history - Implementing model rollback and comparison functionality - Auditing changes to authorization schemas over time - Building deployment and migration tools for authorization models - Understanding the evolution of permission structures - Debugging authorization issues by examining model versions Each model in the list includes metadata such as creation time and model ID, allowing you to understand when changes were made and select specific versions for detailed inspection or operational use.
Table of Contents
OpenFGA\Requests
- ListAuthorizationModelsResponseInterface (response)
- ListAuthorizationModelsRequest (implementation)
public function getContinuationToken(): string|nullGet 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|nullGet 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(StreamFactoryInterface $streamFactory): 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 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
Getting Started: Introduction • Installation • Authentication
Essentials: Stores • Authorization Models • Relationship Tuples • Permissions Queries
Features: Helper Functions • Concurrency • Results • Exceptions • Observability • Integration
- API Reference - Full class and method documentation
- Quickstart - Get up and running in minutes
- Helpers - Convenient shortcuts for common operations
- Testing Guide - Unit testing with the SDK
- Performance Guide - Optimize for high-scale applications
- Report Issues - Bug reports and feature requests
- Discussions - Community support and questions
- Contributing - Help improve the SDK
- Changelog - Latest updates and releases
- OpenFGA Documentation - Official OpenFGA documentation
- OpenFGA Playground - Interactive modeling environment
- Authorization Concepts - Learn relationship-based access control
- Other SDKs - JavaScript, Go, Python, .NET, and more
OpenFGA PHP SDK • Apache 2.0 License
- Authorization Stores
- Authorization Models
- Relationship Tuples
- Permission Queries
- Testing with Assertions
- Helper Functions
- Concurrency
- Error Handling
- Framework Integration
- OpenTelemetry Observability
- Result Pattern
- Event Dispatcher
- HTTP Request Sent Event
- HTTP Response Received Event
- Operation Started Event
- Operation Completed Event
- More Events …
- Authentication Exception
- Client Exception
- Configuration Exception
- Network Exception
- Serialization Exception
- More Exceptions …
- Request Manager
- Request Context
- Circuit Breaker
- Parallel Task Executor
- Fiber Concurrent Executor
- Simple Concurrent Executor
- Retry Handler
- Exponential Backoff Retry Strategy
- More Networking …