API ports message": "Server Error"

Hello,

The API call curl -H ‘X-Auth-Token: YOURAPITOKENHERE’ https://foo.example/api/v0/ports/323 isn’t working.
I’m getting the error message “message”: “Server Error”

Could you help me ?

Thanks community

Output of ./validate.php

==========================================
Component | Version
--------- | -------
LibreNMS  | 26.9.0-dev.79+33721d1c8f (2026-09-07T07:16:15+00:00)
DB Schema | 2026_07_30_162514_add_device_refresh_config_permission (397)
PHP       | 8.5.10
Python    | 3.11.2
Database  | MariaDB 10.11.18-MariaDB-0+deb12u1
RRDTool   | 1.7.2
SNMP      | 5.9.3
===========================================

[OK]    Composer Version: 2.9.8
[OK]    Dependencies up-to-date.
[OK]    Database Connected
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]    Database and column collations are correct
[OK]    Database schema correct
[OK]    MySQL and PHP time match
[OK]    Active pollers found
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[OK]    Python poller wrapper is polling
[OK]    Redis is unavailable
[OK]    No errors found with polling frequencies.
[OK]    rrd_dir is writable
[OK]    rrdtool version ok
[WARN]  Your local git contains modified files, this could prevent automatic updates.
	[FIX]: 
	You can fix this with ./scripts/github-remove
	Modified Files:
	 app/Http/Controllers/Maps/MapDataController.php
	 app/View/Components/Device/PageTabs.php
	 composer.json
	 composer.lock
	 html/js/librenms.js
	 resources/views/map/fullscreen.blade.php
	 rrd/.gitignore

What was the last working version of LibreNMS?

26.8.1

Anything in the logs that might be useful for us?

I set APP_DEBUG=true 
`{
    "message": "LibreNMS\\Cache\\PermissionsCache::canAccessDevice(): Argument #1 ($device) must be of type App\\Models\\Device|int, null given, called in /applis/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 363",
    "exception": "TypeError",
    "file": "/applis/librenms/LibreNMS/Cache/PermissionsCache.php",
    "line": 61,
    "trace": [
        {
            "file": "/applis/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php",
            "line": 363,
            "function": "canAccessDevice",
            "class": "LibreNMS\\Cache\\PermissionsCache",
            "type": "->"
        },
        {
            "file": "/applis/librenms/includes/html/functions.inc.php",
            "line": 125,
            "function": "__callStatic",
            "class": "Illuminate\\Support\\Facades\\Facade",
            "type": "::"
        },
        {....

`

I tested different curl commands

  • …/323/ip
  • …/323/transceiver
  • and …/323/description is the only one that works.

curl -H ‘X-Auth-Token: YOURAPITOKENHERE’ https://foo.example/api/v0/ports/323/descrption

{
    "status": "ok",
    "port_description": "DOC\/16\/A4"