dev #2000
Updated by Ayat Rahman about 1 year ago
#### **Description:** Build Develop API endpoints to fetch specific and all tool information from the database. #### **Tasks:** 1. **Implement GET /api/v1/ai-tool endpoint to retrieve /api/tools/:id Route:** - Retrieve tool data by `tool_id`. - Return complete information, including all related data (e.g., tags, categories). 2. **Implement GET /api/tools Route:** - Fetch all AI tools with filtering (e.g., pricingType=Free, userId), pagination (limit, offset), and sorting (sort=desc). Include metadata like pricing plans options. - Apply optional filters (e.g., category, tag, approval status). 3. **Error Handling:** - Return 404 if the `tool_id` is not found. - Handle invalid inputs and tags in the response. edge cases gracefully. #### **Acceptance Criteria:** - [ ] Specific tool data is returned accurately via `/api/tools/:id`. - [ ] All tools can be fetched with `/api/tools`, including optional filters. - [ ] Pagination, sorting, and filtering are fully functional. ---