> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphiant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /v1/device/routing/ospfv2/rib

> Get OSPFv2 Local RIB Table

## OpenAPI

````json GET /v1/device/routing/ospfv2/rib
{
  "openapi": "3.0.0",
  "info": {
    "title": "Graphiant APIs",
    "version": "1.0.0",
    "description": "Graphiant API documentation."
  },
  "servers": [
    {
      "url": "https://api.graphiant.com"
    }
  ],
  "security": [
    {
      "jwtAuth": []
    }
  ],
  "tags": [],
  "paths": {
    "/v1/device/routing/ospfv2/rib": {
      "get": {
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer token. Format: Bearer <your_token_here>"
          },
          {
            "name": "deviceId",
            "in": "query",
            "description": "Valid configured device ID > 0",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "example": 1234567891011
            },
            "example": 1000000
          },
          {
            "name": "instanceName",
            "in": "query",
            "description": "Valid configured OSPF Instance name",
            "required": false,
            "schema": {
              "type": "string",
              "example": "example string"
            },
            "example": "BGP-ODP"
          },
          {
            "name": "before",
            "in": "query",
            "description": "",
            "required": false,
            "schema": {
              "type": "string",
              "example": "example string"
            }
          },
          {
            "name": "last",
            "in": "query",
            "description": "",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "example": 123,
              "minimum": 0
            }
          },
          {
            "name": "vrfName",
            "in": "query",
            "description": "Valid configured VRF name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "example string"
            },
            "example": "management"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1DeviceRoutingOspfv2RibGetResponse"
                }
              }
            }
          }
        },
        "description": "Get OSPFv2 Local RIB Table"
      }
    }
  },
  "components": {
    "schemas": {
      "v1DeviceRoutingOspfv2RibGetResponse": {
        "type": "object",
        "properties": {
          "pageInfo": {
            "$ref": "#/components/schemas/commonPageInfo"
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/routingOspfRoute"
            }
          },
          "token": {
            "type": "string",
            "example": "xxxxxxxxx",
            "description": "Reference to the resultset being queried, this should be sent by the service as part of a previous request and so can be opaque to the client."
          }
        },
        "additionalProperties": false
      },
      "commonPageInfo": {
        "type": "object",
        "properties": {
          "currentPage": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0,
            "description": "The page number we are currently on (required)"
          },
          "endCursor": {
            "type": "string",
            "example": "xxxxxxy",
            "description": "Cursor pointing to the last record on the current page"
          },
          "hasNextPage": {
            "type": "boolean",
            "example": true,
            "description": "An indicator whether there is a page after this one in the resultset based on current position"
          },
          "hasPrevPage": {
            "type": "boolean",
            "example": true,
            "description": "An indicator whether there is a page before this one in the resultset based on current position"
          },
          "startCursor": {
            "type": "string",
            "example": "xxxxxx",
            "description": "Cursor pointing to the first record on the current page"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "example": 4,
            "minimum": 0,
            "description": "The number of pages in the complete resultset based on the current length of the page (required)"
          },
          "totalRecords": {
            "type": "integer",
            "format": "int32",
            "example": 400,
            "minimum": 0,
            "description": "Describes the total number of records in the complete resultset (required)"
          }
        },
        "additionalProperties": false
      },
      "routingOspfRoute": {
        "type": "object",
        "properties": {
          "ipPrefix": {
            "type": "string",
            "example": "131.1.0.0/16",
            "description": "IPv4 or IPv6 Prefix (required)"
          },
          "path": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/routingOspfNextHop"
            }
          }
        },
        "additionalProperties": false
      },
      "routingOspfNextHop": {
        "type": "object",
        "properties": {
          "egressInterface": {
            "type": "string",
            "example": "ATTInterface",
            "description": "Interface name (required)"
          },
          "lastModified": {
            "$ref": "#/components/schemas/googleProtobufTimestamp"
          },
          "metric": {
            "type": "integer",
            "format": "int32",
            "example": 120,
            "minimum": 0,
            "description": "value > 0 (required)"
          },
          "nextHop": {
            "type": "string",
            "example": "10.1.1.1",
            "description": "IPv4 or IPv6 Nexthop (required)"
          },
          "tag": {
            "type": "integer",
            "format": "int32",
            "example": 12312,
            "minimum": 0,
            "description": "admin assigned number (required)"
          },
          "type": {
            "type": "string",
            "example": "internal or external",
            "description": "route type (required)"
          }
        },
        "additionalProperties": false
      },
      "googleProtobufTimestamp": {
        "type": "object",
        "properties": {
          "nanos": {
            "type": "integer",
            "format": "int32",
            "example": 123
          },
          "seconds": {
            "type": "integer",
            "format": "int64",
            "example": 1234567891011
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "jwtAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "authorization",
        "description": "Use `Bearer <token>`"
      }
    }
  }
}
````

