Beispiele

Die nachfolgenden Beispiele dienen ausschließlich der prinzipiellen Veranschaulichung und haben keinen Anspruch auf Korrektheit. Sie sind daher inhaltlich als ungültig zu betrachten. Verbindliche Daten müssen über den Objekttyp- bzw. Funktionsindex der WebAPI abgefragt werden.

Je nach Betriebssystem bzw. Kommandozeileninterpreter (Shell) wird der Backslash ‘\‘ als Shell-Escape-Character verwendet. Eine einfache Formatierung der JSON-Ausgabe mit Zeilenumbrüchen und Einrückungen erreicht man z.B. mit ‘curl … | python -m json.tool’. Aus Sicherheitsgründen empfiehlt es sich, den Token-Text in einer curl-Konfigurationsdatei zu hinterlegen bzw. diese vorher entsprechend zu generieren. Der Token-Text sollte nicht direkt über die Kommandozeile übergeben werden.

Indexabfragen

Die Indexabfragen erlauben es, die gültigen Wertebelegungen der jeweils nächsten Unterebene des URI-Schemas festzustellen.

Versionsindex

--url "https://www-net.scc.kit.edu/api/"
--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg
[
    [
        {
            "description": null,
            "last_status_change_date": "18.09.2018",
            "numeric": "3.0",
            "semantic": "alpha",
            "status": "Entwicklung"
        },
        {
            "description": null,
            "last_status_change_date": "22.06.2018",
            "numeric": "2.1",
            "semantic": "release",
            "status": "aktuelle Version für den Produktionsbetrieb"
        },
        {
            "description": null,
            "last_status_change_date": "22.06.2018",
            "numeric": "2.0",
            "semantic": "oldrelease",
            "status": "veraltete Version (Vorgänger der aktuellen Version)"
        }
    ]
]

Systemindex

--url "https://www-net.scc.kit.edu/api/3.0/"
--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg
[
    [
        {
            "description": "DHCPVS",
            "name": "dhcp"
        },
        {
            "description": "Zentrale Funktionen (Benutzerkonten, Gruppen, Rollen etc.)",
            "name": "cntl"
        },
        {
            "description": "DNSVS",
            "name": "dns"
        },
        {
            "description": "Netzdokumentation",
            "name": "nd"
        },
        {
            "description": "Netzmanagement",
            "name": "nm"
        },
        {
            "description": "Organisationsstruktur (OEs/Verwaltungseinheiten)",
            "name": "org"
        },
        {
            "description": "DB-Event-Log",
            "name": "evlog"
        },
        {
            "description": "WebAPI - Systemdatenbereich",
            "name": "wapi"
        }
    ]
]

Objekttypindex

