Giter Site home page Giter Site logo

five's Introduction

CRUD API README

Welcome to the documentation for the CRUD API hosted at https://five-m1d0.onrender.com/posts. This API provides endpoints for creating, reading, updating, and deleting posts.

Endpoints

  • Create: POST /posts

    • This endpoint is used to create a new entry in the database.
  • Read All Posts: GET /posts

    • This endpoint retrieves all posts currently stored in the database.
  • Read Latest Post: GET /posts/latest

    • This endpoint retrieves the latest post added to the database.
  • Read Post by ID: GET /posts/{id}

    • This endpoint retrieves a specific post based on its unique identifier.
  • Update Post: PUT /posts/{id}

    • This endpoint updates an existing post with the provided ID.
  • Delete Post: DELETE /posts/{id}

    • This endpoint removes the post with the specified ID from the database.

Usage

To interact with this API, you can send HTTP requests to the provided endpoints using your preferred method (e.g., using cURL commands, Postman, or any HTTP client library).

Example Usage

Create a New Post

POST /posts
Content-Type: application/json

{
  "title": "New Post",
  "content": "This is the content of the new post."
}

Get All Posts

GET /posts

Get Latest Post

GET /posts/latest

Get Post by ID

GET /posts/{id}

Replace {id} with the ID of the post you want to retrieve.

Update Post

PUT /posts/{id}
Content-Type: application/json

{
  "title": "Updated Post Title",
  "content": "Updated content goes here."
}

Replace {id} with the ID of the post you want to update.

Delete Post

DELETE /posts/{id}

Replace {id} with the ID of the post you want to delete.

Response Format

The API returns responses in JSON format, typically including the requested data or a relevant message.

five's People

Contributors

harshgarg28 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.