Skip to content

API: Department users_count returned as a string #18148

@Iizuki

Description

@Iizuki

Summary

The /departments API returns the users_count field as a stringified int. It should be a plain int instead.

Example

Here's what it looks like currently:

GET /departments/999

{
  "id": 999,
  "name": "Example Department",
  "phone": null,
  "fax": null,
  "image": null,
  "company": null,
  "manager": null,
  "location": null,
  "users_count": "5",
  "notes": null,
  "created_at": {
    "datetime": "2025-08-06 00:00:16",
    "formatted": "06.08.2025 00:00"
  },
  "updated_at": {
    "datetime": "2025-08-06 00:00:16",
    "formatted": "06.08.2025 00:00"
  },
  "available_actions": {
    "update": true,
    "delete": true
  }
}

Version

Snipe-IT 8.3.4 with the official container image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions