> ## Documentation Index
> Fetch the complete documentation index at: https://shivamgoyal.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 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

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/shivamgoyal/images/endpoints-management-overview.png" alt="Endpoints Management Interface" />
</Frame>

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

<CardGroup cols={2}>
  <Card title="GET" icon="arrow-down">
    Retrieve resources or data

    Example: `/api/products` - List all products
  </Card>

  <Card title="POST" icon="plus">
    Create new resources

    Example: `/api/products` - Create a new product
  </Card>

  <Card title="PUT" icon="pen">
    Update existing resources (full replacement)

    Example: `/api/products/{id}` - Update a product completely
  </Card>

  <Card title="PATCH" icon="edit">
    Partially update resources

    Example: `/api/products/{id}` - Update specific product fields
  </Card>

  <Card title="DELETE" icon="trash">
    Remove resources

    Example: `/api/products/{id}` - Delete a product
  </Card>

  <Card title="OPTIONS" icon="question">
    Get information about endpoint capabilities

    Example: `/api/products` - Get available methods
  </Card>
</CardGroup>

## Visual Logic Builder

CodeNull's Visual Logic Builder lets you implement endpoint logic without writing code:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/shivamgoyal/images/visual-logic-builder.png" alt="Visual Logic Builder Interface" />
</Frame>

The builder includes nodes for:

<CardGroup cols={3}>
  <Card title="Database Operations" icon="database">
    Query, insert, update, and delete data
  </Card>

  <Card title="Conditional Logic" icon="code-branch">
    If/else statements and switch cases
  </Card>

  <Card title="Data Transformations" icon="exchange-alt">
    Map, filter, and transform data
  </Card>

  <Card title="External Requests" icon="globe">
    Call other APIs and services
  </Card>

  <Card title="Authentication" icon="lock">
    Verify user identity and permissions
  </Card>

  <Card title="File Handling" icon="file">
    Process file uploads and downloads
  </Card>

  <Card title="Validation" icon="check-circle">
    Validate input data against schemas
  </Card>

  <Card title="Error Handling" icon="exclamation-triangle">
    Catch and process errors
  </Card>

  <Card title="Custom Code" icon="code">
    Add custom JavaScript/TypeScript
  </Card>
</CardGroup>

## Common Endpoint Patterns

<Accordion title="CRUD Operations for a Resource">
  A standard set of endpoints for managing a resource:

  * `GET /resources` - List all resources
  * `GET /resources/{id}` - Get a specific resource
  * `POST /resources` - Create a new resource
  * `PUT /resources/{id}` - Update a resource completely
  * `PATCH /resources/{id}` - Update a resource partially
  * `DELETE /resources/{id}` - Delete a resource
</Accordion>

## Best Practices

<Tip>
  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.
</Tip>

* **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

## Next Steps

<CardGroup cols={2}>
  <Card title="API Creation" icon="plus" href="/api-dashboard/creation">
    Learn about creating complete APIs
  </Card>

  <Card title="Database Integration" icon="database" href="/database-dashboard/overview">
    Connect your endpoints to database resources
  </Card>

  <Card title="Frontend Integration" icon="code" href="/user-flow/api-integration">
    Learn how to connect your frontend to your API endpoints
  </Card>
</CardGroup>
