Hello Folks, I'm trying to implement the Workspac...
# gooddata-cloud
v
Hello Folks, I'm trying to implement the Workspace data filters and able to work it out following the steps at https://www.gooddata.com/docs/cloud/workspaces/workspace-data-filters/#set-up-workspace-data-filters. It says 3 main steps for 1st and 2nd there is an API way to do so, then it says to configure via UI from step 3 - Open your parent workspace in the LDM modeler and Edit it. Is there any way to implement step 3 onwards via API ?
m
Hello Vinod, I am afraid this is not documented. Could you please provide details about your use case? What are you trying to achieve by fully setting the WDF via the API? Generally speaking, the LDM declarative API can be found in our Apiary here: https://www.gooddata.com/docs/cloud/api-and-sdk/api/api_reference_all/#tag/LDM-Declarative-APIs. I would suggest finishing first the set up via the UI as advised in our documentation and then checking the definition of WDFs in the model json so you can emulate the set up via the API. Below is a screenshot of how the definition looks in the definition:
v
@Moises Morales I'm working on a multitenant app where users are created in a oidc(Keycloak) and a workspace is created for every entity with restricted data hence while org creation I want to automate the workspace created via the parent child and then apply wdf on the same
1
@Moises Morales While we are discussing this can WDF be a logical combination like AND /OR etc ?
m
@Vinod I am afraid these operators are not allowed at the moment
v
Thanks @Moises Morales for the confirmation a quick question here while settings values for single data filter eg in CURL
Copy code
curl $HOST_URL/api/v1/entities/workspaces/<child-workspace-id>/workspaceDataFilterSettings \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/vnd.gooddata.api+json" \
  -X POST -d '
{
  "data": {
    "id": "<data-filter-setting-id>",
    "type": "workspaceDataFilterSetting",
    "attributes": {
      "filterValues": [
        "<filter-value>"
      ],
      "title": "<data-filter-condition-name>"
    },
    "relationships": {
      "workspaceDataFilter": {
        "data": {
          "id": "<data-filter-id>",
          "type": "workspaceDataFilter"
        }
      }
    }
  }
}
  '
The value
Copy code
"filterValues": [
        "<filter-value>"
] when multiple filter value is supplied I believe its union like file can be any one of the values passed ?
m
I am not sure I follow your question, but the array can be defined as a list of values. You can find an example on this thread: https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1718643183764199