Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/content/en/latest/workspace/workspaces/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ Manage workspaces. Entity and Declarative methods are supported.
* [delete_workspace](./delete_workspace/)
* [list_workspaces](./list_workspaces/)

### Workspace Setting Methods

* [list_workspace_settings](./list_workspace_settings/)
* [get_workspace_setting](./get_workspace_setting/)
* [create_or_update_workspace_setting](./create_or_update_workspace_setting/)
* [delete_workspace_setting](./delete_workspace_setting/)

### Custom Application Setting Methods

* [list_custom_application_settings](./list_custom_application_settings/)
* [get_custom_application_setting](./get_custom_application_setting/)
* [create_or_update_custom_application_setting](./create_or_update_custom_application_setting/)
* [delete_custom_application_setting](./delete_custom_application_setting/)

### Declarative Methods

* [get_declarative_workspace](./get_declarative_workspace/)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "create_or_update_custom_application_setting"
linkTitle: "create_or_update_custom_application_setting"
weight: 320
superheading: "catalog_workspace."
api_ref: "CatalogWorkspaceService.create_or_update_custom_application_setting"
---



``create_or_update_custom_application_setting(workspace_id: str, custom_application_setting: CatalogCustomApplicationSetting)``

Creates a new custom application setting or overwrites an existing one with the same id.

If the setting has no id, the server generates one. The generated id is not returned and is not assigned to the setting object, so calling the method again with the same id-less setting creates another setting. To update or delete the setting later, either supply an explicit id or look the generated id up with [list_custom_application_settings](../list_custom_application_settings/).

{{% parameters-block title="Parameters" %}}
{{< parameter p_name="workspace_id" p_type="string" >}}
Workspace identification string e.g. "demo"
{{< /parameter >}}
{{< parameter p_name="custom_application_setting" p_type="CatalogCustomApplicationSetting" >}}
Custom application setting object to be created or updated. `content` can be any JSON object.
{{< /parameter >}}
{{% /parameters-block %}}

{{% parameters-block title="Returns" %}}
{{< parameter p_type="UpsertOutcome" >}}
CREATED if the setting did not exist yet, UPDATED if it did.
{{< /parameter >}}
{{% /parameters-block %}}

## Example

```python
from gooddata_sdk import CatalogCustomApplicationSetting

setting = CatalogCustomApplicationSetting(
id="my_app_version",
application_name="my_app",
content={"version": "1.2.0"},
)
sdk.catalog_workspace.create_or_update_custom_application_setting(
workspace_id="demo", custom_application_setting=setting
)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: "create_or_update_workspace_setting"
linkTitle: "create_or_update_workspace_setting"
weight: 220
superheading: "catalog_workspace."
api_ref: "CatalogWorkspaceService.create_or_update_workspace_setting"
---



``create_or_update_workspace_setting(workspace_id: str, workspace_setting: CatalogWorkspaceSetting)``

Creates a new workspace setting or overwrites an existing workspace setting with the same id.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

The setting must have an explicit id. Creating a setting whose id is left as the default `None` currently fails.

{{% parameters-block title="Parameters" %}}
{{< parameter p_name="workspace_id" p_type="string" >}}
Workspace identification string e.g. "demo"
{{< /parameter >}}
{{< parameter p_name="workspace_setting" p_type="CatalogWorkspaceSetting" >}}
Workspace setting object to be created or updated.
{{< /parameter >}}
{{% /parameters-block %}}

{{% parameters-block title="Returns" %}}
{{< parameter p_type="UpsertOutcome" >}}
CREATED if the setting did not exist yet, UPDATED if it did.
{{< /parameter >}}
{{% /parameters-block %}}

## Example

```python
from gooddata_sdk import CatalogWorkspaceSetting

setting = CatalogWorkspaceSetting(id="locale", setting_type="LOCALE", content={"value": "fr-FR"})
sdk.catalog_workspace.create_or_update_workspace_setting(workspace_id="demo", workspace_setting=setting)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "delete_custom_application_setting"
linkTitle: "delete_custom_application_setting"
weight: 330
superheading: "catalog_workspace."
api_ref: "CatalogWorkspaceService.delete_custom_application_setting"
---



``delete_custom_application_setting(workspace_id: str, custom_application_setting_id: str)``

Deletes a custom application setting. Deleting a setting that does not exist does nothing.

{{% parameters-block title="Parameters" %}}
{{< parameter p_name="workspace_id" p_type="string" >}}
Workspace identification string e.g. "demo"
{{< /parameter >}}
{{< parameter p_name="custom_application_setting_id" p_type="string" >}}
Custom application setting identification string e.g. "my_app_version"
{{< /parameter >}}
{{% /parameters-block %}}

{{% parameters-block title="Returns" None="yes" %}}
{{% /parameters-block %}}

## Example

```python
sdk.catalog_workspace.delete_custom_application_setting(workspace_id="demo", custom_application_setting_id="my_app_version")
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "delete_workspace_setting"
linkTitle: "delete_workspace_setting"
weight: 230
superheading: "catalog_workspace."
api_ref: "CatalogWorkspaceService.delete_workspace_setting"
---



``delete_workspace_setting(workspace_id: str, workspace_setting_id: str)``

Deletes a workspace setting. Deleting a setting that does not exist does nothing.

{{% parameters-block title="Parameters" %}}
{{< parameter p_name="workspace_id" p_type="string" >}}
Workspace identification string e.g. "demo"
{{< /parameter >}}
{{< parameter p_name="workspace_setting_id" p_type="string" >}}
Workspace setting identification string e.g. "locale"
{{< /parameter >}}
{{% /parameters-block %}}

{{% parameters-block title="Returns" None="yes" %}}
{{% /parameters-block %}}

## Example

```python
sdk.catalog_workspace.delete_workspace_setting(workspace_id="demo", workspace_setting_id="locale")
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "get_custom_application_setting"
linkTitle: "get_custom_application_setting"
weight: 310
superheading: "catalog_workspace."
api_ref: "CatalogWorkspaceService.get_custom_application_setting"
---



``get_custom_application_setting(workspace_id: str, custom_application_setting_id: str)``

Gets an individual custom application setting.

{{% parameters-block title="Parameters" %}}
{{< parameter p_name="workspace_id" p_type="string" >}}
Workspace identification string e.g. "demo"
{{< /parameter >}}
{{< parameter p_name="custom_application_setting_id" p_type="string" >}}
Custom application setting identification string e.g. "my_app_version"
{{< /parameter >}}
{{% /parameters-block %}}

{{% parameters-block title="Returns" %}}
{{< parameter p_type="CatalogCustomApplicationSetting" >}}
Custom application setting object.
{{< /parameter >}}
{{% /parameters-block %}}

## Example

```python
setting = sdk.catalog_workspace.get_custom_application_setting(workspace_id="demo", custom_application_setting_id="my_app_version")
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "get_workspace_setting"
linkTitle: "get_workspace_setting"
weight: 210
superheading: "catalog_workspace."
api_ref: "CatalogWorkspaceService.get_workspace_setting"
---



``get_workspace_setting(workspace_id: str, workspace_setting_id: str)``

Gets an individual workspace setting.

{{% parameters-block title="Parameters" %}}
{{< parameter p_name="workspace_id" p_type="string" >}}
Workspace identification string e.g. "demo"
{{< /parameter >}}
{{< parameter p_name="workspace_setting_id" p_type="string" >}}
Workspace setting identification string e.g. "locale"
{{< /parameter >}}
{{% /parameters-block %}}

{{% parameters-block title="Returns" %}}
{{< parameter p_type="CatalogWorkspaceSetting" >}}
Workspace setting object.
{{< /parameter >}}
{{% /parameters-block %}}

## Example

```python
setting = sdk.catalog_workspace.get_workspace_setting(workspace_id="demo", workspace_setting_id="locale")
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "list_custom_application_settings"
linkTitle: "list_custom_application_settings"
weight: 300
superheading: "catalog_workspace."
api_ref: "CatalogWorkspaceService.list_custom_application_settings"
---



``list_custom_application_settings(workspace_id: str)``

Lists the settings of all custom applications in a workspace.

{{% parameters-block title="Parameters" %}}
{{< parameter p_name="workspace_id" p_type="string" >}}
Workspace identification string e.g. "demo"
{{< /parameter >}}
{{% /parameters-block %}}

{{% parameters-block title="Returns" %}}
{{< parameter p_type="list[CatalogCustomApplicationSetting]" >}}
List of custom application settings.
{{< /parameter >}}
{{% /parameters-block %}}

## Example

```python
settings = sdk.catalog_workspace.list_custom_application_settings(workspace_id="demo")

# Keep only the settings of one application
my_app_settings = [s for s in settings if s.application_name == "my_app"]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "list_workspace_settings"
linkTitle: "list_workspace_settings"
weight: 200
superheading: "catalog_workspace."
api_ref: "CatalogWorkspaceService.list_workspace_settings"
---



``list_workspace_settings(workspace_id: str)``

Lists all settings of a workspace.

{{% parameters-block title="Parameters" %}}
{{< parameter p_name="workspace_id" p_type="string" >}}
Workspace identification string e.g. "demo"
{{< /parameter >}}
{{% /parameters-block %}}

{{% parameters-block title="Returns" %}}
{{< parameter p_type="list[CatalogWorkspaceSetting]" >}}
List of workspace settings.
{{< /parameter >}}
{{% /parameters-block %}}

## Example

```python
settings = sdk.catalog_workspace.list_workspace_settings(workspace_id="demo")
```
5 changes: 5 additions & 0 deletions packages/gooddata-sdk/src/gooddata_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@
CatalogDeclarativeWorkspaceModel,
CatalogDeclarativeWorkspaces,
)
from gooddata_sdk.catalog.workspace.entity_model.content_objects.custom_application_setting import (
CatalogCustomApplicationSetting,
)
from gooddata_sdk.catalog.workspace.entity_model.content_objects.dataset import (
CatalogAttribute,
CatalogDataset,
Expand Down Expand Up @@ -411,6 +414,7 @@
"CatalogContentSlideTemplate": "gooddata_sdk.catalog.organization.common.slide_template",
"CatalogCoverSlideTemplate": "gooddata_sdk.catalog.organization.common.slide_template",
"CatalogCspDirective": "gooddata_sdk.catalog.organization.entity_model.directive",
"CatalogCustomApplicationSetting": "gooddata_sdk.catalog.workspace.entity_model.content_objects.custom_application_setting",
"CatalogDashboardAssigneeIdentifier": "gooddata_sdk.catalog.permission.declarative_model.manage_dashboard_permissions",
"CatalogDashboardPermissions": "gooddata_sdk.catalog.permission.declarative_model.dashboard_permissions",
"CatalogDashboardSlidesTemplate": "gooddata_sdk.catalog.organization.common.dashboard_slides_template",
Expand Down Expand Up @@ -684,6 +688,7 @@
"CatalogContentSlideTemplate",
"CatalogCoverSlideTemplate",
"CatalogCspDirective",
"CatalogCustomApplicationSetting",
"CatalogDashboardAssigneeIdentifier",
"CatalogDashboardPermissions",
"CatalogDashboardSlidesTemplate",
Expand Down
Loading
Loading