Ir al contenido principal

Gestionar tablas de enrutamiento

Requisitos previos

Autenticar - Envíe sus credenciales de usuario, ID de cliente y secreto de cliente para la autenticación OAuth2. Consulte API Authentication para obtener instrucciones sobre cómo llamar a la API OAuth para validar y autenticar sus credenciales.

Actualizar tablas de enrutamiento

Para activar una actualización de las tablas de enrutamiento de su Fabric Cloud Router, envíe una solicitud POST al punto final /fabric/v4/routers/{uuid}/actions.

POST /fabric/v4/routers/{uuid}/actions
MethodPOST
URL or Endpoint/fabric/v4/routers/{uuid}/actions
HeadersAuthorization, Content-Type
Path Parametersuuid
Query ParametersNot applicable
Body Parameterstype

Ejemplo de solicitud curl:

curl -X
POST 'https://api.equinix.com/fabric/v4/routers/{router_uuid}/actions'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
    "type": "ROUTE_TABLE_ENTRY_UPDATE"
}'

Parámetros corporales:

  • type (required) string - The routing table management action. To update your routing tables, use ROUTE_TABLE_ENTRY_UPDATE. To see all the prefixes learned via BGP, use RECEIVED_ROUTE_ENTRY_UPDATE. To See the prefixes that FCR is sending via BGP, use ADVERTISED_ROUTE_ENTRY_UPDATE.

  • connection (optional) object - An object that contains a uuid field to specify a connection. Only required for RECEIVED_ROUTE_ENTRY_UPDATE and ADVERTISED_ROUTE_ENTRY_UPDATE types.

Para obtener información completa sobre los parámetros y ejemplos, consulte la Referencia API.

Respuesta de muestra:

{
    "type": "ROUTE_TABLE_ENTRY_UPDATE",
    "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00",
    "state": "PENDING",
    "changeLog": {
        "createdDateTime": "2021-07-15T19:30:29.526Z",
        "updatedDateTime": "2021-08-15T19:30:29.526Z"
    }
}

Obtener solicitudes de gestión de tablas de enrutamiento

Para obtener una lista de solicitudes de gestión de tablas de enrutamiento, envíe una solicitud GET al punto final /fabric/v4/routers/{uuid}/actions. Utilice el parámetro de consulta state para filtrar la respuesta por el estado de la solicitud.

GET /fabric/v4/routers/{uuid}/actions
MethodGET
URL or Endpoint/fabric/v4/routers/{uuid}/actions
HeadersAuthorization
Path Parametersuuid
Query Parametersstate
Body ParametersNot applicable

Esta API recupera las solicitudes de acciones de gestión de tablas de enrutamiento.

Ejemplo de solicitud curl

curl -X
GET 'https://api.equinix.com/fabric/v4/routers/{router_uuid}/actions?state=<state>'
-H 'authorization: Bearer <token>'

Parámetro de consulta:

  • state (optional) string - Action execution status. Applicable values: PENDING, SUCCEEDED, or FAILED.

Respuesta de muestra:

{
    "type": "ROUTE_TABLE_ENTRY_UPDATE",
    "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00",
    "state": "PENDING",
    "changeLog": {
        "createdDateTime": "2021-07-15T19:30:29.526Z",
        "updatedDateTime": "2021-08-15T19:30:29.526Z"
    }
}

Búsqueda de tablas de enrutamiento Solicitudes de gestión

Para buscar solicitudes de gestión de tablas de enrutamiento, envíe una solicitud POST al punto final /fabric/v4/routers/{routerId}/actions/search, especificando los criterios de búsqueda en el cuerpo de la solicitud.

POST /fabric/v4/routers/{routerId}/actions/search
MethodPOST
URL or Endpoint/fabric/v4/routers/{routerId}/actions/search
HeadersAuthorization, Content-Type
Path ParametersrouterId
Query ParametersNot applicable
Body Parametersfilter, pagination, sort

Ejemplo de solicitud curl:

curl -X POST 'http: //api.equinix.com/fabric/v4/routers/{router_uuid}/actions/search'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
  "filter": {
    "and": [
      {
        "property": "/type",
        "operator": "IN",
        "values": [
          "ROUTE_TABLE_ENTRY_UPDATE",
          "RECEIVED_ROUTE_ENTRY_UPDATE"
        ]
      },
      {
        "property": "/state",
        "operator": "=",
        "values": [
          "SUCCEEDED"
        ]
      },
      {
        "property": "/connection/uuid",
        "operator": "IN",
        "values": [
          "3066ab1d-af87-49d7-8a14-c9bdb57ac809"
        ]
      }
    ]
  },
  "pagination": {
    "offset": 0,
    "limit": 1
  },
  "sort": [
    {
      "property": "/changeLog/createdDateTime",
      "direction": "DESC"
    }
  ]
}'

Parámetros corporales notables:

  • filter (required) object - The object that defines your search conditions.

  • and (required) array[object] - An array object that serves as the logical operator applied on the search objects in the array. You can search on:

    • property (required) string - Search field parameter. Note that the property value determines the list of applicable operators and values. Applicable values: "/name", "/uuid", "/state", "/location/metroCode", "/location/metroName", "/package/code" and an all-category search "\*".
    • operator (required) string - Search field parameter operator. Applicable values: "=", "!=", ">", ">=", "<", "<=", BETWEEN, LIKE, IN, "NOT BETWEEN", "NOT LIKE", "NOT IN".
    • value (required) array[string] - Search field parameter value.
  • pagination object - Optional object containing search results pagination settings with offset integer and limit integer fields.

  • sort object - Optional object that defines your search result sorting settings with direction string and property string fields.

Para obtener una lista completa de las propiedades buscables, los límites de paginación y las propiedades ordenables, consulte la referencia API.

Respuesta de muestra:

{
  "pagination": {
    "offset": 0,
    "limit": 1,
    "total": 2,
    "prev": null,
    "next": null
  },
  "data": [
    {
      "href": "https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/actions/1e9414f1-763e-4c0a-86c6-0bc8336048d9",
      "uuid": "1e9414f1-763e-4c0a-86c6-0bc8336048d9",
      "type": "RECEIVED_ROUTE_ENTRY_UPDATE",
      "state": "SUCCEEDED",
      "connection": {
        "uuid": "3066ab1d-af87-49d7-8a14-c9bdb57ac809"
      },
      "operation": {
        "bgpIpv4RoutesCount": 6,
        "bgpIpv6RoutesCount": 6
      },
      "changeLog": {
        "createdDateTime": "2024-01-01T01:00:00.000Z",
        "updatedDateTime": "2024-01-01T01:01:00.000Z"
      }
    }
  ]
}
¿Fue útil esta página?