# Base Queries I'll help you with these Redocly-specific questions. Here are the answers to each: ## 1. Protecting a Page with Role-Based Access To protect your `debrief.md` page so it requires the "pearl" role: ```yaml # In your redocly.yaml or page frontmatter pages: - page: debrief.md access: roles: ["pearl"] ``` Or in the frontmatter of `debrief.md`: ```markdown  access: roles: ["pearl"]  # Your debrief content here ``` ## 2. Creating a Code Walkthrough Create a code walkthrough using Redocly's interactive code samples: ```markdown  title: API Code Walkthrough  # Code Walkthrough ```javascript // Step 1: Initialize the API client const client = new APIClient({ baseURL: 'https://api.example.com', apiKey: 'your-api-key' }); // Step 2: Make a request const response = await client.get('/users'); // Step 3: Handle the response console.log(response.data); ``` Use the `` component for step-by-step guides: ```markdown Configure your API client with credentials Make your first API call Process the returned data ``` ## 3. Showing Only Mock Server in Try It Console Configure the try-it console to use only mock servers: ```yaml # In redocly.yaml apis: main: root: openapi.yaml tryItOut: servers: - url: https://mock.example.com description: Mock Server hideRealServers: true ``` Or in your OpenAPI spec: ```yaml servers: - url: https://mock.example.com description: Mock Server (Try It) x-internal: false - url: https://api.example.com description: Production Server x-internal: true # This hides it from try-it ``` ## 4. Running API Monitoring on a Schedule Set up scheduled API monitoring using Redocly CLI with cron jobs or GitHub Actions: ### Using GitHub Actions: ```yaml # .github/workflows/api-monitoring.yml name: API Monitoring on: schedule: - cron: '0 */6 * * *' # Every 6 hours jobs: monitor: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Redocly CLI run: npm install -g @redocly/cli - name: Run API monitoring run: | redocly lint openapi.yaml redocly test openapi.yaml ``` ### Using cron (Linux/Mac): ```bash # Add to crontab (crontab -e) 0 */6 * * * cd /path/to/project && redocly test openapi.yaml >> monitoring.log 2>&1 ``` ## 5. Making Headings Purple in Redocly Customize heading colors using CSS in your theme: ```css /* In your custom CSS file or theme */ h1, h2, h3, h4, h5, h6 { color: #8B5CF6; /* Purple color */ } /* Or more specific targeting */ .redoc-content h1, .redoc-content h2, .redoc-content h3 { color: #8B5CF6; } ``` In your `redocly.yaml`: ```yaml theme: colors: primary: main: ‘#8B5CF6’ typography: headings: color: ‘#8B5CF6’ ``` Or using CSS custom properties: ```css :root { --heading-color: #8B5CF6; } h1, h2, h3, h4, h5, h6 { color: var(--heading-color); } ``` These configurations will help you achieve the specific Redocly customizations you’re looking for. Make sure to test these changes in your development environment before deploying to production.