# lusid.WorkspaceApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_item**](WorkspaceApi.md#create_item) | **POST** /api/api/workspaces/{visibility}/{workspaceName}/items | [EXPERIMENTAL] CreateItem: Create a new item in a workspace.
[**create_workspace**](WorkspaceApi.md#create_workspace) | **POST** /api/api/workspaces/{visibility} | [EXPERIMENTAL] CreateWorkspace: Create a new workspace.
[**delete_item**](WorkspaceApi.md#delete_item) | **DELETE** /api/api/workspaces/{visibility}/{workspaceName}/items/{groupName}/{itemName} | [EXPERIMENTAL] DeleteItem: Delete an item from a workspace.
[**delete_workspace**](WorkspaceApi.md#delete_workspace) | **DELETE** /api/api/workspaces/{visibility}/{workspaceName} | [EXPERIMENTAL] DeleteWorkspace: Delete a workspace.
[**get_item**](WorkspaceApi.md#get_item) | **GET** /api/api/workspaces/{visibility}/{workspaceName}/items/{groupName}/{itemName} | [EXPERIMENTAL] GetItem: Get a single workspace item.
[**get_workspace**](WorkspaceApi.md#get_workspace) | **GET** /api/api/workspaces/{visibility}/{workspaceName} | [EXPERIMENTAL] GetWorkspace: Get a workspace.
[**list_items**](WorkspaceApi.md#list_items) | **GET** /api/api/workspaces/{visibility}/{workspaceName}/items | [EXPERIMENTAL] ListItems: List the items in a workspace.
[**list_workspaces**](WorkspaceApi.md#list_workspaces) | **GET** /api/api/workspaces/{visibility} | [EXPERIMENTAL] ListWorkspaces: List workspaces.
[**search_items**](WorkspaceApi.md#search_items) | **GET** /api/api/workspaces/{visibility}/items | [EXPERIMENTAL] SearchItems: List items across all workspaces.
[**update_item**](WorkspaceApi.md#update_item) | **PUT** /api/api/workspaces/{visibility}/{workspaceName}/items/{groupName}/{itemName} | [EXPERIMENTAL] UpdateItem: Update an item in a workspace.
[**update_workspace**](WorkspaceApi.md#update_workspace) | **PUT** /api/api/workspaces/{visibility}/{workspaceName} | [EXPERIMENTAL] UpdateWorkspace: Update a workspace.


### Example

```python
from finbourne.sdk.exceptions import ApiException
from finbourne.sdk.extensions.configuration_options import ConfigurationOptions
from finbourne.sdk.services.lusid.models import *

from finbourne.sdk.extensions import (
  SyncApiClientFactory
)

from finbourne.sdk.services.lusid.api.workspace_api import WorkspaceApi

# opts = ConfigurationOptions()
# opts.total_timeout_ms = 30_000

# uncomment the below to use an api client factory with overrides
# api_client_factory = SyncApiClientFactory(opts=opts)

api_client_factory = SyncApiClientFactory()
api_instance = api_client_factory.build(WorkspaceApi)
```

---

# **create_item**
> WorkspaceItem createItem = create_item(visibility, workspace_name, workspace_item_creation_request=workspace_item_creation_request)

[EXPERIMENTAL] CreateItem: Create a new item in a workspace.

Create a new item in a workspace.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
workspace_name = 'workspace_name_example' # str
workspace_item_creation_request = WorkspaceItemCreationRequest()
api_response = api_instance.create_item(visibility, workspace_name, workspace_item_creation_request=workspace_item_creation_request)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the containing workspace; case is important. Available values: shared, personal. | [required] 
 **workspace_name** | **str**| The item&#39;s workspace name. | [required] 
 **workspace_item_creation_request** | [**WorkspaceItemCreationRequest**](WorkspaceItemCreationRequest.md)| The item to be created. | [optional] 

### Return type

[**WorkspaceItem**](WorkspaceItem.md)

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | The workspace item created. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **create_workspace**
> Workspace createWorkspace = create_workspace(visibility, workspace_creation_request, include_item_access=include_item_access)

[EXPERIMENTAL] CreateWorkspace: Create a new workspace.

Create a new workspace.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
workspace_creation_request = WorkspaceCreationRequest()
include_item_access = False # bool (optional)
api_response = api_instance.create_workspace(visibility, workspace_creation_request, include_item_access=include_item_access)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the workspace being created; case is important. Available values: shared, personal. | [required] 
 **workspace_creation_request** | [**WorkspaceCreationRequest**](WorkspaceCreationRequest.md)| The workspace to be created. | [required] 
 **include_item_access** | **bool**| If true, includes the workspace item actions the user is permitted to perform in the response. Defaults to false. | [optional] [default to False]

### Return type

[**Workspace**](Workspace.md)

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | The workspace created. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **delete_item**
> DeletedEntityResponse deleteItem = delete_item(visibility, workspace_name, group_name, item_name)

[EXPERIMENTAL] DeleteItem: Delete an item from a workspace.

Delete an item from a workspace.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
workspace_name = 'workspace_name_example' # str
group_name = 'group_name_example' # str
item_name = 'item_name_example' # str
api_response = api_instance.delete_item(visibility, workspace_name, group_name, item_name)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the containing workspace; case is important. Available values: shared, personal. | [required] 
 **workspace_name** | **str**| The name of the workspace. | [required] 
 **group_name** | **str**| The group containing the item. | [required] 
 **item_name** | **str**| The name of the item. | [required] 

### Return type

[**DeletedEntityResponse**](DeletedEntityResponse.md)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The result of deleting a workspace item. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **delete_workspace**
> DeletedEntityResponse deleteWorkspace = delete_workspace(visibility, workspace_name, recurse=recurse)

[EXPERIMENTAL] DeleteWorkspace: Delete a workspace.

Delete a workspace.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
workspace_name = 'workspace_name_example' # str
recurse = False # bool (optional)
api_response = api_instance.delete_workspace(visibility, workspace_name, recurse=recurse)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the workspace; case is important. Available values: shared, personal. | [required] 
 **workspace_name** | **str**| The name of the workspace. | [required] 
 **recurse** | **bool**| If true, recursively delete items in the workspace. | [optional] [default to False]

### Return type

[**DeletedEntityResponse**](DeletedEntityResponse.md)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The result of deleting a workspace. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **get_item**
> WorkspaceItem getItem = get_item(visibility, workspace_name, group_name, item_name, as_at=as_at)

[EXPERIMENTAL] GetItem: Get a single workspace item.

Get a single workspace item.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
workspace_name = 'workspace_name_example' # str
group_name = 'group_name_example' # str
item_name = 'item_name_example' # str
as_at = '2013-10-20T19:20:30+01:00' # datetime (optional)
api_response = api_instance.get_item(visibility, workspace_name, group_name, item_name, as_at=as_at)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the containing workspace; case is important. Available values: shared, personal. | [required] 
 **workspace_name** | **str**| The name of the workspace. | [required] 
 **group_name** | **str**| The group containing the item. | [required] 
 **item_name** | **str**| The name of the item. | [required] 
 **as_at** | **datetime**| The datetime at which to request the workspace item. If not provided, defaults to &#39;latest&#39;. | [optional] 

### Return type

[**WorkspaceItem**](WorkspaceItem.md)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The workspace item requested. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **get_workspace**
> Workspace getWorkspace = get_workspace(visibility, workspace_name, as_at=as_at, include_item_access=include_item_access)

[EXPERIMENTAL] GetWorkspace: Get a workspace.

Get a workspace.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
workspace_name = 'workspace_name_example' # str
as_at = '2013-10-20T19:20:30+01:00' # datetime (optional)
include_item_access = False # bool (optional)
api_response = api_instance.get_workspace(visibility, workspace_name, as_at=as_at, include_item_access=include_item_access)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the workspace; case is important. Available values: shared, personal. | [required] 
 **workspace_name** | **str**| The workspace name. | [required] 
 **as_at** | **datetime**| The asAt datetime at which to retrieve workspaces. Defaults to &#39;latest&#39; if not specified. | [optional] 
 **include_item_access** | **bool**| If true, includes the workspace item actions the user is permitted to perform in the response. Defaults to false. | [optional] [default to False]

### Return type

[**Workspace**](Workspace.md)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The workspace. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **list_items**
> PagedResourceListOfWorkspaceItem listItems = list_items(visibility, workspace_name, as_at=as_at, page=page, sort_by=sort_by, limit=limit, filter=filter)

[EXPERIMENTAL] ListItems: List the items in a workspace.

List the items in a workspace.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
workspace_name = 'workspace_name_example' # str
as_at = '2013-10-20T19:20:30+01:00' # datetime (optional)
page = 'page_example' # str (optional)
sort_by = ['sort_by_example'] # List[str] (optional)
limit = 56 # int (optional)
filter = 'filter_example' # str (optional)
api_response = api_instance.list_items(visibility, workspace_name, as_at=as_at, page=page, sort_by=sort_by, limit=limit, filter=filter)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the containing workspace; case is important. Available values: shared, personal. | [required] 
 **workspace_name** | **str**| The item&#39;s workspace name. | [required] 
 **as_at** | **datetime**| The asAt datetime at which to retrieve workspace items. Defaults to &#39;latest&#39; if not specified. | [optional] 
 **page** | **str**| The pagination token to use to continue listing workspaces items from a previous call to list workspaces items.              This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields              must not have changed since the original request. | [optional] 
 **sort_by** | [**List[str]**](str.md)| A list of field names to sort by, each suffixed by \&quot; ASC\&quot; or \&quot; DESC\&quot;. | [optional] 
 **limit** | **int**| When paginating, limit the number of returned results to this many. | [optional] 
 **filter** | **str**| Expression to filter the result set. Read more about filtering results from LUSID here:              https://support.lusid.com/filtering-results-from-lusid. | [optional] 

### Return type

[**PagedResourceListOfWorkspaceItem**](PagedResourceListOfWorkspaceItem.md)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The items in a workspace. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **list_workspaces**
> PagedResourceListOfWorkspace listWorkspaces = list_workspaces(visibility, as_at=as_at, page=page, sort_by=sort_by, limit=limit, filter=filter, include_item_access=include_item_access)

[EXPERIMENTAL] ListWorkspaces: List workspaces.

List workspaces.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
as_at = '2013-10-20T19:20:30+01:00' # datetime (optional)
page = 'page_example' # str (optional)
sort_by = ['sort_by_example'] # List[str] (optional)
limit = 56 # int (optional)
filter = 'filter_example' # str (optional)
include_item_access = False # bool (optional)
api_response = api_instance.list_workspaces(visibility, as_at=as_at, page=page, sort_by=sort_by, limit=limit, filter=filter, include_item_access=include_item_access)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the workspaces; case is important. Available values: shared, personal. | [required] 
 **as_at** | **datetime**| The asAt datetime at which to retrieve workspaces. Defaults to &#39;latest&#39; if not specified. | [optional] 
 **page** | **str**| The pagination token to use to continue listing workspaces from a previous call to list workspaces.              This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields              must not have changed since the original request. | [optional] 
 **sort_by** | [**List[str]**](str.md)| A list of field names to sort by, each suffixed by \&quot; ASC\&quot; or \&quot; DESC\&quot;. | [optional] 
 **limit** | **int**| When paginating, limit the number of returned results to this many. | [optional] 
 **filter** | **str**| Expression to filter the result set. Read more about filtering results from LUSID here:              https://support.lusid.com/filtering-results-from-lusid. | [optional] 
 **include_item_access** | **bool**| If true, includes the workspace item actions the user is permitted to perform in the response. Defaults to false. | [optional] [default to False]

### Return type

[**PagedResourceListOfWorkspace**](PagedResourceListOfWorkspace.md)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The workspaces. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **search_items**
> PagedResourceListOfItemAndWorkspace searchItems = search_items(visibility, as_at=as_at, page=page, sort_by=sort_by, limit=limit, filter=filter)

[EXPERIMENTAL] SearchItems: List items across all workspaces.

List items across all workspaces.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
as_at = '2013-10-20T19:20:30+01:00' # datetime (optional)
page = 'page_example' # str (optional)
sort_by = ['sort_by_example'] # List[str] (optional)
limit = 56 # int (optional)
filter = 'filter_example' # str (optional)
api_response = api_instance.search_items(visibility, as_at=as_at, page=page, sort_by=sort_by, limit=limit, filter=filter)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the containing workspace; case is important. Available values: shared, personal. | [required] 
 **as_at** | **datetime**| The asAt datetime at which to retrieve workspace items. Defaults to &#39;latest&#39; if not specified. | [optional] 
 **page** | **str**| The pagination token to use to continue listing workspaces items from a previous call to list workspaces items.              This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields              must not have changed since the original request. | [optional] 
 **sort_by** | [**List[str]**](str.md)| A list of field names to sort by, each suffixed by \&quot; ASC\&quot; or \&quot; DESC\&quot;. | [optional] 
 **limit** | **int**| When paginating, limit the number of returned results to this many. | [optional] 
 **filter** | **str**| Expression to filter the result set. Read more about filtering results from LUSID here:              https://support.lusid.com/filtering-results-from-lusid. | [optional] 

### Return type

[**PagedResourceListOfItemAndWorkspace**](PagedResourceListOfItemAndWorkspace.md)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Items across all workspaces. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **update_item**
> WorkspaceItem updateItem = update_item(visibility, workspace_name, group_name, item_name, workspace_item_update_request=workspace_item_update_request)

[EXPERIMENTAL] UpdateItem: Update an item in a workspace.

Update an item in a workspace.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
workspace_name = 'workspace_name_example' # str
group_name = 'group_name_example' # str
item_name = 'item_name_example' # str
workspace_item_update_request = WorkspaceItemUpdateRequest()
api_response = api_instance.update_item(visibility, workspace_name, group_name, item_name, workspace_item_update_request=workspace_item_update_request)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the containing workspace; case is important. Available values: shared, personal. | [required] 
 **workspace_name** | **str**| The workspace name. | [required] 
 **group_name** | **str**| The group containing the item. | [required] 
 **item_name** | **str**| The item name. | [required] 
 **workspace_item_update_request** | [**WorkspaceItemUpdateRequest**](WorkspaceItemUpdateRequest.md)| The new item details. | [optional] 

### Return type

[**WorkspaceItem**](WorkspaceItem.md)

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The workspace item updated. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

---

# **update_workspace**
> Workspace updateWorkspace = update_workspace(visibility, workspace_name, workspace_update_request, include_item_access=include_item_access)

[EXPERIMENTAL] UpdateWorkspace: Update a workspace.

Update a workspace.

### Example

```python
api_instance = api_client_factory.build(WorkspaceApi)
visibility = 'visibility_example' # str
workspace_name = 'workspace_name_example' # str
workspace_update_request = WorkspaceUpdateRequest()
include_item_access = False # bool (optional)
api_response = api_instance.update_workspace(visibility, workspace_name, workspace_update_request, include_item_access=include_item_access)
pprint(api_response)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **visibility** | **str**| The visibility for the workspace; case is important. Available values: shared, personal. | [required] 
 **workspace_name** | **str**| The workspace name. | [required] 
 **workspace_update_request** | [**WorkspaceUpdateRequest**](WorkspaceUpdateRequest.md)| The new workspace details. | [required] 
 **include_item_access** | **bool**| If true, includes the workspace item actions the user is permitted to perform in the response. Defaults to false. | [optional] [default to False]

### Return type

[**Workspace**](Workspace.md)

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json
 - **Accept**: text/plain, application/json, text/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The workspace updated. |  -  |
**400** | The details of the input related failure |  -  |
**0** | Error response |  -  |

[Back to top](#) · [Back to API list](../../api_endpoints.md) · [Back to Model list](../../models.md) · [Back to README](../../../README.md)

