{
  "openapi": "3.0.0",
  "info": {
    "title": "CISCO-OSPF-TRAP-MIB MIB API",
    "version": "1.0.0",
    "description": "This MIB module describes new/modified notification\n    objects/events, which are defined in the latest\n    version for OSPF MIB IETF draft\n    draftietf-ospf-mib-update-05.txt. Support for OSPF \n    Sham link is also added\n\n⚠️ **IMPORTANT - MIB DATA ACCESS**:\nThis YANG model exists for SMIv2-to-YANG translation purposes, but MIB data on IOS-XE devices is primarily accessed via **SNMP protocol**, not RESTCONF.\n\n**RESTCONF Limitation**: Many MIB paths may return 404 errors via RESTCONF `/data` endpoints because the device exposes MIB data through SNMP, not the YANG datastore.\n\n**Recommended Access Methods**:\n- Use SNMP (v2c/v3) to query MIB data directly\n- Use NETCONF `<get>` operations for devices supporting YANG-modeled MIB access\n- Check device capabilities: some newer IOS-XE versions may support limited RESTCONF access to specific MIBs\n\n**YANG Model Purpose**: These YANG models define the structure of SNMP MIBs in YANG format for tooling compatibility, but do not guarantee RESTCONF data availability.\n\n\n**📊 YANG Tree:** [View CISCO-OSPF-TRAP-MIB structure](https://jeremycohoe.github.io/cisco-ios-xe-openapi-swagger/yang-trees/CISCO-OSPF-TRAP-MIB.html)",
    "contact": {
      "name": "Cisco DevNet",
      "url": "https://developer.cisco.com"
    },
    "x-yang-module": "CISCO-OSPF-TRAP-MIB",
    "x-model-type": "mib"
  },
  "servers": [
    {
      "url": "https://{device}/restconf",
      "description": "RESTCONF server",
      "variables": {
        "device": {
          "default": "10.1.1.1",
          "description": "Device hostname or IP address"
        }
      }
    }
  ],
  "paths": {
    "/data/CISCO-OSPF-TRAP-MIB:cospfTrapControl": {
      "get": {
        "summary": "Get cospfTrapControl data",
        "description": "Retrieve cospfTrapControl operational data from MIB",
        "tags": [
          "CISCO-OSPF-TRAP-MIB"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/yang-data+json": {
                "schema": {
                  "type": "object",
                  "description": "cospfTrapControl",
                  "properties": {
                    "cospfSetTrap": {
                      "type": "string",
                      "description": "An octet string serving as a bit  map  for\n          the trap events defined by the OSPF traps in \n          this MIB. This object is used to enable and  \n          disable  specific OSPF   traps   where  a  1  \n          in  the  corresponding bit  field represents \n          enabled."
                    },
                    "cospfConfigErrorType": {
                      "type": "string",
                      "description": "Potential types of configuration conflicts.\n          Used  by the cospfConfigError and cospfConfigVirtError\n          traps. When the last value of a trap\n          using this object is needed, but no traps of\n          that type have been sent, this value pertaining\n          to this object should be returned as noError."
                    },
                    "cospfPacketType": {
                      "type": "string",
                      "description": "OSPF packet types. When the last value of a trap\n          using this object is needed, but no traps of\n          that type have been sent, this value pertaining\n          to this object should be returned as nullPacket."
                    },
                    "cospfPacketSrc": {
                      "type": "string",
                      "description": "The IP address of an inbound packet that can-\n          not be identified by a neighbor instance. When\n          the last value of a trap using this object is\n          needed, but no traps of that type have been sent,\n          this value pertaining to this object should\n          be returned as 0.0.0.0.",
                      "format": "inet:ipv4-address"
                    }
                  }
                },
                "example": {
                  "CISCO-OSPF-TRAP-MIB:cospfTrapControl": {
                    "cospfSetTrap": "example-string",
                    "cospfConfigErrorType": "ethernetCsmacd(6)",
                    "cospfPacketType": "ethernetCsmacd(6)",
                    "cospfPacketSrc": "example-string"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — insufficient access rights (NACM)",
            "content": {
              "application/yang-data+json": {
                "schema": {
                  "$ref": "#/components/schemas/restconf-error"
                }
              }
            }
          }
        },
        "operationId": "get-cospfTrapControl",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": false,
            "description": "RESTCONF response media type (RFC 8040)",
            "schema": {
              "type": "string",
              "default": "application/yang-data+json",
              "enum": [
                "application/yang-data+json",
                "application/yang-data+xml"
              ]
            }
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "description": "Limit the depth of returned sub-tree data (RFC 8040 Section 4.8.2). Use 'unbounded' for full depth.",
            "schema": {
              "type": "string",
              "default": "unbounded"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Select specific fields to return (RFC 8040 Section 4.8.3). Example: fields=name;status",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "content",
            "in": "query",
            "required": false,
            "description": "Filter by config state: 'config' (config true only), 'nonconfig' (config false only), or 'all'.",
            "schema": {
              "type": "string",
              "enum": [
                "config",
                "nonconfig",
                "all"
              ],
              "default": "all"
            }
          }
        ]
      },
      "x-yang-path": "/cospfTrapControl",
      "x-restconf-kind": "container"
    }
  },
  "components": {
    "schemas": {
      "CISCO-OSPF-TRAP-MIB_CISCO-OSPF-TRAP-MIB": {
        "type": "object",
        "description": "CISCO-OSPF-TRAP-MIB",
        "properties": {
          "cospfTrapControl": {
            "type": "object",
            "description": "cospfTrapControl",
            "properties": {
              "cospfSetTrap": {
                "type": "string",
                "description": "An octet string serving as a bit  map  for\n          the trap events defined by the OSPF traps in \n          this MIB. This object is used to enable and  \n          disable  specific OSPF   traps   where  a  1  \n          in  the  corresponding bit  field represents \n          enabled.",
                "readOnly": true
              },
              "cospfConfigErrorType": {
                "type": "string",
                "description": "Potential types of configuration conflicts.\n          Used  by the cospfConfigError and cospfConfigVirtError\n          traps. When the last value of a trap\n          using this object is needed, but no traps of\n          that type have been sent, this value pertaining\n          to this object should be returned as noError.",
                "readOnly": true
              },
              "cospfPacketType": {
                "type": "string",
                "description": "OSPF packet types. When the last value of a trap\n          using this object is needed, but no traps of\n          that type have been sent, this value pertaining\n          to this object should be returned as nullPacket.",
                "readOnly": true
              },
              "cospfPacketSrc": {
                "type": "string",
                "description": "The IP address of an inbound packet that can-\n          not be identified by a neighbor instance. When\n          the last value of a trap using this object is\n          needed, but no traps of that type have been sent,\n          this value pertaining to this object should\n          be returned as 0.0.0.0.",
                "format": "inet:ipv4-address",
                "readOnly": true
              }
            },
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-1": {
        "type": "object",
        "description": "object-1",
        "properties": {
          "ospfRouterId": {
            "type": "string",
            "description": "ospfRouterId",
            "x-yang-type": "leafref",
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-2": {
        "type": "object",
        "description": "object-2",
        "properties": {
          "cospfShamLinksLocalIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddr": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddr": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksAreaId": {
            "type": "string",
            "description": "The area that this sham link is part of.",
            "x-yang-type": "ospf-mib:AreaID",
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-3": {
        "type": "object",
        "description": "object-3",
        "properties": {
          "cospfShamLinksAreaId": {
            "type": "string",
            "description": "cospfShamLinksAreaId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddr": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddr": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddrType": {
            "type": "string",
            "description": "The type of internet address of this sham link's local IP\n          address.",
            "x-yang-type": "inet-address:InetAddressType",
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-4": {
        "type": "object",
        "description": "object-4",
        "properties": {
          "cospfShamLinksAreaId": {
            "type": "string",
            "description": "cospfShamLinksAreaId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddr": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddr": {
            "type": "string",
            "description": "The Local IP address of the sham link.",
            "x-yang-type": "inet-address:InetAddress",
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-5": {
        "type": "object",
        "description": "object-5",
        "properties": {
          "cospfShamLinksAreaId": {
            "type": "string",
            "description": "cospfShamLinksAreaId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddr": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddr": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddrType": {
            "type": "string",
            "description": "The type of internet address of this sham link's remote IP\n          address.",
            "x-yang-type": "inet-address:InetAddressType",
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-6": {
        "type": "object",
        "description": "object-6",
        "properties": {
          "cospfShamLinksAreaId": {
            "type": "string",
            "description": "cospfShamLinksAreaId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddr": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddr": {
            "type": "string",
            "description": "The IP address of the other end router of the sham link.",
            "x-yang-type": "inet-address:InetAddress",
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-7": {
        "type": "object",
        "description": "object-7",
        "properties": {
          "cospfShamLinksAreaId": {
            "type": "string",
            "description": "cospfShamLinksAreaId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksLocalIpAddr": {
            "type": "string",
            "description": "cospfShamLinksLocalIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddrType": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddrType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksRemoteIpAddr": {
            "type": "string",
            "description": "cospfShamLinksRemoteIpAddr",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfShamLinksState": {
            "type": "string",
            "description": "cospfShamLinksState",
            "x-yang-type": "leafref",
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-8": {
        "type": "object",
        "description": "object-8",
        "properties": {
          "ospfLsdbAreaId": {
            "type": "string",
            "description": "ospfLsdbAreaId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "ospfLsdbLsid": {
            "type": "string",
            "description": "ospfLsdbLsid",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "ospfLsdbRouterId": {
            "type": "string",
            "description": "ospfLsdbRouterId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "cospfLsdbType": {
            "type": "string",
            "description": "The type of the link state advertisement.\n          Each link state type has a separate advertisement format.",
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-9": {
        "type": "object",
        "description": "object-9",
        "properties": {
          "ospfLsdbAreaId": {
            "type": "string",
            "description": "ospfLsdbAreaId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "ospfLsdbType": {
            "type": "string",
            "description": "ospfLsdbType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "ospfLsdbRouterId": {
            "type": "string",
            "description": "ospfLsdbRouterId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "ospfLsdbLsid": {
            "type": "string",
            "description": "ospfLsdbLsid",
            "x-yang-type": "leafref",
            "readOnly": true
          }
        }
      },
      "CISCO-OSPF-TRAP-MIB_object-10": {
        "type": "object",
        "description": "object-10",
        "properties": {
          "ospfLsdbAreaId": {
            "type": "string",
            "description": "ospfLsdbAreaId",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "ospfLsdbType": {
            "type": "string",
            "description": "ospfLsdbType",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "ospfLsdbLsid": {
            "type": "string",
            "description": "ospfLsdbLsid",
            "x-yang-type": "leafref",
            "readOnly": true
          },
          "ospfLsdbRouterId": {
            "type": "string",
            "description": "ospfLsdbRouterId",
            "x-yang-type": "leafref",
            "readOnly": true
          }
        }
      },
      "restconf-error": {
        "type": "object",
        "description": "Standard RESTCONF error response (RFC 8040 Section 7.1)",
        "properties": {
          "ietf-restconf:errors": {
            "type": "object",
            "properties": {
              "error": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "error-type": {
                      "type": "string",
                      "enum": [
                        "transport",
                        "rpc",
                        "protocol",
                        "application"
                      ],
                      "description": "Layer where the error occurred"
                    },
                    "error-tag": {
                      "type": "string",
                      "description": "Enumerated error tag (e.g. invalid-value, data-missing, access-denied)"
                    },
                    "error-severity": {
                      "type": "string",
                      "enum": [
                        "error",
                        "warning"
                      ],
                      "description": "Error severity"
                    },
                    "error-app-tag": {
                      "type": "string",
                      "description": "Application-specific error tag"
                    },
                    "error-path": {
                      "type": "string",
                      "description": "YANG instance-identifier of the error node"
                    },
                    "error-message": {
                      "type": "string",
                      "description": "Human-readable error description"
                    }
                  },
                  "required": [
                    "error-type",
                    "error-tag"
                  ]
                }
              }
            }
          }
        },
        "example": {
          "ietf-restconf:errors": {
            "error": [
              {
                "error-type": "protocol",
                "error-tag": "invalid-value",
                "error-severity": "error",
                "error-message": "Invalid input parameter"
              }
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "tags": [
    {
      "name": "CISCO-OSPF-TRAP-MIB",
      "description": "MIB operations for CISCO-OSPF-TRAP-MIB"
    }
  ],
  "externalDocs": {
    "description": "Cisco SNMP Object Navigator",
    "url": "https://snmp.cloudapps.cisco.com/Support/IOS/do/BrowseMIB.do"
  }
}
