Project

General

Profile

Actions

Bug #2625

closed

API: Empty count in /type_tree/ endpoint

Added by Katharina Wünsche 3 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Start date:
2025-09-22
Estimated time:
Found in version:

Description

The `/type_tree/` endpoint currently returns `count: 0` for all types, even if they are actually assigned to entities and should have a count higher than 0. Would it be possible to set the count to the number of affected entities or introduce a new property in this endpoint that matches the described count value?

Update: We also just realized that the schema of the endpoint is slightly wrong: it defines the key type_tree which is spelled typeTree in the actual response.


Related issues 1 (0 open1 closed)

Related to OpenAtlas - Feature #2626: API: 4.10.0ClosedBernhard Koschiček-Krombholz2025-09-24Actions
Actions #1

Updated by Bernhard Koschiček-Krombholz 3 months ago

  • Status changed from New to Acknowledged
  • Assignee set to Bernhard Koschiček-Krombholz
  • Target version set to 8.15.0
Actions #2

Updated by Katharina Wünsche 3 months ago

  • Description updated (diff)
Actions #3

Updated by Bernhard Koschiček-Krombholz 3 months ago

  • Status changed from Acknowledged to Assigned
Actions #4

Updated by Bernhard Koschiček-Krombholz 3 months ago

  • Status changed from Assigned to Closed

The problem was just a trailing */* behind the URL, that was why the count wasn't called from the database.

I updated the openapi file with the correct key.

Changes are in develop branch.

Actions #5

Updated by Bernhard Koschiček-Krombholz 3 months ago

Actions #6

Updated by Bernhard Koschiček-Krombholz 3 months ago

  • Tracker changed from Question to Bug
Actions #7

Updated by Alexander Watzinger about 1 month ago

  • Subject changed from Empty count in /type_tree/ endpoint to API: Empty count in /type_tree/ endpoint
Actions

Also available in: Atom PDF