đ§ Document Controller Documentation
QUICK DOCUMENTATIONâ
- File Path: /API/Controllers/DocumentController.cs
- Primary Purpose: Manages document operations including import and listing
- Key Endpoints:
- âī¸ POST /Import - Imports a document into the system
- đ GET /ListByJob - Retrieves a list of documents associated with a job
- Related Models: ImportDocumentCommand, GetJobDocumentListQuery, JobDocument
- Used By: Document management functionality in the web application
DETAILED DOCUMENTATIONâ
đ Overviewâ
The DocumentController provides functionality for importing documents into the system and retrieving lists of documents associated with specific jobs. It serves as the primary interface for document management operations.
đī¸ Controller Dependenciesâ
- Namespace: APV.API.Controllers
- Services Used: Mediator
- Other Dependencies: None
đ Endpointsâ
âī¸ ImportDocumentâ
- HTTP Method: POST
- URL Pattern: /Import
- Authentication: đ Required (inherited from ApiController)
- Description: Imports a document into the system
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| command | ImportDocumentCommand | Yes | Command containing the document to be imported |
Response Formatâ
Returns a string response indicating the result of the import operation.
đ ListByJobIdâ
- HTTP Method: GET
- URL Pattern: /ListByJob
- Authentication: đ Required
- Description: Retrieves a list of documents associated with a specific job
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | GetJobDocumentListQuery | Yes | Query containing the job ID to retrieve documents for |
Response Formatâ
Returns a List of JobDocument objects containing the documents associated with the specified job.
đĄ Tips for Document Managementâ
- â Supported document formats include PDF, DOC, DOCX, XLS, XLSX, and other common formats
- âšī¸ Documents are associated with specific jobs for better organization
- đ Access to documents is controlled by job permissions
- ⥠Large documents may require additional processing time