Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document API Routes - 1 #32

Open
ktaschek opened this issue Feb 2, 2025 · 0 comments
Open

Document API Routes - 1 #32

ktaschek opened this issue Feb 2, 2025 · 0 comments
Assignees

Comments

@ktaschek
Copy link
Collaborator

ktaschek commented Feb 2, 2025

Description
Now that we have the document schema and type, we need to create API endpoints to interact with documents in the MongoDB database. This task includes fetching a document by ID, retrieving all documents, and uploading a new document.

Acceptance Criteria

  • GET api/document/[id] - Get a document by ID.
  • GET api/document - Get all documents.
  • POST api/document - Upload a document (each request body field should match schema fields).

Steps:

  • Define routes
  • Add route logic
  • Add error handling
  • Test using an API platform like Postman (or the thunder client vscode extension)

Additional Information

  • Refer to issue Create Document Schema #8 for the schema
  • Slack the tech leads for the mongo uri and password
  • Coordinate with devs working on document routes - 2 and the API response task
@aarav27 aarav27 changed the title Add Document Routes - 1 Document API Routes - 1 Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants