- Previous: Controlled Document Management API
- Up: Overview
- Next: Mobile Development
Document Portal API
The Document Portal API allows you to list and create workspaces. These APIs require the Egnyte.documentportal scope.
List Workspaces
This endpoint is used to fetch a list of workspaces.
Request Parameters in the Request Body
This API does not have any request parametersResponse
A successful request will return an HTTP 200 status code with a count of workspaces and an results array with an object representing each workspace.
GET /pubapi/v1/document-portal/workspaces HTTP/1.1 Host: apidemo.egnyte.com Authorization: Bearer 68zc95e3xv954u6k3hbnma3q { "count": 1, "results": [ { "id": "ae898c78-c1e8-4d99-aea0-f7538d085ae4", "name": "Acme Enterprises", "type": "Client", "status": "ACTIVE", "taskCount": 0, "creator": { "id": 1, "username": "jsmith", "email": "jsmith@example.com", "firstName": "Jane", "lastName": "Smith" } } ] }
Create Workspace
This endpoint is used to create a workspace. It can be used to create a workspace from an existing folder, to create a blank workspace, or to create a workspace from a template.
Request Parameters in the Request Body
Parameter | Description | Required | Possible Values |
---|---|---|---|
name | The name of the workspace. Also used as a the folder name when creating a blank workspace or a workspace from a template. | Yes | string |
status | The status of the workspace | Yes | One of the following values: ACTIVE INACTIVE |
type | The workspace type | Yes | string; One of the workspaceTypes from the Doc Portal Settings endpoint, e.g., "Client" |
workspaceFolderId | The id of the folder you would like to convert to a workspace | No Required only when converting an existing folder to a workspace |
string, for example "21dd19b3-8c28-4229-88a7-eae44f8768f5" |
workspaceParentFolderId | The id of the folder under which you would like to create a new workspace | No Required when creating a blank workspace or a workspace from a template |
string, for example "4e6173b7-fe20-411d-ba2a-a005d58154c8" |
workspaceTemplateId | The id of the folder for the template that should be used to create the new workspace | No Required when creating a workspace from a template |
string, for example "0ee1f7ff-39cc-44ea-a12d-3c8477736d93" |
variables | An array of variables used in the permissions template when creating a workspace from a template. This allows you to dynamically assign permissions based on permission template variables. | No | An array of objects with keys "name" (the variable name) and "value" (an array of user IDs). For example:[ { "name": "Account Manager", "value": [123] }, { "name": "Clients", "value": [234, 235] } ] |
Request Examples
POST /pubapi/v1/document-portal/workspaces HTTP/1.1 Host: apidemo.egnyte.com Authorization: Bearer 68zc95e3xv954u6k3hbnma3q Content-Type: application/json { "name": "Acme Enterprises", "status": "ACTIVE", "type": "Client", "workspaceFolderId": "21dd19b3-8c28-4229-88a7-eae44f8768f5" }
POST /pubapi/v1/document-portal/workspaces HTTP/1.1 Host: apidemo.egnyte.com Authorization: Bearer 68zc95e3xv954u6k3hbnma3q Content-Type: application/json { "name": "Acme Enterprises", "status": "ACTIVE", "type": "Client", "workspaceParentFolderId": "4e6173b7-fe20-411d-ba2a-a005d58154c8" }
POST /pubapi/v1/document-portal/workspaces HTTP/1.1 Host: apidemo.egnyte.com Authorization: Bearer 68zc95e3xv954u6k3hbnma3q Content-Type: application/json { "name": "Acme Enterprises", "status": "ACTIVE", "type": "Client", "workspaceParentFolderId": "4e6173b7-fe20-411d-ba2a-a005d58154c8", "workspaceTemplateId": "0ee1f7ff-39cc-44ea-a12d-3c8477736d93", "variables": [ { "name": "Account Manager", "value": [123] }, { "name": "Clients", "value": [234, 235] } ] }
Sample Response
A successful request will return an HTTP 201 status code with the newly created workspace id
{ "id": "e250227d-044c-45b5-9dbb-c1120a856b84" }
Get Document Portal Settings
This endpoint is used to fetch Document Portal Settings, which currently includes the list of workspace types
Request Parameters in the Request Body
This API does not have any request parametersResponse
A successful request will return an HTTP 200 status code with a count of workspaces and an results array with an object representing each workspace.
GET /pubapi/v1/document-portal/settings HTTP/1.1 Host: apidemo.egnyte.com Authorization: Bearer 68zc95e3xv954u6k3hbnma3q { "workspaceTypes": [ "Client", "Vendor", "Partner" ] }
- Previous: Controlled Document Management API
- Up: Overview
- Next: Mobile Development
Docs Navigation
- Overview
- Getting Started
- Authentication
- Best Practices
- 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
- Controlled Document Management API
- Document Portal API
- Mobile Development
- Other Applications
- UI Integration Framework
- Webhooks
- Secure and Govern API
- Audit Reporting API V1
- MSP API