abp-api-implementation

Implement ABP Framework REST APIs with AppServices, DTOs, pagination, filtering, and authorization.

24|5|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/thapaliyabikendra/ai-artifacts --skill abp-api-implementation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: abp-api-implementation
Source: https://github.com/thapaliyabikendra/ai-artifacts/tree/main/.claude/skills/abp-api-implementation
Command: npx skills add https://github.com/thapaliyabikendra/ai-artifacts --skill abp-api-implementation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides you in implementing ABP Framework APIs with best practices, solving the challenge of building consistent, secure, and efficient API endpoints. It ensures your application services correctly handle data, authorization, and validation, aligning with ABP's modular architecture.

Core Features & Use Cases

  • Application Service Patterns: Demonstrates how to structure ABP application services for CRUD operations, DTO mapping, and business logic orchestration.
  • Authorization & Validation: Guides on integrating ABP's authorization system and FluentValidation for robust access control and input validation.
  • API Response Standardization: Patterns for consistent API responses, including pagination, filtering, and error handling, improving client-side consumption.
  • Use Case: A developer needs to implement the API for a new 'Product Management' module. Using this skill, they create an IProductAppService and its implementation, ensuring proper DTOs, authorization attributes, and validation rules are applied.

Quick Start

Implement an ABP application service method CreateProductAsync that takes a CreateProductDto, maps it to an entity, and inserts it into the repository, including basic authorization.

Frequently Asked Questions about abp-api-implementation

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

FAQPage Schema
How do I implement REST APIs in ABP Framework with application services?

REST APIs in ABP Framework are implemented using AppServices that handle CRUD operations, DTO mapping, and business logic. Create an interface like `IProductAppService`, implement it with repository access, apply DTOs for request/response contracts, and use ABP's authorization attributes to enforce role-based access control on each method.

What's the best way to add pagination and filtering to ABP API queries?

ABP provides `PageBy` for pagination and `WhereIf` for conditional filtering within application service methods. Combine these with DTOs that accept page size, page number, and filter parameters, then pass them to repository queries to return paginated, filtered results with metadata for client-side navigation.

How do I validate API inputs and authorize endpoints in ABP applications?

ABP integrates FluentValidation for input validation on DTOs and uses authorization attributes on application service methods to enforce permissions. Define validation rules in DTO validators and apply `[Authorize]` or role-specific attributes to control who can access each endpoint based on ABP's permission system.

Can I use DTOs to standardize API responses across ABP application services?

Yes, DTOs standardize API contracts in ABP by mapping domain entities to response objects, ensuring consistent data shapes across endpoints. Application services accept request DTOs, process them through repositories, map results to response DTOs, and return them—enabling uniform client-side consumption and reducing coupling to domain models.

What authorization patterns does ABP Framework support for API endpoints?

ABP authorization uses declarative attributes and permission checks within application services. Apply `[Authorize]` for authentication, use policy-based attributes for fine-grained permissions, or call `AuthorizationService.CheckAsync` inside methods to verify role-based or resource-specific access before executing business logic.

Do I need ABP's modular architecture to structure application services?

ABP's modular architecture guides application service organization by domain, but the core practice—grouping related CRUD operations in services, using DTOs, and applying validation and authorization—applies to any ABP project. Modules provide dependency isolation and reusability; single-module apps benefit from the same patterns.