api-endpoints

Document REST API routes and auth guards for SPA and mobile clients.

132|42|Updated Aug 19, 2020
One-click install
npx skills add https://github.com/OpenLitterMap/openlittermap-web --skill api-endpoints-openlittermap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-endpoints
Source: https://github.com/OpenLitterMap/openlittermap-web/tree/main/.ai/skills/api-endpoints
Command: npx skills add https://github.com/OpenLitterMap/openlittermap-web --skill api-endpoints-openlittermap

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The REST API documentation and routing map for the web SPA and mobile clients provides a single source of truth for endpoints, auth guards, and response contracts, enabling consistent integration and maintenance.

Core Features & Use Cases

  • Comprehensive endpoint catalog including v3 routes and public endpoints
  • Dual-auth aware design with session cookies and Sanctum tokens
  • Clear contracts described in readme/API.md and route references for frontend and mobile apps

Quick Start

Consult readme/API.md to understand current contracts before modifying any endpoint.

Frequently Asked Questions about api-endpoints

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I document REST API endpoints for web SPA and mobile clients?

To document REST API endpoints for web SPA and mobile clients, consolidate routes and authentication guards into a single source of truth like readme/API.md. This ensures consistent integration by defining clear response contracts and dual-auth mechanisms.

How does dual authentication with session cookies and Sanctum tokens work?

Dual authentication with session cookies and Sanctum tokens works by enforcing both auth mechanisms across your API routes. This design allows web SPAs to authenticate via session cookies while mobile clients use Sanctum tokens for secure access.

What is the current API version source of truth for v3 endpoint groups?

The current API version source of truth for v3 endpoint groups is readme/API.md. It consolidates the v3 routes and public endpoints defined in routes/api.php, ensuring all frontend and mobile integrations reference the correct API contracts.

How to maintain API route contracts when modifying routes in routes/api.php?

To maintain API route contracts when modifying routes in routes/api.php, consult readme/API.md to understand current contracts before making changes. This ensures the v3 endpoint group and authentication guards remain consistently documented for all clients.

Does this API documentation approach support public endpoints and authentication guards?

Yes, this API documentation approach supports public endpoints and authentication guards. It consolidates the comprehensive endpoint catalog including v3 routes, applying dual-auth aware design with session cookies and Sanctum tokens for secure access control.

Why keep API endpoint documentation in a single source of truth?

Keeping API endpoint documentation in a single source of truth prevents contract drift between backend routes and frontend clients. It provides a unified reference for endpoints, auth guards, and response contracts, enabling consistent maintenance and integration.