How to delete all data via shared bulk job

I have…

  • Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
  • Used code blocks with ``` to format my code examples like JSON or logs properly.

I’m submitting a…

  • Regression (a behavior that stopped working in a new release)
  • Bug report
  • Performance issue
  • Documentation issue or request

I trie to make a request via Postman to https://cms.example.com/api/content/example-app/bulk like it is described in the “shared” section of the content API and here [IMPLEMENTED] Bulk multiple contents update - #5 by Sebastian.
Body of my request:

{
  "jobs": [
    {
      "query": {
        "filter": {
            "path": "created",
            "op": "lt",
            "value": "2024-07-31T00:00:00Z"
        }
      },
      "type": "Delete",
      "permanent": true
    }
  ]
}

Current behavior

I get an validation error and cant figure out what I am doing wrong.

{
    "message": "Validation error",
    "traceId": "00-2b478c6bfbae93c54f27629cdc07ae52-db1460ede4ec12a1-01",
    "type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
    "details": [
        "Request body has an invalid format."
    ],
    "statusCode": 400
}

Expected behavior

No error and all data on all schemas deleted that was created before 2024-07-31.

Minimal reproduction of the problem

Create one app with 2 schema and some content. Try do delete everything before a certain timestamp.

Environment

App Name:

  • Self hosted with docker
  • Self hosted with IIS
  • Self hosted with other version
  • Cloud version

Version: [VERSION]

Browser:

  • Chrome (desktop)
  • Chrome (Android)
  • Chrome (iOS)
  • Firefox
  • Safari (desktop)
  • Safari (iOS)
  • IE
  • Edge

Others:
I am using the API with Postman. Client is owner of the app with all rights.

Looks okay for me. Weird that there is no detail. I have to investigate it.

1 Like

Thanks a lot. If I can provide any help just let me know.

As I forgot to add the Squidex version, we are on 7.18.0.0

Are you sure you are using the correct endpoint?

My app is called algolia, I had to test something

Oh I fixed the problem or found the issue.

When I created the request in postman, I duplicated an existing one. But this request had the Content-Length header disabled. Now I created a new request from scratch and postman added that header automatically.
With the header, the request on /api/content/example-app/example-schema/bulk just works. If no schema given in the url, it does not work with an 404 Object not found, so I guess that endpoint is only “abstract” or something? Here is the endpoint i try to use

Using the bulk endpoints of the schema works for me and I can achieve what I want.

Many thanks for your help!