Backend & API Manual

From HTTP fundamentals to scalable architecture and database lifecycles. The definitive logic reference for full-stack engineers.

HTTP Methods

GET

Retrieve Resources

Requests a representation of the specified resource. Requests using GET should only retrieve data and have no other effect.

Implementation / Pattern
GET /api/v1/users
Nexsa API Reference

POST

Create Resources

Submits an entity to the specified resource, often causing a change in state or side effects on the server.

Implementation / Pattern
POST /api/v1/users { "name": "Nexsa User" }
Nexsa API Reference

PUT

Replace Resources

Replaces all current representations of the target resource with the request payload (Idempotent).

Implementation / Pattern
PUT /api/v1/users/1
Nexsa API Reference

PATCH

Partial Update

Applies partial modifications to a resource.

Implementation / Pattern
PATCH /api/v1/users/1 { "status": "active" }
Nexsa API Reference

DELETE

Remove Resources

Removes the specified resource from the server.

Implementation / Pattern
DELETE /api/v1/users/1
Nexsa API Reference

Status Codes

200 OK

Success

The request has succeeded. Standard response for successful GET/PUT.

Nexsa API Reference

201 Created

Success

Request fulfilled and a new resource was created. Common for POST.

Nexsa API Reference

400 Bad Request

Client Error

Server cannot process request due to client error (e.g. malformed JSON).

Nexsa API Reference

401 Unauthorized

Client Error

Authentication is required and has failed or has not yet been provided.

Nexsa API Reference

403 Forbidden

Client Error

Client has permission to access but server refuses. (e.g. insufficient role).

Nexsa API Reference

404 Not Found

Client Error

The requested resource could not be found but may be available in the future.

Nexsa API Reference

429 Too Many Requests

Client Error

The user has sent too many requests in a given amount of time (Rate Limiting).

Nexsa API Reference

500 Internal Error

Server Error

A generic error message when an unexpected condition was encountered.

Nexsa API Reference

Common Headers

Content Types

MIME Types

Defines the nature of the data being sent in the request or response.

Implementation / Pattern
application/json multipart/form-data text/html
Nexsa API Reference

Mastering the HTTP Protocol

Communication is the core of the modern web. Understanding the nuances of HTTP status codes and header semantics is critical for building resilient, self-documenting APIs that both machines and developers can understand.

Expert Implementation

Idempotency & Method Semantics

Web development often overlooks the difference between `PUT` and `PATCH`, or the importance of idempotency in `DELETE` operations. Our reference hub clarifies these standards to ensure your backend architecture remains consistent with world-class engineering patterns.

Protocol Specs

StandardRFC-9110-Compliant
CORSFull-Header-Logic
TypeREST-GraphQL-Ready

API Development FAQs

What is the difference between 401 and 403?

401 (Unauthorized) means the server doesn't know who you are. 403 (Forbidden) means the server knows who you are but you don't have permission for this specific resource.

When should I use a 201 status?

Use `201 Created` specifically after a `POST` or `PUT` request that successfully results in the creation of a new resource. It should usually include a `Location` header.

Are HTTP headers case-sensitive?

No. According to the HTTP specification, field names are case-insensitive. However, standard practice is to use Pascal-Case (e.g., `Content-Type`).

Why use the OPTIONS method?

OPTIONS is primarily used by browsers for 'preflight' requests in CORS. It checks which methods and headers the server allows before sending the actual data.