--url "https://www-net.scc.kit.edu/api/3.0/org/"
--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg
[
    [
        {
            "attributes": {
                "name": {
                    "data_type": "text_short",
                    "description_detail": "Name des OE-Typs",
                    "description_obj_type_scope": "Name",
                    "description_sys_scope": "OE-Typ-Name",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "string"
                },
                "short_name": {
                    "data_type": "text_kw_mc_short",
                    "description_detail": "Kurzbezeichnung des OE-Typs",
                    "description_obj_type_scope": "Kurzbezeichnung",
                    "description_sys_scope": "OE-Typ-Kurzbezeichnung",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "string"
                }
            },
            "constraints": {
                "api_unq_org_unit_type_name": {
                    "attributes": [
                        "name"
                    ],
                    "description": null,
                    "errors": [],
                    "internal_name": "unq_org_unit_type_name",
                    "is_deferred": false,
                    "type": "u"
                },
                "api_unq_org_unit_type_sname": {
                    "attributes": [
                        "short_name"
                    ],
                    "description": null,
                    "errors": [],
                    "internal_name": "unq_org_unit_type_sname",
                    "is_deferred": false,
                    "type": "u"
                }
            },
            "description_abbrev": "OET",
            "description_detail": "Basiseinheits-Typen",
            "description_title": "Arten von Basiseinheiten",
            "fq_name": "org.unit_type",
            "is_log_dst": false,
            "is_log_src": false,
            "name": "unit_type",
            "referenceable": {
                "api_unq_org_unit_type_name": {
                    "attributes": [
                        "name"
                    ],
                    "is_deferred": false,
                    "referenced_by": [
                        {
                            "name": "api_fkey_org_unit_type",
                            "object_type": "unit",
                            "system": "org"
                        }
                    ],
                    "type": "u"
                },
                "api_unq_org_unit_type_sname": {
                    "attributes": [
                        "short_name"
                    ],
                    "is_deferred": false,
                    "referenced_by": [],
                    "type": "u"
                }
            },
            "referencing": {},
            "system": "org"
        },
        {
            "attributes": {
                "name": {
                    "data_type": "text_short",
                    "description_detail": "Name der Organisationseinheit",
                    "description_obj_type_scope": "Name",
                    "description_sys_scope": "OE-Name",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "string"
                },
                "short_name": {
                    "data_type": "text_kw_uc_short",
                    "description_detail": "Abkürzung der Organisationseinheit",
                    "description_obj_type_scope": "Kurzbezeichnung",
                    "description_sys_scope": "OE-Kurzbezeichnung",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "string"
                },
                "short_name_hierarchy_list": {
                    "data_type": "text_array",
                    "description_detail": "hierarchische Liste der übergeordneten OEs",
                    "description_obj_type_scope": "Namenshierarchie (Liste)",
                    "description_sys_scope": "OE-Namenshierarchie (Liste)",
                    "is_core": false,
                    "is_nullable": false,
                    "json_data_type": "array"
                },
                "type": {
                    "data_type": "text_short",
                    "description_detail": null,
                    "description_obj_type_scope": "type",
                    "description_sys_scope": "vw_oe.type",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "string"
                }
            },
            "constraints": {
                "api_chk_org_unit_sname": {
                    "attributes": [
                        "short_name"
                    ],
                    "description": "OE-Kurzbezeichnung enthält keinen Hierarchie-Separator ':'",
                    "errors": [],
                    "internal_name": "chk_org_unit_sname",
                    "is_deferred": false,
                    "type": "c"
                },
                "api_fkey_org_unit_parent": {
                    "attributes": [
                        "parent_short_name"
                    ],
                    "description": null,
                    "errors": [],
                    "internal_name": "fkey_org_unit_parent",
                    "is_deferred": false,
                    "type": "f"
                },
                "api_fkey_org_unit_type": {
                    "attributes": [
                        "type"
                    ],
                    "description": null,
                    "errors": [],
                    "internal_name": "fkey_org_unit_type",
                    "is_deferred": false,
                    "type": "f"
                },
                "api_unq_org_unit_short_name": {
                    "attributes": [
                        "short_name"
                    ],
                    "description": null,
                    "errors": [],
                    "internal_name": "unq_org_unit_sname",
                    "is_deferred": false,
                    "type": "u"
                }
            },
            "description_abbrev": "OE",
            "description_detail": "Basiseinheiten",
            "description_title": "Basiseinheiten",
            "fq_name": "org.unit",
            "is_log_dst": false,
            "is_log_src": false,
            "name": "unit",
            "referenceable": {
                "api_unq_org_unit_short_name": {
                    "attributes": [
                        "short_name"
                    ],
                    "is_deferred": false,
                    "referenced_by": [
                        {
                            "name": "api_fkey_nd_bcd_oe",
                            "object_type": "bcd",
                            "system": "nd"
                        },
                        {
                            "name": "api_fkey_org_unit_parent",
                            "object_type": "unit",
                            "system": "org"
                        }
                    ],
                    "type": "u"
                }
            },
            "referencing": {
                "api_fkey_org_unit_parent": {
                    "attributes": [
                        "parent_short_name"
                    ],
                    "is_deferred": false,
                    "on_delete": "raise",
                    "references": {
                        "name": "api_unq_org_unit_short_name",
                        "object_type": "unit",
                        "system": "org"
                    }
                },
                "api_fkey_org_unit_type": {
                    "attributes": [
                        "type"
                    ],
                    "is_deferred": false,
                    "on_delete": "raise",
                    "references": {
                        "name": "api_unq_org_unit_type_name",
                        "object_type": "unit_type",
                        "system": "org"
                    }
                }
            },
            "system": "org"
        }
    ]
]

Funktionsindex

