Redocly’s documentation does not provide a built-in mechanism for role-based access control (RBAC) at the markdown or page level directly within the static documentation or OpenAPI reference output. Typically, access control for documentation pages is managed at the web server, CDN, or authentication layer outside of Redocly itself. If you are using Redocly’s Developer Portal, you can implement authentication and authorization using external solutions (like OAuth, SSO, or custom middleware), but there is no direct way in markdown or config to require a "pearl" role for a single page ^1 ^2 ^3.
Recommended approach:
- Use your hosting platform’s authentication features to protect the
debrief.md
page and restrict it to users with the "pearl" role. - If using a custom portal, implement role-checking logic in your authentication middleware or web server configuration.
Redocly’s Developer Portal supports interactive, step-by-step guides using MDX files and built-in UI components. To create a code walkthrough:
- Create an MDX file in your portal project.
- Import components such as
OpenApiTryIt
,Alert
, andExplainStep
from@redocly/developer-portal/ui
. - Structure your walkthrough as a sequence of steps, each possibly including explanations, code blocks, and live API calls via the
OpenApiTryIt
component ^3.
Example:
import { OpenApiTryIt, ExplainStep } from '@redocly/developer-portal/ui';
# API Code Walkthrough
<ExplainStep>
Step 1: Authenticate to the API.
</ExplainStep>
<OpenApiTryIt operationId="login" />
<ExplainStep>
Step 2: Fetch user data.
</ExplainStep>
<OpenApiTryIt operationId="getUser" />
This approach guides users through code and API interactions interactively ^3.
Redocly allows you to configure which servers are shown in the "Try It" console. To show only the mock server:
- In your OpenAPI definition, under the
servers
array, include only the mock server URL for the relevant environment or reference. - Alternatively, configure the Developer Portal or Reference settings to display just the mock server in the "Try It" panel.
This ensures users can only make requests to the mock server, not to real environments ^3.
Redocly itself does not offer built-in scheduled API monitoring (like uptime checks or synthetic monitoring). API monitoring typically requires external tools (e.g., Postman Monitors, Pingdom, or custom scripts with CI/CD schedulers). Redocly focuses on documentation, linting, and previewing APIs, not on executing or scheduling API calls for monitoring purposes ^1 ^2 ^3 ^4.
Recommended approach:
- Use an external monitoring tool to run scheduled API checks.
- Optionally, integrate such monitoring results into your Redocly portal via custom components or status pages.
To change the color of headings in Redocly documentation:
- Use custom CSS in your Developer Portal or Reference theme configuration.
- For example, add the following CSS to your project’s custom stylesheet:
h1, h2, h3, h4, h5, h6 {
color: #800080; /* Purple */
}
Integrate this CSS via your portal’s theme configuration or by including it in your build process. This will turn all headings purple as desired.
Summary Table
Task | Redocly Support / Solution |
---|---|
Restrict page to "pearl" role | Not natively supported; use external authentication/authorization |
Create code walkthrough | Use MDX guides and import Redocly UI components (e.g., OpenApiTryIt , ExplainStep ) |
Show only mock server in Try It | Configure servers in OpenAPI or portal settings to show only the mock server |
Schedule API monitoring | Not supported; use external monitoring tools |
Make headings purple | Add custom CSS targeting heading tags |