api-response-patterns

Standardize API response wrappers for ABP Framework REST endpoints.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/alexsandrocruz/DominusLeads --skill api-response-patterns-alexsandrocruz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-response-patterns
Source: https://github.com/alexsandrocruz/DominusLeads/tree/main/backend/Sapienza.Leads/.claude/skills/api-response-patterns
Command: npx skills add https://github.com/alexsandrocruz/DominusLeads --skill api-response-patterns-alexsandrocruz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides standardized API response wrappers for ABP Framework applications, ensuring consistent success, failure, and metadata across endpoints.

Core Features & Use Cases

  • Unified Response Contracts: Define ApiResponse<T>, ResponseModel<T>, and PagedApiResponse<T> to standardize payloads.
  • Rich Metadata & Errors: Include correlation IDs, timestamps, and detailed ApiError structures for diagnostics.
  • Pagination & Scoping: Support paged results with total counts and page information for client UIs.

Quick Start

Use ApiResponse<T> wrappers in application services to return success or failure consistently, e.g., return ApiResponse<ProductDto>.Ok(dto, "Fetched") or ApiResponse<ProductDto>.Fail("Not found", "NOT_FOUND").

Frequently Asked Questions about api-response-patterns

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

FAQPage Schema
How do I standardize API responses in an ABP Framework application?

Standardize API responses in ABP by wrapping endpoint payloads in generic wrappers like ApiResponse<T> or ResponseModel<T>. This ensures uniform success and failure contracts across all REST endpoints in .NET ABP-based apps.

What is the best way to handle pagination in ABP API responses?

Handle pagination in ABP API responses by using the PagedApiResponse<T> wrapper. It includes total counts and page information within the payload, providing client UIs with the data needed to render paged result sets.

How do I return detailed error information from an ABP REST endpoint?

Return detailed error information from ABP REST endpoints by using the ApiError structure within the response wrapper. It enables detailed diagnostics alongside failure contracts, using methods like ApiResponse<T>.Fail with specific error codes.

Can I include metadata like correlation IDs in my .NET API response wrapper?

Include metadata like correlation IDs in .NET API response wrappers by using the ApiResponseMeta structure. It allows you to attach correlation IDs and timestamps to the standardized payload for enhanced diagnostics and tracking.

Does this API response wrapper pattern work for all ABP application services?

The API response wrapper pattern works for ABP application services by applying generic wrappers like ApiResponse<T> to return values. It standardizes the output of application service methods across REST endpoints in ABP-based apps.