--url "https://www-net.scc.kit.edu/api/3.0/org/unit/"
--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg
[
    [
        {
            "fq_name": "org.unit.list",
            "is_data_manipulating": false,
            "is_executable": true,
            "is_returning": true,
            "is_returning_referenceable": false,
            "name": "list",
            "object_type": "unit",
            "parameters": {
                "fetch_limit": {
                    "data_type": "integer8",
                    "description_detail": "Obergrenze der Anzahl der ausgegebenen Datensätze. Wenn keine Sortierung verwendet wird, kann das Ergebnis mehrerer gleichartiger Abfragen verschieden sein.",
                    "description_obj_type_scope": "maximale Anzahl der Ergebnisdatensätze",
                    "description_sys_scope": "maximale Anzahl der Ergebnisdatensätze",
                    "json_data_type": "number",
                    "old": {
                        "is_nullable": false,
                        "is_required": false
                    }
                },
                "fetch_offset": {
                    "data_type": "integer8",
                    "description_detail": "Anzahl der Datensätze, die zu Beginn der Ausgabe übersprungen werden. Wenn keine Sortierung verwendet wird, kann das Ergebnis mehrerer gleichartiger Abfragen verschieden sein.",
                    "description_obj_type_scope": "Anzahl der zu ignorierenden Ergebnisdatensätze",
                    "description_sys_scope": "Anzahl der zu ignorierenden Ergebnisdatensätze",
                    "json_data_type": "number",
                    "old": {
                        "is_nullable": false,
                        "is_required": false
                    }
                },
                "name_regexp": {
                    "data_type": "regexp",
                    "description_detail": "Regulärer Ausdruck des Suchmusters für OE-Bezeichnungen",
                    "description_obj_type_scope": "Bezeichnungs-RE",
                    "description_sys_scope": "OE-Bezeichnungs-RE",
                    "json_data_type": "string",
                    "old": {
                        "is_nullable": false,
                        "is_required": false
                    }
                },
                "parent_short_name": {
                    "data_type": "text_kw_uc_short",
                    "description_detail": "eindeutiger kurzer Name der übergeordneten Organisationseinheit",
                    "description_obj_type_scope": "üg. Kurzbezeichnung",
                    "description_sys_scope": "üg. OE-Kurzbezeichnung",
                    "json_data_type": "string",
                    "old": {
                        "is_nullable": false,
                        "is_required": false
                    }
                },
                "short_name": {
                    "data_type": "text_kw_uc_short",
                    "description_detail": "Abkürzung der Organisationseinheit",
                    "description_obj_type_scope": "Kurzbezeichnung",
                    "description_sys_scope": "OE-Kurzbezeichnung",
                    "json_data_type": "string",
                    "old": {
                        "is_nullable": false,
                        "is_required": false
                    }
                },
                "sorting_params_list": {
                    "data_type": "text_array",
                    "description_detail": "Liste der Sortierungsparameter (Literale). Pro Parameter gilt das Muster '<attribute_name> [ASC | DESC ] [ NULLS { FIRST | LAST }]'. <attribute_name> darf nicht mehrfach vorkommen.",
                    "description_obj_type_scope": "Sortierungsparameter",
                    "description_sys_scope": "Sortierungsparameter",
                    "json_data_type": "array",
                    "old": {
                        "is_nullable": false,
                        "is_required": false
                    }
                },
                "type": {
                    "data_type": "text_short",
                    "description_detail": null,
                    "description_obj_type_scope": "type",
                    "description_sys_scope": "vw_oe.type",
                    "json_data_type": "string",
                    "old": {
                        "is_nullable": false,
                        "is_required": false
                    }
                }
            },
            "system": "org"
        }
    ]
]

Abfragen des Systemdatenverzeichnisses (Objekttypdaten)

