systemd Links API

The Links API from systemd — 7 operation(s) for links.

Operations 7

GET /links/{ifindex} Get A Link By ifindex #
GET /links/by-name/{name} Get A Link By Name #
PUT /links/{ifindex}/dns Set DNS Servers For A Link #
PUT /links/{ifindex}/domains Set Search Domains For A Link #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/systemd-links-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

systemd-links-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: systemd-hostnamed (org.freedesktop.hostname1) Boot Links API
  version: '1.0'
  summary: D-Bus API of systemd-hostnamed modeled as REST operations.
  description: 'Documentation/contract artifact for the `org.freedesktop.hostname1` D-Bus interface on the

    system bus. Manages the system hostname (static, transient, pretty), chassis type, deployment,

    location, icon name, and other machine info.

    '
  license:
    name: LGPL-2.1-or-later
    url: https://github.com/systemd/systemd/blob/main/LICENSES/LGPL-2.1-or-later.txt
servers:
- url: dbus://system/org.freedesktop.hostname1
tags:
- name: Links
paths:
  /links:
    get:
      tags:
      - Links
      operationId: ListLinks
      summary: List All Network Links
      description: Mirrors `ListLinks()`. Returns (ifindex, ifname, object path) tuples.
      responses:
        '200':
          description: Array of links.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Link'
  /links/{ifindex}:
    parameters:
    - name: ifindex
      in: path
      required: true
      schema:
        type: integer
    get:
      tags:
      - Links
      operationId: GetLinkByIndex
      summary: Get A Link By ifindex
      description: Mirrors `GetLinkByIndex(ifindex)`.
      responses:
        '200':
          description: Link object path.
          content:
            application/json:
              schema:
                type: object
                properties:
                  path:
                    type: string
  /links/by-name/{name}:
    parameters:
    - name: name
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Links
      operationId: GetLinkByName
      summary: Get A Link By Name
      description: Mirrors `GetLinkByName(name)`.
      responses:
        '200':
          description: Link object path.
  /links/{ifindex}/reconfigure:
    parameters:
    - name: ifindex
      in: path
      required: true
      schema:
        type: integer
    post:
      tags:
      - Links
      operationId: ReconfigureLink
      summary: Reconfigure A Link
      description: Mirrors `ReconfigureLink(ifindex)` — re-applies the matching .network file.
      responses:
        '204':
          description: Reconfigured.
  /links/{ifindex}/renew:
    parameters:
    - name: ifindex
      in: path
      required: true
      schema:
        type: integer
    post:
      tags:
      - Links
      operationId: RenewLink
      summary: Force DHCP Renew
      description: Mirrors `RenewLink(ifindex)`.
      responses:
        '204':
          description: Renewal triggered.
  /links/{ifindex}/dns:
    parameters:
    - name: ifindex
      in: path
      required: true
      schema:
        type: integer
    put:
      tags:
      - Links
      operationId: SetLinkDNS
      summary: Set DNS Servers For A Link
      description: Mirrors `SetLinkDNS(ifindex, dns)`.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                servers:
                  type: array
                  items:
                    type: string
      responses:
        '204':
          description: Updated.
  /links/{ifindex}/domains:
    parameters:
    - name: ifindex
      in: path
      required: true
      schema:
        type: integer
    put:
      tags:
      - Links
      operationId: SetLinkDomains
      summary: Set Search Domains For A Link
      description: Mirrors `SetLinkDomains(ifindex, domains)`.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                domains:
                  type: array
                  items:
                    type: object
                    properties:
                      domain:
                        type: string
                      search_only:
                        type: boolean
      responses:
        '204':
          description: Updated.
components:
  schemas:
    Link:
      type: object
      properties:
        ifindex:
          type: integer
        name:
          type: string
        object_path:
          type: string