Bugs
Under Consideration

API returns duplicate objects while the UI shows only one — potentially deleted objects still accessible

The Anytwo API returns two distinct objects for the same imported post, while the interface shows only one.

I am concerned that previously deleted objects may still be stored and returned by the API, even though they are no longer visible in the interface or the trash. If confirmed, this would be a serious issue with deletion reliability.

Example in the shared space

Space: Espace propre
Collection: AnySay
Title: How to edit the own posts here?

The API returns these two Anytwo object IDs:

bafyreigbbtvs345cnpnaquzb3f7qcj7ognztzh4eaaoofdp7zmqrv2psku
bafyreibiby6jwl4ebrizj5oig7clw53avovnzpefbkuzeq3vmhhf7xrmti

Both contain the same external Quackback post ID in the collection’s Identifiant property:

post_01m37nte7nfvpscqagkwqnfvsd

Both have the same title, author (code-jack), state (closed), and collection membership. Their creation timestamps differ:

  • First object: 2026-10-05T19:47:34.000Z
  • Second object: 2026-10-06T15:51:40.000Z

The interface shows only one matching object, and the trash is empty. This space is shared with your team, so you should be able to investigate both object IDs directly.

How to reproduce

Query the collection through the API, following pagination:

POST /v1/spaces/{spaceId}/objects/query
Content-Type: application/json

{
"filter": {
"any.collections": "bafyreidlqd2zog73vxv3dpyrex5oeje5mcun6dzjyeqgpwpfyb737avtfm"
},
"limit": 200,
"offset": 0
}

Search the results for the two object IDs above, then compare them with the objects visible in the AnySay collection.

Actual result

The API export contains both objects. Neither exported record contains an explicit deletion or archive flag explaining why only one is visible.

More broadly, the query returned 865 records, whereas the interface shows fewer than 800 objects.

Expected result

The API and interface should agree on which objects currently exist in the collection. If the API intentionally includes deleted or otherwise hidden objects, their status should be explicitly exposed so clients can distinguish them from active objects.

Could you check whether these are deleted objects still returned by the API, stale records, or objects hidden for another reason? In particular, please confirm whether deletion removes the object as intended, or whether its data remains accessible through the API.

3 Comments

Sign in to comment

T
tolya·10/26/2026

Thanks for the detailed report, the ids and the query made this easy to check.

We reproduced your steps on a test server and could not make the API return a deleted object. When an object is permanently deleted (emptying the trash, or DELETE

/v1/spaces/{spaceId}/objects/{objectId}), its row leaves the objects collection at once and objects/query no longer returns it. GET /v1/spaces/{spaceId}/objects/{objectId} answers 410 object.deleted for such an id. There is no flag to filter on because the row does not exist any more, and includeDeleted is not accepted on this endpoint. Deletion reliability is not the issue here.

Both of your ids are therefore live objects in the store the API served. The two creation dates (Oct 5 and Oct 6) match two import runs: the import does not de-duplicate on the Identifiant property, so a second run creates a second object per post.

What the interface hides is narrower than it looks. The collection table adds one filter the API does not: it drops rows whose any.collections contains bin (moved to trash) or template. That membership is not a separate flag. It is an extra id in the same any.collections array as the AnySay collection id, together with a bin.movedAt timestamp. Could you check the two records for that?

To pin this down, three things would help:

1. Run GET /v1/spaces/{spaceId}/objects/{objectId} for both ids on the same server the app uses. 200 for both means both are live and should be in the table; 410 for one means it was deleted and your API client talked to a device that had not yet synced the delete.

2. Is the API you query the desktop app's own local server, or a separate instance (for example on the machine that runs the import)? Two instances can disagree for a while after a delete.

3. Repeat the count with "includeTotal": true and a sort, for example ["-createdAt"]. total is the real match count. Offset paging without a sort is an arbitrary page order and can double-count or skip rows. Add {"any.collections": {"$nin": ["bin", "template"]}} to the filter to get the same set the table shows.

If both ids are 200 and neither carries bin or template, send us the raw records and we will dig into the table view.

S
Shampra·10/26/2026

I checked the trash and searched for the ID across the entire workspace, which returned only one result. It turns out this was my mistake—I must have been testing in the wrong workspace. In my efforts to figure out why there’s a discrepancy for CodeJack, I’ve ended up making a bit of a mess of my workspaces... my apologies! I think we can close this out; I’ll keep digging, and if necessary, I’ll open a new ticket (with all the relevant details).

T
tolya·10/26/2026

thanks!