--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg 'https://www-net.scc.kit.edu/api/3.0/wapi/object_type/list?system_list=["dns"]&name_list=["fqdn"]'
curl --config curl.cfg -d '{"old": {"system_list": ["dns"], "name_list": ["fqdn"]}}' 'https://www-net.scc.kit.edu/api/3.0/wapi/object_type/list'
[
    [
        {
            "attributes": {
                "description": {
                    "data_type": "text",
                    "description_detail": "Freitext-Info zum FQDN",
                    "description_obj_type_scope": "Info",
                    "description_sys_scope": "FQDN-Info",
                    "is_core": true,
                    "is_nullable": true,
                    "json_data_type": "string"
                },
                "has_rr": {
                    "data_type": "boolean",
                    "description_detail": "Diesem FQDN sind Resource Records zugeordnet",
                    "description_obj_type_scope": "hat Resource Records",
                    "description_sys_scope": "FQDN hat Resource Records",
                    "is_core": false,
                    "is_nullable": false,
                    "json_data_type": "boolean"
                },
                "is_dhcp": {
                    "data_type": "boolean",
                    "description_detail": "DHCP-Hostnamens-Attribut: FQDN's dieses Typs sind für adreßbasierte RR's (Basis-Hostnamen für DHCP-Betrieb) vorgesehen und unterliegen der DHCP-Anwendungslogik",
                    "description_obj_type_scope": "DHCP-Hostnamens-Attribut",
                    "description_sys_scope": "NT-DHCP-Hostnamens-Attribut",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "boolean"
                },
                "is_empty_nonterminal": {
                    "data_type": "boolean",
                    "description_detail": "FQDN hat keine RRs (empty), hat aber Subdomains (Untereinträge), die wiederum RRs haben (nonterminal)",
                    "description_obj_type_scope": "ist empty/nonterminal",
                    "description_sys_scope": "FQDN ist empty/nonterminal",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "boolean"
                },
                "is_host": {
                    "data_type": "boolean",
                    "description_detail": "Hostnamens-Attribut: FQDN's dieses Typs sind für adreßbasierte RR's (Basis-Hostnamen) vorgesehen",
                    "description_obj_type_scope": "Hostnamens-Attribut",
                    "description_sys_scope": "NT-Hostnamens-Attribut",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "boolean"
                },
                "is_nonterminal": {
                    "data_type": "boolean",
                    "description_detail": "Non-Terminal-FQDN-Attribut: wenn 'true', sind Untereinträge (Subdomains) unter FQDN's dieses Typs möglich. Außerdem ist die Referenzierung als Zone, Netzbereichszuordnung (BCD), Permission-Zuordnung, DHCP-Subdomain möglich.",
                    "description_obj_type_scope": "Non-Terminal-FQDN-Attribut",
                    "description_sys_scope": "NT-Non-Terminal-FQDN-Attribut",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "boolean"
                },
                "is_own": {
                    "data_type": "boolean",
                    "description_detail": "FQDN ist dem eigenem Namensraum des Benutzers zugeordnet",
                    "description_obj_type_scope": "ist eigener FQDN",
                    "description_sys_scope": "ist eigener FQDN",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "boolean"
                },
                "is_wildcard": {
                    "data_type": "boolean",
                    "description_detail": "Wildcard-Attribut: FQDN's dieses Typs (Label: '*') sind für Wildcard-RR's vorgesehen",
                    "description_obj_type_scope": "Wildcard-Attribut",
                    "description_sys_scope": "NT-Wildcard-Attribut",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "boolean"
                },
                "label": {
                    "data_type": "fqdn_label",
                    "description_detail": "linker Teil des FQDN's bis zum ersten Punkt",
                    "description_obj_type_scope": "Label",
                    "description_sys_scope": "DNS-Label",
                    "is_core": true,
                    "is_nullable": true,
                    "json_data_type": "string"
                },
                "log_pk": {
                    "data_type": "integer8",
                    "description_detail": "Log-Identifikation des Objektdatensatzes (Namensobjekt)",
                    "description_obj_type_scope": "Log-Primärschlüssel",
                    "description_sys_scope": "Log-Primärschlüssel",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "number"
                },
                "parent_value": {
                    "data_type": "fqdn",
                    "description_detail": "übergeordneter Domainname (FQDN)",
                    "description_obj_type_scope": "üg. FQDN",
                    "description_sys_scope": "üg. Domainname (FQDN)",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "string"
                },
                "rad_type": {
                    "data_type": "tuple_ntab_bynum",
                    "description_detail": "Reverse-Adreß-Domain-Attribut: FQDN's dieses Typs sind für Reverse-Adreß-Domains (PTR-RR's, Namensraum je nach Attributwert > 0) vorgesehen",
                    "description_obj_type_scope": "RAD-Attribut",
                    "description_sys_scope": "NT-RAD-Attribut",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "number",
                    "supported_values": {
                        "0": "[nicht belegt]",
                        "1": "ENUM (E.164)",
                        "4": "IPv4",
                        "6": "IPv6"
                    }
                },
                "sub_fqdn_count": {
                    "data_type": "integer8",
                    "description_detail": "Anzahl der FQDNs unterhalb dieses FQDNs",
                    "description_obj_type_scope": "# Unter-FQDNs",
                    "description_sys_scope": "# Unter-FQDNs",
                    "is_core": false,
                    "is_nullable": false,
                    "json_data_type": "number"
                },
                "type": {
                    "data_type": "text",
                    "description_detail": "Für die betreffende Version sichtbarer Wert des FQDN-Typs. `null` bedeutet, dass dieser Typ in der betreffenden Version nicht vorhanden ist.",
                    "description_obj_type_scope": "Typ",
                    "description_sys_scope": "FQDN-Typ",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "string"
                },
                "value": {
                    "data_type": "fqdn",
                    "description_detail": "FQDN (Fully Qualified Domain Name)",
                    "description_obj_type_scope": "FQDN",
                    "description_sys_scope": "FQDN",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "string"
                },
                "zone": {
                    "data_type": "fqdn",
                    "description_detail": "Zonen-FQDN des FQDNs",
                    "description_obj_type_scope": "Zone",
                    "description_sys_scope": "Zonen-FQDN",
                    "is_core": true,
                    "is_nullable": false,
                    "json_data_type": "string"
                }
            },
            "constraints": {
                "api_chk_dns_fqdn_label": {
                    "attributes": [
                        "is_wildcard",
                        "is_host",
                        "type"
                    ],
                    "description": "Für Labels hostbezogener Namenstypen gilt: erstes Zeichen: alphanumerisch [a-z,0-9], nachfolgende Zeichen: alphanumerisch oder '-' oder leer, letztes Zeichen darf kein '-' sein.  Für Labels in SRV-Namenstypen gilt RFC-6335 bzgl. des 'Service Name', zuzüglich der Voranstellung genau eines Unterstrichs '_'. Für Labels aller anderen nicht-hostbezogenen Namenstypen ist der vorangestellte Unterstrich optional. Für Wildcard-Labels ist ausschließlich '*' erlaubt.",
                    "errors": [
                        {
                            "code": 35,
                            "description": "FQDN-Namenskonvention verletzt",
                            "details": "Für Labels hostbezogener Namenstypen gilt: erstes Zeichen: alphanumerisch [a-z,0-9], nachfolgende Zeichen: alphanumerisch oder '-' oder leer, letztes Zeichen darf kein '-' sein.  Für Labels in SRV-Namenstypen gilt RFC-6335 bzgl. des 'Service Name', zuzüglich der Voranstellung genau eines Unterstrichs '_'. Für Labels aller anderen nicht-hostbezogenen Namenstypen ist der vorangestellte Unterstrich optional. Für Wildcard-Labels ist ausschließlich '*' erlaubt.",
                            "type": -20102
                        }
                    ],
                    "internal_name": "chk_dns_ntree_name",
                    "is_deferred": false,
                    "type": "c"
                },
                "api_chk_dns_fqdn_rad": {
                    "attributes": [
                        "rad_type",
                        "value",
                        "type"
                    ],
                    "description": "erlaubte Zeichen in Labels / Maximalzahl d. Labels in FQDN: unter in-addr.arpa: 0..255 / max. 6 Labels; unter ip6.arpa: 0..9, a-f / max. 34 Labels; unter e164.arpa: 0..9 / max. 123 Labels.",
                    "errors": [
                        {
                            "code": 36,
                            "description": "FQDN-Namenskonvention für RAD verletzt",
                            "details": "Labels für Reverse Adress Domains (RAD): Dezimalzahl von 0..255 (IPv4) oder Hexadezimalzahl von 0..f (IPv6). RAD-FQDNs müssen zur SLD 'in-addr.arpa' (IPv4) bzw. 'ip6.arpa' (IPv6) bzw. 'e164.arpa' (ENUM) gehören. Alle anderen FQDNs dürfen nicht zur TLD '.arpa' gehören.",
                            "type": -20102
                        }
                    ],
                    "internal_name": "chk_dns_ntree_rad",
                    "is_deferred": false,
                    "type": "c"
                },
                "api_fkey_dns_fqdn_parent": {
                    "attributes": [
                        "parent_value"
                    ],
                    "description": null,
                    "errors": [
                        {
                            "code": 1,
                            "description": "Übergeordneter FQDN ist 'terminal FQDN' (kann keine Subdomains enthalten) oder ist nicht vorhanden.",
                            "details": "Der übergeordnete FQDN muss bereits existieren und vom Typ 'non-terminal FQDN' sein.",
                            "type": -20101
                        },
                        {
                            "code": 58,
                            "description": "Domain enthält noch Namen",
                            "details": null,
                            "type": -20101
                        }
                    ],
                    "internal_name": "fkey_dns_ntree_parent",
                    "is_deferred": false,
                    "type": "f"
                },
                "api_fkey_dns_fqdn_type": {
                    "attributes": [
                        "type"
                    ],
                    "description": null,
                    "errors": [],
                    "internal_name": "fkey_dns_ntree_nt",
                    "is_deferred": false,
                    "type": "f"
                },
                "api_fkey_dns_fqdn_zone": {
                    "attributes": [
                        "zone"
                    ],
                    "description": null,
                    "errors": [],
                    "internal_name": "fkey_dns_ntree_zone",
                    "is_deferred": true,
                    "type": "f"
                },
                "api_unq_dns_fqdn": {
                    "attributes": [
                        "value"
                    ],
                    "description": null,
                    "errors": [],
                    "internal_name": "unq_dns_ntree_fqdn",
                    "is_deferred": false,
                    "type": "u"
                },
                "api_unq_dns_fqdn_label": {
                    "attributes": [
                        "label",
                        "parent_value"
                    ],
                    "description": "Label in Domain eindeutig",
                    "errors": [
                        {
                            "code": 15,
                            "description": "Label in Domain schon vorhanden",
                            "details": null,
                            "type": -20100
                        }
                    ],
                    "internal_name": "unq_dns_ntree_name",
                    "is_deferred": false,
                    "type": "u"
                },
                "api_unq_dns_fqdn_type": {
                    "attributes": [
                        "value",
                        "type"
                    ],
                    "description": null,
                    "errors": [],
                    "internal_name": "unq_dns_ntree_nt",
                    "is_deferred": false,
                    "type": "u"
                }
            },
            "description_abbrev": "N",
            "description_detail": "DNS-Namensobjekte",
            "description_title": "DNS-Namensobjekte (FQDN) in hierarchischer Struktur",
            "fq_name": "dns.fqdn",
            "is_log_dst": false,
            "is_log_src": true,
            "name": "fqdn",
            "referenceable": {
                "api_unq_dns_fqdn": {
                    "attributes": [
                        "value"
                    ],
                    "is_deferred": false,
                    "referenced_by": [
                        {
                            "name": "api_fkey_dns_fqdn_parent",
                            "object_type": "fqdn",
                            "system": "dns"
                        },
                        {
                            "name": "api_fkey_dns_fqdn2group_fqdn",
                            "object_type": "fqdn2group",
                            "system": "dns"
                        },
                        {
                            "name": "api_fkey_dns_zone_fqdn",
                            "object_type": "zone",
                            "system": "dns"
                        },
                        {
                            "name": "api_fkey_dnscfg_fqdn2perm_fqdn",
                            "object_type": "fqdn2perm",
                            "system": "dnscfg"
                        },
                        {
                            "name": "api_fkey_dnscfg_ns_subscriber_p",
                            "object_type": "ns_subscriber",
                            "system": "dnscfg"
                        },
                        {
                            "name": "api_fkey_nd_device_fqdn",
                            "object_type": "device",
                            "system": "nd"
                        },
                        {
                            "name": "api_fkey_nd_diq_ta_entry_dev",
                            "object_type": "diq_ta_entry",
                            "system": "nd"
                        },
                        {
                            "name": "api_fkey_nd_module2device_fqdn",
                            "object_type": "module2device",
                            "system": "nd"
                        }
                    ],
                    "type": "u"
                },
                "api_unq_dns_fqdn_label": {
                    "attributes": [
                        "label",
                        "parent_value"
                    ],
                    "is_deferred": false,
                    "referenced_by": [],
                    "type": "u"
                },
                "api_unq_dns_fqdn_type": {
                    "attributes": [
                        "value",
                        "type"
                    ],
                    "is_deferred": false,
                    "referenced_by": [
                        {
                            "name": "api_fkey_dns_record_fqdn_type",
                            "object_type": "record",
                            "system": "dns"
                        },
                        {
                            "name": "api_fkey_dns_record_target_fqdn_type",
                            "object_type": "record",
                            "system": "dns"
                        },
                        {
                            "name": "api_fkey_dnscfg_ns_host_fqdn",
                            "object_type": "ns",
                            "system": "dnscfg"
                        },
                        {
                            "name": "api_fkey_dnscfg_ns_svc_fqdn",
                            "object_type": "ns",
                            "system": "dnscfg"
                        }
                    ],
                    "type": "u"
                }
            },
            "referencing": {
                "api_fkey_dns_fqdn_parent": {
                    "attributes": [
                        "parent_value"
                    ],
                    "is_deferred": false,
                    "on_delete": "cascade",
                    "references": {
                        "name": "api_unq_dns_fqdn",
                        "object_type": "fqdn",
                        "system": "dns"
                    }
                },
                "api_fkey_dns_fqdn_type": {
                    "attributes": [
                        "type"
                    ],
                    "is_deferred": false,
                    "on_delete": "raise",
                    "references": {
                        "name": "api_unq_dnscfg_fqdn_type_name",
                        "object_type": "fqdn_type",
                        "system": "dnscfg"
                    }
                },
                "api_fkey_dns_fqdn_zone": {
                    "attributes": [
                        "zone"
                    ],
                    "is_deferred": true,
                    "on_delete": "raise",
                    "references": {
                        "name": "api_unq_dns_zone_fqdn",
                        "object_type": "zone",
                        "system": "dns"
                    }
                }
            },
            "system": "dns"
        }
    ]
]

