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

- 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 dataExample:
/api/products
- List all productsPOST
Create new resourcesExample:
/api/products
- Create a new productPUT
Update existing resources (full replacement)Example:
/api/products/{id}
- Update a product completelyPATCH
Partially update resourcesExample:
/api/products/{id}
- Update specific product fieldsDELETE
Remove resourcesExample:
/api/products/{id}
- Delete a productOPTIONS
Get information about endpoint capabilitiesExample:
/api/products
- Get available methodsVisual Logic Builder
CodeNull’s Visual Logic Builder lets you implement endpoint logic without writing code:
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
CRUD Operations for a Resource
CRUD Operations for a Resource
A standard set of endpoints for managing a resource:
GET /resources
- List all resourcesGET /resources/{id}
- Get a specific resourcePOST /resources
- Create a new resourcePUT /resources/{id}
- Update a resource completelyPATCH /resources/{id}
- Update a resource partiallyDELETE /resources/{id}
- Delete a resource
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