api-endpoint-design

Design and validate REST API endpoints for a vehicle insurance data platform.

1|Updated Nov 4, 2025
One-click install
npx skills add https://github.com/alongor666/daylyreport --skill api-endpoint-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-endpoint-design
Source: https://github.com/alongor666/daylyreport/tree/main/.claude/skills/api-endpoint-design
Command: npx skills add https://github.com/alongor666/daylyreport --skill api-endpoint-design

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Flask, pytest.

What problem does it solve?

This Skill provides a comprehensive guide for designing, testing, and troubleshooting REST API endpoints for a vehicle insurance data platform. It ensures consistent, robust, and well-documented API interactions, reducing development time and integration errors.

Core Features & Use Cases

  • Endpoint Catalog: Details 11 core endpoints, including KPI data, week comparison, and staff performance distribution.
  • Unified Response Format: Standardizes success/failure responses with clear HTTP status codes and error messages.
  • Parameter Validation: Specifies validation rules for filters, dates, metrics, and periods, ensuring data integrity.
  • Testing & Debugging: Offers cURL examples for quick testing and outlines unit testing best practices with pytest.
  • Use Case: A developer needs to add a new API endpoint to retrieve insurance policy distribution by renewal type. This skill provides the exact structure, parameter validation, and testing methods to implement it correctly and efficiently.

Quick Start

Design a new API endpoint '/api/policy-distribution' that accepts 'date' and 'filters' parameters, and returns policy distribution by 'renewal_type'.

Frequently Asked Questions about api-endpoint-design

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

FAQPage Schema
How do I design REST API endpoints with consistent error handling and response formats?

REST API endpoint design requires standardized response schemas with clear HTTP status codes and error messages. This Skill provides a unified response format template and parameter validation rules that enforce consistency across endpoints, reducing integration errors and development time.

How do I validate API parameters and test Flask endpoints with pytest?

Parameter validation in Flask endpoints ensures data integrity by checking filters, dates, and metrics before processing. This Skill covers validation rules and pytest testing patterns, including cURL examples for quick endpoint testing and unit test best practices.

Can I use Flask to build a multi-endpoint API with consistent structure?

Flask supports building multiple endpoints with shared patterns. This Skill catalogs 11 core endpoints for a vehicle insurance platform—including health checks, KPI data, and policy mapping—demonstrating how to apply consistent validation, response schemas, and error handling across all endpoints.

What's the best way to debug REST API responses and validate endpoint behavior?

Debugging REST APIs requires systematic testing and response validation. This Skill offers cURL examples for endpoint testing and outlines unit testing strategies with pytest to verify correct HTTP status codes, error messages, and response payloads across all endpoints.

How do I add a new API endpoint that integrates with existing validation and response patterns?

Adding new endpoints efficiently requires following established patterns for validation, response structure, and error handling. This Skill provides the exact structure, parameter validation rules, and testing methods needed to implement new endpoints correctly and ensure backend-frontend integration readiness.