Project

General

Profile

Actions

Bug #38725

closed

Interface object does not provide backlink to host

Added by Bastian Blank 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

In the API, interfaces can be looked up by host, domain or subnet. Each returned object then contains backlinks to domain and subnet, but not the host (see the example in https://apidocs.theforeman.org/foreman/3.4/apidoc/v2/interfaces/show.html).

If I want to get interfaces in relation to their hosts, domains and subnets, I need to do O(n) API requests (one `GET /api/hosts`, n `GET /api/hosts/:host_id/interfaces`).

Please also provide the host backlink in the interface object (aka `host_id` and `host_name`).

Actions

Also available in: Atom PDF