I made this request: ````curl --location --reques...
# gooddata-cn
s
I made this request:
Copy code
`curl --location --request POST '<https://baseurl/api/v1/entities/workspaces/md_state_3/workspaceDataFilters>' \
--header 'Content-Type: application/vnd.gooddata.api+json' \
--header 'Accept: application/vnd.gooddata.api+json' \
--header 'Authorization: Bearer xxx' \
--header 'Cookie: \
--data-raw '{
  "data": {
    "attributes": {
      "columnName": "string",
      "description": "string",
      "title": "string"
    },
    "id": "id1",
    "relationships": {
      "filterSettings": {
        "data": [
          {
            "id": "string",
            "type": "workspaceDataFilterSetting"
          }
        ]
      }
    },
    "type": "workspaceDataFilter"
  }
}'
And I'm getting
Copy code
{
  "detail": "Persisting 'to many' entity relationships is not supported yet. Property 'WorkspaceDataFilter.filterSettings' must not be filled during the operation.",
  "status": 400,
  "title": "Bad Request",
  "traceId": "128296d222f95562"
}
Any idea what's going on?
i
Hi Sheila, May I know what exactly are you trying to achieve, please?
s
I'm creating a data filter
following this example here
i
j
Hi Sheila, create filters including their settings through this entity API is not yet supported, only GET is possible. You have to store filters with their settings through the declarative API - /api/v1/layout/workspaceDataFilters. cc: @Lubos Hilse @Andrey Skripnikov - is the entity API for workspace data filter settings already on our roadmap?
s
I see. My issue with the PUT endpoint of /api/v1/layout/workspaceDataFilters is that it overwrites everything that already exists.
This makes automation a bit tricky and potentially faulty
j
For now, I recommend to store declarative definitions in a git repository and deliver it only from a pipeline on top of this repository.