Abfragen des Systemdatenverzeichnisses (Funktionsdaten)

--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg 'https://www-net.scc.kit.edu/api/3.0/wapi/function/list?system_list=["dns"]&object_type_list=["fqdn"]&name_list=["create"]'
curl --config curl.cfg -d '{"old": {"system_list": ["dns"], "object_type_list": ["fqdn"], "name_list": ["create"]}}' 'https://www-net.scc.kit.edu/api/3.0/wapi/function/list'
[
    [
        {
            "fq_name": "dns.fqdn.create",
            "is_data_manipulating": true,
            "is_returning": true,
            "is_returning_referenceable": true,
            "name": "create",
            "object_type": "fqdn",
            "parameters": {
                "description": {
                    "data_type": "text",
                    "description_detail": "Freitext-Info zum FQDN",
                    "description_obj_type_scope": "Info",
                    "description_sys_scope": "FQDN-Info",
                    "new": {
                        "is_nullable": true,
                        "is_required": false
                    }
                },
                "type": {
                    "data_type": "text",
                    "description_detail": "Für die betreffende Version sichtbarer Wert des DBNT-Namens. `null` bewirkt, dass dieser Namenstyp nicht als Neuwert (für Eintragen oder Ändern von FQDNs) benutzt werden kann.",
                    "description_obj_type_scope": "versionierter Name",
                    "description_sys_scope": "versionierter DBNT-Name",
                    "new": {
                        "is_nullable": false,
                        "is_required": true
                    }
                },
                "value": {
                    "data_type": "fqdn",
                    "description_detail": "FQDN (Fully Qualified Domain Name)",
                    "description_obj_type_scope": "FQDN",
                    "description_sys_scope": "FQDN",
                    "new": {
                        "is_nullable": false,
                        "is_required": true
                    }
                }
            },
            "system": "dns"
        }
    ]
]

