Skip to content

ModuleBay API GET - Missing Properties #20950

@Jirennor

Description

@Jirennor

NetBox Edition

NetBox Community

NetBox Version

v4.4.7

Python Version

3.10

Steps to Reproduce

  1. Create a new device type.
  2. Create a new module type.
  3. Create a new device.
  4. Add a Module Bays component to the device.
  5. Install a module in the created module bay.
  6. API GET: /api/dcim/module-bays/?device_id=<device_id>

Expected Behavior

Assuming the API spec is correct I would expect that the installed_module property contains a reference to the device and module_bay.

Observed Behavior

The installed_module property does not contain any device or module_bay references. In my case I use the Golang client (which is generated based on the API spec) that validates the returned API result and errors out because no value was given for the required properties device and module_bay.

I also think the same applies to the module property but I don't have a use-case where this value is set so I can't test it.

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 2913,
            "url": "http://localhost:8585/api/dcim/module-bays/2913/",
            "display_url": "http://localhost:8585/dcim/module-bays/2913/",
            "display": "bay0",
            "device": {
                "id": 5645,
                "url": "http://localhost:8585/api/dcim/devices/5645/",
                "display": "Something-101",
                "name": "Something-101",
                "description": ""
            },
            "module": null,
            "name": "bay0",
            "installed_module": {
                "id": 291,
                "url": "http://localhost:8585/api/dcim/modules/291/",
                "display": "bay0: SomeModule01 (291)",
                "serial": "",
                "description": ""
            },
            "label": "",
            "position": "",
            "description": "",
            "tags": [],
            "custom_fields": {},
            "created": "2025-12-08T16:45:10.445185Z",
            "last_updated": "2025-12-08T16:45:10.445200Z"
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the application

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions