workspaces
Workspaces
Bases: ListableApiResource, FindableApiResource, CreatableApiResource, UpdatablePatchApiResource, DestroyableApiResource
Nylas Workspaces API
The Nylas Workspaces API allows you to group grants in a Nylas application by email domain. Grants can be auto-grouped by matching email domain or manually assigned and removed.
Source code in nylas/resources/workspaces.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
auto_group(request_body=None, overrides=None)
Start a background job that auto-groups grants into workspaces by email domain.
This endpoint is rate-limited to one call per minute per application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request_body |
WorkspaceAutoGroupRequest
|
Optional filters to scope which grants are grouped. |
None
|
overrides |
RequestOverrides
|
The request overrides to apply to the request. |
None
|
Returns:
| Type | Description |
|---|---|
Response[WorkspaceAutoGroupResponse]
|
The started auto-group job. |
Source code in nylas/resources/workspaces.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
create(request_body, overrides=None)
Create a workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request_body |
CreateWorkspaceRequest
|
The values to create the workspace with. |
required |
overrides |
RequestOverrides
|
The request overrides to apply to the request. |
None
|
Returns:
| Type | Description |
|---|---|
Response[Workspace]
|
The created workspace. |
Source code in nylas/resources/workspaces.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
destroy(workspace_id, overrides=None)
Delete a workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id |
str
|
The ID of the workspace to delete. Accepts a UUID or a domain. |
required |
overrides |
RequestOverrides
|
The request overrides to apply to the request. |
None
|
Returns:
| Type | Description |
|---|---|
DeleteResponse
|
The deletion response (request ID only). |
Source code in nylas/resources/workspaces.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
find(workspace_id, overrides=None)
Return a workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id |
str
|
The ID of the workspace to retrieve. Accepts a UUID or a domain. |
required |
overrides |
RequestOverrides
|
The request overrides to apply to the request. |
None
|
Returns:
| Type | Description |
|---|---|
Response[Workspace]
|
The workspace. |
Source code in nylas/resources/workspaces.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
list(overrides=None)
Return all workspaces for the application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
overrides |
RequestOverrides
|
The request overrides to apply to the request. |
None
|
Returns:
| Type | Description |
|---|---|
ListResponse[Workspace]
|
The list of workspaces. |
Source code in nylas/resources/workspaces.py
36 37 38 39 40 41 42 43 44 45 46 47 48 | |
manual_assign(workspace_id, request_body, overrides=None)
Manually assign grants to or remove grants from a workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id |
str
|
The ID of the workspace. Accepts a UUID or a domain. |
required |
request_body |
WorkspaceManualAssignRequest
|
The grants to assign and/or remove. |
required |
overrides |
RequestOverrides
|
The request overrides to apply to the request. |
None
|
Returns:
| Type | Description |
|---|---|
Response[WorkspaceManualAssignResponse]
|
The grants that were assigned and removed. |
Source code in nylas/resources/workspaces.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
update(workspace_id, request_body, overrides=None)
Update a workspace.
The Workspaces API only supports updating via PATCH; the workspace must be addressed by its UUID (a domain path value is not accepted on update).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id |
str
|
The UUID of the workspace to update. |
required |
request_body |
UpdateWorkspaceRequest
|
The values to update the workspace with. |
required |
overrides |
RequestOverrides
|
The request overrides to apply to the request. |
None
|
Returns:
| Type | Description |
|---|---|
Response[Workspace]
|
The updated workspace. |
Source code in nylas/resources/workspaces.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |