Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,18 @@ def list_workspace_settings(self, workspace_id: str) -> list[CatalogWorkspaceSet
workspace_settings = load_all_entities(get_workspace_settings).data
return [CatalogWorkspaceSetting.from_api(ws) for ws in workspace_settings]

def register_workspace_upload_notification(self, workspace_id: str) -> None:
"""Invalidate cache of computed reports in a workspace to force recomputation with new data.

Args:
workspace_id (str):
Workspace identification string e.g. "demo"

Returns:
None
"""
self._actions_api.register_workspace_upload_notification(workspace_id)

def resolve_all_workspace_settings(self, workspace_id: str) -> dict:
"""Resolve values for all settings in a workspace.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
interactions:
- request:
body: null
headers:
Accept-Encoding:
- br, gzip, deflate
Content-Type:
- application/json
X-GDC-VALIDATE-RELATIONS:
- 'true'
X-Requested-With:
- XMLHttpRequest
method: POST
uri: http://localhost:3000/api/v1/actions/workspaces/demo/uploadNotification
response:
body:
string: ''
headers:
DATE: &id001
- PLACEHOLDER
Expires:
- '0'
Pragma:
- no-cache
X-Content-Type-Options:
- nosniff
X-GDC-TRACE-ID: *id001
status:
code: 204
message: No Content
version: 1
Original file line number Diff line number Diff line change
Expand Up @@ -1032,3 +1032,10 @@ def test_layout_filter_views(test_config):
assert filter_views_expected == filter_views_o
finally:
safe_delete(sdk.catalog_workspace.put_declarative_filter_views, workspace_id, [])


@gd_vcr.use_cassette(str(_fixtures_dir / "register_workspace_upload_notification.yaml"))
def test_register_workspace_upload_notification(test_config):
sdk = GoodDataSdk.create(host_=test_config["host"], token_=test_config["token"])
# Calling register_workspace_upload_notification should succeed (HTTP 204, no body)
sdk.catalog_workspace.register_workspace_upload_notification(test_config["workspace"])
Loading