- Previous: UI Integration Framework
- Up: Overview
- Next: Best Practices
Controlled Document Management API
The Controlled Document Management API allows you to import documents and training assignments. These APIs require the Egnyte.controlleddocs scope.
Import a Document
This endpoint is used to import a new document or a new version of an existing document in the Controlled Document Management app. When executed as an admin, it will allow importing documents to all the categories of the Controlled Docs. Executing as a Category Manager will only allow importing documents to the categories they manage.
Request Parameters in the Request Body
Parameter | Description | Required | Possible Values |
---|---|---|---|
docId | Document Identifier to be used within Controlled Document Management | Yes | string example: SOP-1 |
name | Name of the Document to be used within Controlled Document Management | Yes | string example: Change Management SOP |
version | Specific version of the document to be used within Controlled Document Management | Yes | string example: 1.0, 1.1 |
entryId | Unique ID of the version of the file to be imported to Controlled Document Management | Yes | string example: f450227d-044c-45b5-9dbb-c1120a856b81 |
responsibleDepartment | The department/personnel responsible to maintain the document | No | string example: Clinical |
effectiveFromDate | The date document becomes effective | Yes | string in YYYY-MM-DD format example: 2023-01-22 |
effectiveToDate | The date document effective period ends | Yes | string in YYYY-MM-DD format example: 2024-01-21 |
approvedOn | The date document is approved | Yes | string in YYYY-MM-DD format example: 2022-12-17 |
Request Examples
POST /pubapi/v1/controlled-docs/documents/import HTTP/1.1 Host: apidemo.egnyte.com Authorization: Bearer 68zc95e3xv954u6k3hbnma3q Content-Type: application/json { "docId": "SOP-1", "name": "Change Management SOP", "version": "1.0", "entryId": "f450227d-044c-45b5-9dbb-c1120a856b81", "responsibleDepartment": "Clinical", "effectiveFromDate": "2023-01-22", "effectiveToDate": "2024-01-21", "approvedOn": "2022-12-17" }
Response
A successful request will return an HTTP 201 status code with the Controlled Document Management internal identifier for the imported document.
{ "id": "f450227d-044c-45b5-9dbb-c1120a856b81" }
A failed request will include a response body in the following format:
{ "msg": "Detailed error message" }
The following HTTP status codes may be returned in the case of a failed request:
Status Code | Error Details |
---|---|
400 | One of the following issues:
|
403 | User cannot add new documents to the category |
404 | Entry id does not exist |
409 | One of the following issues:
|
Import Training Assignments
This endpoint is used to import training assignment records into the Controlled Document Management app. When executed as an admin, it will allow importing training records of users from all the categories of the Controlled Docs. When executed as a Category Manager, it will only allow importing training records of users from the categories they manage. The Training assignment status will automatically be calculated by the system based on the dueDate, completedDate and canceledDate.
Request Parameters in the Request Body
Parameter | Description | Required | Possible Values |
---|---|---|---|
assigneeId | ID of the user who is assigned the training | Yes | Integer example: 11 |
docId | Document ID of a document for which training is assigned | Yes | string example: SOP-1 |
version | Document Version of a document for which training is assigned | Yes | string example: 1.0, 1.1 |
assignedDate | The date on which training assignment gets created Note: When the assignedDate is not set, the system will use the current date |
No | string in ISO-8601 format example: 2023-01-22T14:00:00Z |
dueDate | The due date of training assignment | Yes | string in YYYY-MM-DD format example: 2023-02-22 |
completedDate | The training assignment completion date Note: You need to set completedDate only for importing completed training assignments. |
No | string in ISO-8601 format example: 2023-01-27T16:22:07Z |
canceledDate | The date when training assignment gets canceled Note: You need to set cancedDate only for importing canceled training assignments |
No | string in ISO-8601 format example: 2023-01-22T14:38:32Z |
assignedById | ID of the user who assigns the training Note: When the assignedById is not set, the system will use the ID of the requesting user. |
No | Integer example: 22 |
Request Examples
POST /pubapi/v1/controlled-docs/assignments/import HTTP/1.1 Host: apidemo.egnyte.com Authorization: Bearer 68zc95e3xv954u6k3hbnma3q Content-Type: application/json { "assigneeId": 11, "docId": "SOP-1", "version": "1.0", "assignedDate": "2023-01-22T14:00:00Z", "dueDate": "2023-02-22", "completedDate": "2023-01-27T16:22:07Z", "assignedById": 22 }
Sample Response
A successful request will return an HTTP 201 status code with the Controlled Document Management training assignemnt identifier.
{ "id": "e250227d-044c-45b5-9dbb-c1120a856b84" }
A failed request will include a response body in the following format:
{ "msg": "Detailed error message" }
The following HTTP status codes may be returned in the case of a failed request:
Status Code | Error Details |
---|---|
400 | Assignee does not have permission to view the category |
403 | One of the following issues:
|
404 | Referenced document not found |
409 | Operation not allowed for an obsolete document |
- Previous: UI Integration Framework
- Up: Overview
- Next: Best Practices
Docs Navigation
- Overview
- Getting Started
- Authentication
- File System API
- Permissions API
- Events API
- Search API
- Links API
- Workflow API
- User Management API
- Group Management API
- Audit Reporting API v2
- Trash API
- Comments API
- Metadata API
- Embedded UI API
- Bookmarks API
- User Insights API
- Folder Options API
- Project Folder API
- UI Integration Framework
- Controlled Document Management API
- Best Practices
- Mobile Development
- Other Applications
- Webhooks
- Secure and Govern API
- Audit Reporting API V1
- MSP API