Use audiences to filter your API
Use x-fern-audiences to filter to relevant methods, parameters and schemas
Use x-fern-audiences to filter to relevant methods, parameters and schemas
Audiences are a useful tool for segmenting your JSON-RPC API for different consumers. Common examples of audiences include public
and beta.
Remember to filter your SDKs and Docs after specifying audiences. If no audiences are specified, nothing will be filtered.
The following example configures the SDK to filter to the public audience:
The following example configures the docs to filter to the public audience:
Add x-fern-audiences to methods to control which methods are included for specific audiences:
You can filter specific parameters within methods:
Filter entire schemas to different audiences:
You can filter individual properties within schemas:
Filter error information based on audience:
Apply audience filtering at the server level:
Use audiences to make methods available only in certain contexts:
This allows you to create different views of the same JSON-RPC API for different types of consumers, ensuring each audience only sees the methods and data relevant to their use case.