[IMPLEMENTED] Add IsDeleted flag to content API

I have…

I’m submitting a…

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

Current behavior

We are trying to change the status for a content, from “Published” to “Archived” via the Content API. We are sending this request:

PUT https://cloud.squidex.io/api/content/zubale-jobs/jobs/6cf9fef3-6b26-4f7b-9c58-df80cd50ae3c/status

{
"status": "Archived",
"dueTime": null,
"checkReferrers": false
}

The response we are getting is:

{
  "message": "Entity (3a653e51-820f-4eb3-b976-9dc3053451e4--6cf9fef3-6b26-4f7b-9c58-df80cd50ae3c) has been deleted.",
  "errorCode": "OBJECT_DELETED",
  "traceId": "00-54eb4487f41f479c42953f14cb315bdd-97e99adc909ffb93-01",
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.9",
  "statusCode": 410
}

Seems like is searching for another entity based on the key it complains about (?). Is there an error on the request playload? I tried to play with the dueTime and checkReferrers fields, but got the same outcome.

If we run:

GET https://cloud.squidex.io/api/content/zubale-jobs/jobs/6cf9fef3-6b26-4f7b-9c58-df80cd50ae3c

Works just fine, the desired content is retrieved.

Expected behavior

Content status gets changed to Archived; using the web ui works fine, but we would like to automate this.

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [X] Cloud version

Version: [VERSION]

For me it seems that the content has been deleted 19 hours ago. You can retrieve it via the UI and this is probably a bug, but it seems to be deleted.

image

Ahh! I was checking the status of that particular one, in the API comes as Published.

GET https://cloud.squidex.io/api/content/zubale-jobs/jobs/6cf9fef3-6b26-4f7b-9c58-df80cd50ae3c

  "created": "2021-11-03T21:32:35Z",
  "lastModified": "2021-11-04T00:07:44Z",
  "status": "Published",
  "statusColor": "#4bb958",

I don’t see any other field that reflects this content has been deleted.

Thank you for checking.

Do you use the X-Unpublished flag/header?

I have changed this to a feature request. I will add the flag.

You are right, I had the header X-Unpublished. After removing it, it correctly reports the content is not found.

{
  "traceId": "00-3feee7c0cb25a0b53975170c5e424461-520e8a0727d29b8b-01",
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
  "statusCode": 404
}

Gotta blame cloning requests in Postman :c

No problem, it is definitely a big missing point that there is no such a flag. I will add it as I mentioned.

Thank you for pointing this out.

1 Like

Hi, it has been implemented a few weeks ago. Sorry for not updating the task.

This topic was automatically closed after 2 days. New replies are no longer allowed.