v1.2.3
API v1.2.3 New features
Section titled “API v1.2.3 New features”Documents
Section titled “Documents”A new /api/v1/documents endpoint group for working with the document storage - both organization documents and documents of a specific employee. See Documents.
GET /api/v1/documents/folders/{folder_type}- all folders of the typeorganizationoremployeewith adocument_countfor each.GET /api/v1/documents/employees/{employee_id}/folders-employeetype folders of a specific employee.POST /api/v1/documents/search- paginated document search. Exactly one offolder_idorfolder_typemust be set;employee_idandtitleare optional filters.POST /api/v1/documents/upload-multipart/form-dataupload that stores the file and creates the document in one request. The title comes from the file name without the extension.GET /api/v1/documents/{document_id}- document metadata.GET /api/v1/documents/{document_id}/download- the original file, with the name inContent-Disposition.PUT /api/v1/documents/{document_id}- rename the document.DELETE /api/v1/documents/{document_id}- delete the document.
Access is checked per folder: for type=organization via settings_document_folders=edit or the folder view/edit rules, for type=employee via employee_folder_permissions.
Document employee_id
Section titled “Document employee_id”Documents expose employee_id - the employee the document belongs to, or null for an organization document.