Abfragen von Objekten

--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg 'https://www-net.scc.kit.edu/api/3.0/dns/fqdn/list?label_regexp=^host'
curl --config curl.cfg -d '{"old": {"label_regexp": "^host"}}' 'https://www-net.scc.kit.edu/api/3.0/dns/fqdn/list'
[
    [
        {
            "description": "nixxx",
            "has_rr": true,
            "is_dhcp": false,
            "is_host": true,
            "is_nonterminal": false,
            "is_own": true,
            "is_wildcard": false,
            "label": "host",
            "log_pk": 7512756,
            "parent_value": "rz.uni-karlsruhe.de.",
            "rad_type": 0,
            "sub_fqdn_count": 0,
            "type": "host",
            "value": "host.rz.uni-karlsruhe.de.",
            "zone": "uni-karlsruhe.de."
        },
        {
            "description": null,
            "has_rr": true,
            "is_dhcp": false,
            "is_host": true,
            "is_nonterminal": false,
            "is_own": true,
            "is_wildcard": false,
            "label": "host2",
            "log_pk": 12556306,
            "parent_value": "net.scc.kit.edu.",
            "rad_type": 0,
            "sub_fqdn_count": 0,
            "type": "host",
            "value": "host2.net.scc.kit.edu.",
            "zone": "kit.edu."
        },
        {
            "description": null,
            "has_rr": true,
            "is_dhcp": false,
            "is_host": true,
            "is_nonterminal": false,
            "is_own": true,
            "is_wildcard": false,
            "label": "host1",
            "log_pk": 12581059,
            "parent_value": "net.scc.kit.edu.",
            "rad_type": 0,
            "sub_fqdn_count": 0,
            "type": "host",
            "value": "host1.net.scc.kit.edu.",
            "zone": "kit.edu."
        }
    ]
]

