{"id":25510269,"url":"https://github.com/rishiyaduwanshi/restapi","last_synced_at":"2026-04-13T12:31:08.144Z","repository":{"id":245604927,"uuid":"818682218","full_name":"Rishiyaduwanshi/restApi","owner":"Rishiyaduwanshi","description":"This repository hosts a basic Node.js application powered by Express.js, designed for managing user data. The application provides both HTML and API endpoints to interact with user information stored on mongodb atlas. It includes functionalities such as listing all users, retrieving specific user details, and offering CRUD operations via API ","archived":false,"fork":false,"pushed_at":"2024-09-14T21:02:00.000Z","size":468,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"mongo","last_synced_at":"2025-11-27T11:19:02.465Z","etag":null,"topics":["api","js","json","nodejs"],"latest_commit_sha":null,"homepage":"https://restapi.paramountgrove.in","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rishiyaduwanshi.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-22T14:47:04.000Z","updated_at":"2025-02-22T15:29:55.000Z","dependencies_parsed_at":"2024-09-15T05:36:08.692Z","dependency_job_id":"ca87983d-8e0b-458c-b3e7-c22616389649","html_url":"https://github.com/Rishiyaduwanshi/restApi","commit_stats":null,"previous_names":["rishiyaduwanshi/restapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rishiyaduwanshi/restApi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishiyaduwanshi%2FrestApi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishiyaduwanshi%2FrestApi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishiyaduwanshi%2FrestApi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishiyaduwanshi%2FrestApi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rishiyaduwanshi","download_url":"https://codeload.github.com/Rishiyaduwanshi/restApi/tar.gz/refs/heads/mongo","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishiyaduwanshi%2FrestApi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31752999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","js","json","nodejs"],"created_at":"2025-02-19T09:38:32.525Z","updated_at":"2026-04-13T12:31:08.114Z","avatar_url":"https://github.com/Rishiyaduwanshi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# RESTful API Documentation\n\nWelcome to the documentation for our RESTful API. This API allows you to perform CRUD operations on user data. Below you will find details on available routes, methods, and how to interact with the API using Postman or any other API testing tool.\n\n## Getting Started\n\nTo get started with the API, follow these steps:\n\n### Prerequisites\n\n- Node.js installed on your machine\n- MongoDB installed locally or accessible via a URI\n- Postman or any API testing tool\n\n### Installation\n\n1. Clone the repository:\n\n   ```\n   git clone \u003crepository-url\u003e\n   ```\n\n2. Install dependencies:\n\n   ```\n   npm install\n   ```\n\n3. Set up environment variables:\n\n   Create a `.env` file in the root directory with the following variables:\n\n   ```\n   PORT=4500\n   MONGODB_URI=mongodb://localhost:27017/your-database-name\n   APP_URI=http://localhost:4500\n   ```\n\n   Replace `your-database-name` with your MongoDB database name.\n\n4. Start the server:\n\n   ```\n   npm start\n   ```\n\n   This will start the server at `http://localhost:4500`.\n\n## API Routes\n\n### Users\n\n- **GET /users**\n  - Fetch all users.\n\n- **POST /users**\n  - Create a new user.\n  - Request body should include:\n    ```json\n    {\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"email\": \"john.doe@example.com\",\n      \"age\": 30,\n      \"major\": \"Computer Science\",\n      \"gpa\": 3.8,\n      \"enrollment_date\": \"2023-01-01\",\n      \"graduation_date\": \"2027-05-15\"\n    }\n    ```\n\n- **GET /users/:student_id**\n  - Fetch a user by ID.\n\n- **PATCH /users/:student_id**\n  - Update a user by ID.\n  - Send only the fields to be updated in the request body.\n    ```json\n    {\n      \"email\": \"new.email@example.com\",\n      \"age\": 31\n    }\n    ```\n\n- **DELETE /users/:student_id**\n  - Delete a user by ID.\n\n### API\n\nAll the above routes are also available under `/api`. For example:\n\n- **GET /api/users**\n- **POST /api/users**\n- **GET /api/users/:student_id**\n- **PATCH /api/users/:student_id**\n- **DELETE /api/users/:student_id**\n\n## Testing the API\n\nUse Postman or any other API testing tool to test the endpoints described above. Make sure to replace `:student_id` with the actual ID of the user you want to interact with.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishiyaduwanshi%2Frestapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishiyaduwanshi%2Frestapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishiyaduwanshi%2Frestapi/lists"}