Endpoints Management
Create, configure and manage API endpoints in the CodeNull API Dashboard
Endpoints Management
The Endpoints Management interface in CodeNull allows you to create and manage the individual API endpoints that make up your backend services. This guide shows you how to design, implement, and test specific endpoints with various HTTP methods, request/response schemas, and business logic.
Overview
The Endpoints Management interface gives you complete control over your API’s individual endpoints, letting you:
- Create endpoints with different HTTP methods (GET, POST, PUT, DELETE, etc.)
- Define request parameters, headers, and body schemas
- Configure response formats and status codes
- Implement custom business logic
- Set endpoint-specific authentication and permissions
- Test endpoints directly from the interface
Endpoint Types and Methods
GET
Retrieve resources or data
Example: /api/products
- List all products
POST
Create new resources
Example: /api/products
- Create a new product
PUT
Update existing resources (full replacement)
Example: /api/products/{id}
- Update a product completely
PATCH
Partially update resources
Example: /api/products/{id}
- Update specific product fields
DELETE
Remove resources
Example: /api/products/{id}
- Delete a product
OPTIONS
Get information about endpoint capabilities
Example: /api/products
- Get available methods
Visual Logic Builder
CodeNull’s Visual Logic Builder lets you implement endpoint logic without writing code:
The builder includes nodes for:
Database Operations
Query, insert, update, and delete data
Conditional Logic
If/else statements and switch cases
Data Transformations
Map, filter, and transform data
External Requests
Call other APIs and services
Authentication
Verify user identity and permissions
File Handling
Process file uploads and downloads
Validation
Validate input data against schemas
Error Handling
Catch and process errors
Custom Code
Add custom JavaScript/TypeScript
Common Endpoint Patterns
Best Practices
Make your endpoints as focused and specific as possible. Each endpoint should do one thing and do it well, rather than trying to handle multiple operations.
- Consistent naming: Use plural nouns for resources (e.g., /products instead of /product)
- Clear hierarchy: Use logical nesting for related resources
- Proper status codes: Return appropriate HTTP status codes for different scenarios
- Meaningful responses: Include helpful error messages and relevant data
- Idempotent operations: Ensure GET, PUT, and DELETE operations are idempotent
- Rate limiting: Consider adding rate limiting for high-traffic endpoints
- Caching headers: Use appropriate cache-control headers for GET requests