Modifikation von Objekten

Einfache Dateneingabe durch eine Einzelbefehls-Transaktion mit nicht-leerer Antwort

{
  "new": {
    "fqdn": "myhost.kit.test",
    "fqdn_description": "blubb",
    "target_is_reverse_unique": false,
    "target_is_singleton": false,
    "type": "A",
    "data": "192.168.1.1"
  }
}
--url "https://www-net.scc.kit.edu/api/3.0/dns/record/create"
--data "@create_rr.json"
--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg
[
    [
        {
            "data": "192.168.1.1",
            "fqdn": "myhost.kit.test.",
            "fqdn_description": "blubb",
            "fqdn_type": "host",
            "host_is_nws": false,
            "is_own": false,
            "target_data_unref": null,
            "target_fqdn": null,
            "target_fqdn_type": null,
            "target_ipaddr": "192.168.1.1",
            "target_is_reverse_unique": false,
            "target_is_singleton": false,
            "ttl": 86400,
            "ttl_reset_days": null,
            "ttl_zone_default": 86400,
            "type": "A",
            "zone": "test."
        }
    ]
]
{
    "exception": {
        "constraint": {
            "description": "FQDN, Typ, Datenfeld und Ziel-FQDN sind eindeutig",
            "name": "api_unq_dns_record_a"
        },
        "error": {
            "code": 12,
            "description": "[dns] RR schon vorhanden",
            "details": "Ein DNS-Resource-Record mit gleichlautenden Parametern für FQDN, Typ, Ziel (RR-Data) ist bereits vorhanden."
        },
        "error_type": {
            "code": -20100,
            "description": "Dateneindeutigkeit verletzt",
            "name": "unq_constraint_violation"
        },
        "others": {},
        "stacked_diag_params": {
            "column": "",
            "constraint": "dns_rr_dst_a_uidx",
            "context": "PL/pgSQL function eh.set_err(eh.stacked_diag_params_rec_type,name,name,eh.userparams_kv_rec_type[],eh.typecode_rec_type) line 8 at RAISE\\nSQL statement \"SELECT eh.set_err(sd_rec, fpkg, fname, up_kv_rec_list, et_rec)\"\\nPL/pgSQL function dns_wapi_3_0.ta_stmt_handler(jsonb,jsonb,wapi_3_0.exec_ta_stmt_rec_type) line 212 at PERFORM\\nPL/pgSQL function wapi_3_0.exec_ta_handler(bigint,jsonb,boolean,boolean,boolean,boolean) line 490 at RETURN QUERY\\nPL/pgSQL function wapi_3_0.ta_handler(text,bigint,boolean,boolean,boolean) line 7 at RETURN QUERY",
            "datatype": "",
            "detail": "Key (dns_rr_set_key_nr, dns_addr_key_nr)=(6341598, 863645) already exists.",
            "dml_src_table": "dns_rr_dst",
            "hint": "",
            "message": "duplicate key value violates unique constraint \"dns_rr_dst_a_uidx\"",
            "schema": "netadmin",
            "sqlstate": "23505",
            "table": "dns_rr_dst"
        },
        "traceback": [
            {
                "function": "dns.exec_insert_rr_osd",
                "param": {
                    "dns.record.fqdn": "myhost.kit.test.",
                    "dns.record.target_data_unref": null,
                    "dns.record.target_ipaddr": "192.168.1.1",
                    "dns.record.target_ipaddr_type": "4",
                    "dns.record.target_is_reverse_unique": false,
                    "dns.record.target_is_singleton": false,
                    "dnscfg.record_inttype._intname": "dflt:0100,:,400,A",
                    "dnscfg.record_inttype.description": "A-RR-Set für Host",
                    "dnscfg.record_inttype.target_addr_type": "4",
                    "dnscfg.record_inttype.target_is_reverse_unique": false,
                    "dnscfg.record_inttype.target_is_singleton": false
                }
            },
            {
                "function": "dns_wapi_3_0.do_insert_rr",
                "param": {
                    "dns.fqdn.value": "myhost.kit.test."
                }
            },
            {
                "function": "wapi_3_0.exec_ta_handler",
                "param": {
                    "wapi.transaction_stmt.index": 0
                }
            }
        ]
    }
}

