Api version response empty

Hi

From version 18.1 and up when i make an api call “system/package/” with librouteros version returns an empty string.
Before 18.1 it returned
[True, {‘.id’: ‘*9’, ‘name’: ‘user-manager’, ‘version’: ‘7.9’, ‘scheduled’: ‘’, ‘size’: ‘376977’, ‘available’: ‘True’, ‘disabled’: ‘True’}]

After the upgrade it returns
[True, {‘.id’: ‘*9’, ‘name’: ‘user-manager’, ‘version’: ‘’, ‘scheduled’: ‘’, ‘size’: ‘376977’, ‘available’: ‘True’, ‘disabled’: ‘True’}]


Thanks in advanced

So what would be the point of this topic?

i think you must try on latest beta version, if it still happen post this on official beta version topic

http://forum.mikrotik.com/t/v7-19beta-testing-is-released/182323/1

It’s not very clear, but I think they’re hitting the caveat I believe you yourself pointed out before - they’re basically running a “print” then checking the first item returned in the reply, but don’t include the filter for “routeros” package, so get an arbitrary package’s data as the “first item”.
And now result looks different, I guess as a side effect of the new feature of listing also packages available for download.

You may be right that it’s related to recent changes. And I bet API would return version if you did a check-for-update request beforehand.

But if the user-manager package was installed, the version is in the NPK… so it should be populated in all cases.

Hi

Thanks for the replies

Problem does not exist in mikrotik installed on a vm

[
    True,
    {
        '.id': '*4',
        'name': 'routeros',
        'version': '7.18.2',
        'build-time': '2025-03-11 11:59:04',
        'scheduled': '',
        'size': '19223361',
        'available': 'False',
        'disabled': 'False'
    }
]

It exists on CRS125-24G-1S-2HnD updated in 7.18.2

[True, {'.id': '*9', 'name': 'user-manager', 'version': '', 'scheduled': '', 'size': '376977', 'available': 'True', 'disabled': 'True'}]

Router RB951Ui-2HnD
The problem does not exist

[True, {'.id': '*1', 'name': 'routeros', 'version': '7.12.1', 'build-time': '2023-11-17 11:38:45', 'scheduled': '', 'disabled': 'False'}]

After upgrading 7.18.2

[True, {'.id': '*9', 'name': 'user-manager', 'version': '', 'scheduled': '', 'size': '376977', 'available': 'True', 'disabled': 'True'}]

Router RBwAPGR-5HacD2HnD

[True, {'.id': '*10', 'name': 'zerotier', 'version': '', 'scheduled': '', 'size': '790673', 'available': 'True', 'disabled': 'True'}]

After upgrading to 7.19beta5 same thing happens

[True, {'.id': '*10', 'name': 'zerotier', 'version': '', 'scheduled': '', 'size': '786577', 'available': 'True', 'disabled': 'True'}]

The problem is that it does not returns all the packages and it returns only the last one.
That is also disabled after upgrading from 7.12.1 and i have no way to remove it from packages also.
In the disabled packages the version is empty.

The “routeros” package may be treated differently the extra-packages (which is the part that changed)… so CHR show a version in all versions is not surprising. What MAY be a minor issue is that if user-manager NPK is installed, hardware or virtual, the version= should be populated based on the FILE, from the new code that gets the list of available packages as part of a check-for-update.

Now for uninstalled packages, version= being blank does not seem unreasonable. But the package is installed, it should read the version from extra-package NPK file, and version= should NOT be blank for any INSTALLED package. Or at least that the way I look at this.

You are right. The solution is to return all packages and also to be able to remove disabled packages

Sorry eventually the problem was with my script.
It works as expected.
I was getting only the last record and after update from 7.12 the last record version was blank because it is disabled