rest-api-design-and-errors

Standardize REST API resources, URLs, pagination, and RFC 7807 error handling.

1|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/mub7865/Hackathone-2 --skill rest-api-design-and-errors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rest-api-design-and-errors
Source: https://github.com/mub7865/Hackathone-2/tree/main/.claude/skills/rest-api-design-and-errors
Command: npx skills add https://github.com/mub7865/Hackathone-2 --skill rest-api-design-and-errors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Consistent REST API design reduces integration friction by standardizing resource naming, URL structure, HTTP methods, pagination, filtering, sorting, and error responses across services.

Core Features & Use Cases

  • Resource naming rules enforce plural collections and nested patterns (e.g., /users, /users/{id}, /projects/{project_id}/tasks).
  • Standardized pagination, filtering, and sorting mechanisms (page, page_size, filter, sort) across endpoints.
  • Centralized error formatting using Problem Details (application/problem+json) with consistent status codes and error fields.

Quick Start

Provide a canonical REST API contract for a new project using the /api/v1 pattern with proper resource naming, pagination, and RFC 7807 Problem Details error handling.

Frequently Asked Questions about rest-api-design-and-errors

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

FAQPage Schema
How do I standardize REST API error handling across different backend frameworks?

Standardize REST API error handling by implementing centralized error formatting using RFC 7807 Problem Details (application/problem+json) with consistent status codes and error fields. This approach applies framework-agnostic contracts across FastAPI, Express, NestJS, and Django REST.

What is the best way to structure REST API resource URLs and pagination?

Structure REST API resources using plural collections and nested patterns like /users/{id}/projects, applying standardized pagination, filtering, and sorting mechanisms via page, page_size, filter, and sort parameters across all endpoints.

Why use RFC 7807 Problem Details for REST API error responses?

RFC 7807 Problem Details provides a standardized application/problem+json format for REST API error responses, ensuring consistent error fields and status codes across services to significantly reduce client integration friction.

Can I apply consistent REST API design rules to both FastAPI and Django REST?

Yes, you can apply consistent REST API design rules to FastAPI and Django REST. The guidelines enable framework-agnostic contracts for resource naming, URL structures, and centralized error handling across common backend stacks.

How do I implement consistent filtering and sorting mechanisms across REST API endpoints?

Implement consistent filtering and sorting by standardizing query parameters like filter and sort across REST API endpoints. This ensures predictable pagination and data retrieval patterns integrated uniformly throughout the service.

When do I need the /api/v1 pattern for REST API resource contracts?

You need the /api/v1 pattern when establishing a canonical REST API contract for a new project. It enforces proper resource naming, pagination, and RFC 7807 Problem Details error handling while allowing future version iteration.