Einfache Dateneingabe durch eine Einzelbefehls-Transaktion mit leerer Antwort

{
  "old": {
    "fqdn": "myhost.kit.test",
    "type": "A",
    "data": "192.168.1.1"
  }
}
--url "https://www-net.scc.kit.edu/api/3.0/dns/record/delete"
--data "@delete_rr.json"
--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg
[
    []
]

Komplexe Transaktion mit mehreren Datenausgaben im Verbund

[
  {"name": "nd.bcd.list", "old": {"is_own": true}},
  {"name": "nd.bcd2group.list", "join": {"0": "api_fkey_nd_bcd2group_bcd"}},
  {"name": "cntl.group.list", "join": {"1": "api_fkey_nd_bcd2group_grp"}},
  {"name": "cntl.mgr2group.list", "join": {"2": "api_fkey_cntl_mgr2group_grp"}},
  {"name": "dns.fqdn2group.list", "join": {"2": "api_fkey_dns_fqdn2group_grp"}},
  {"name": "evlog.record.list", "old": {"top_n": 5, "sorting_params_list": ["log_fk", "ta_timestamp desc"]}, "join": {"0": null}},
  {"name": "evlog.record.list", "old": {"top_n": 5, "top_n_from_newest": false, "sorting_params_list": ["log_fk", "ta_timestamp asc"]}, "join": {"0": null}}
]
--url "https://www-net.scc.kit.edu/api/3.0/wapi/transaction/execute"
--data "@query_dns.json"
--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg

Komplexe Transaktion mit mehreren Dateneingaben und -Ausgaben

[
  {"name": "dhcp.lease.create", "new": {"ip_subnet_cidr_spec":"192.168.1.0/24", "ip_addr_value":"192.168.1.1", "mac_addr":"00:11:22:aa:bb:cc", "is_static":true }}, 
  {"name": "dns.ip_addr.list", "old_ref": {"value_cidr_mask": {"idx": 0, "param": "ip_addr_value"}}},
  {"name": "dhcp.og2lease.create", "new_ref": {"lease_pk": {"idx": 0, "param": "pk"}}, "new": {"og_ip_subnet_cidr_spec": "192.168.1.0/24", "og_name": "wapi-test-optgroup", "priority": 15 }},
  {"name": "nd.ip_subnet.list", "join": {"1": "api_fkey_dns_ip_addr_subnet"}}
]
--url "https://www-net.scc.kit.edu/api/3.0/wapi/transaction/execute?dry_mode=true"
--data "@mod_dhcp.json"
--header "Content-Type: application/json"
--header "Authorization: Bearer ***AUTH-TOKEN-TEXT***"
curl --config curl.cfg