Dashboard do SDWAN

Esta é uma API de consulta de informações referente ao serviço do SDWAN. Com esta API é possível monitorar o status das tabelas de roteamento dentro das políticas, bem como executar o failback manual quando habilitado.

Buscar informações do dashboard do SDWAN

API de busca de informações de dashboard do SDWAN.

GET /api/sdwan/dashboard

Exemplo de requisição

GET /api/sdwan/dashboard HTTP/1.1
Host: api.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
response = sdk.sdwan.dashboard()
const response = sdk.sdwan.dashboard();

Exemplo de resposta

HTTP/1.1 200 OK
Content-Type: application/json

{
  "default_route": {
    "id": 1,
    "policy_routing_name": "pr01",
    "routing_table_name": "table01",
    "last_change": "2018-12-13T12:20:02.932000+00:00",
  },
  "policies_routing": [
    {
      "id": 1,
      "name": "pr01",
      "manual_failback": false,
      "routing_tables": [
        {
          "id": 1,
          "name": "table01",
          "status": "ok",
          "operation": "in_use",
          "last_change": "2018-12-13T12:20:02.932000+00:00",
          "failback_remaining_seconds": null,
        },
        {
          "id": 2,
          "name": "table02",
          "status": "ok",
          "operation": "ready",
          "last_change": "2018-12-13T12:20:02.932000+00:00",
          "failback_remaining_seconds": 75,
        },
        {
          "id": 3,
          "name": "table03",
          "status": "disabled",
          "operation": null,
          "last_change": "2018-12-13T12:20:10.932000+00:00",
          "failback_remaining_seconds": 30,
        },
      ],
    },
    {
      "id": 2,
      "name": "pr02",
      "manual_failback": true,
      "routing_tables": [
        {
          "id": 3,
          "name": "table03",
          "status": "fail",
          "operation": "fail",
          "last_change": "2018-12-13T12:30:02.932000+00:00",
          "failback_remaining_seconds": null,
        },
        {
          "id": 4,
          "name": "table04",
          "status": "ok",
          "operation": "in_use",
          "last_change": "2018-12-13T12:20:10.932000+00:00",
          "failback_remaining_seconds": null,
        },
      ],
    },
  ],
}
Dashboard(
    default_route=DefaultRoute(
        id=1,
        policy_routing_name="pr01",
        routing_table_name="table01",
        last_change=DateTime(2018, 12, 13, 12, 20, 2, tzinfo=Timezone('+00:00'),
    ),
    policies_routing=[
        PolicyRouting(
            id=1,
            name="pr01",
            manual_failback=False,
            routing_tables=[
              RoutingTable(
                    id=1,
                    name="table01",
                    status="ok",
                    operation="in_use",
                    last_change=DateTime(2018, 12, 13, 12, 20, 2, tzinfo=Timezone('+00:00')),
                    failback_remaining_seconds=None,
                ),
                RoutingTable(
                    id=2,
                    name="table02",
                    status="ok",
                    operation="ready",
                    last_change=DateTime(2018, 12, 13, 12, 20, 2, tzinfo=Timezone('+00:00')),
                    failback_remaining_seconds=75,
                ),
                RoutingTable(
                    id=3,
                    name="table03",
                    status="disabled",
                    operation=None,
                    last_change=DateTime(2018, 12, 13, 12, 20, 10, tzinfo=Timezone('+00:00')),
                    failback_remaining_seconds=30,
                ),
            ],
        ),
        PolicyRouting(
            id=2,
            name="pr02",
            manual_failback=True,
            routing_tables=[
                RoutingTable(
                    id=3,
                    name="table03",
                    status="fail",
                    operation="fail",
                    last_change=DateTime(2018, 12, 13, 12, 30, 2, tzinfo=Timezone('+00:00')),
                    failback_remaining_seconds=None,
                ),
                RoutingTable(
                    id=4,
                    name="table04",
                    status="ok",
                    operation="in_use",
                    last_change=DateTime(2018, 12, 13, 12, 30, 2, tzinfo=Timezone('+00:00')),
                    failback_remaining_seconds=None,
                ),
            ],
        ),
    ],
)

{
  defaultRoute: {
    id: 1,
    policyRoutingName: "pr01",
    routingTableName: "table01",
    lastChange: "2018-12-13T12:20:02.000Z",
  },
  policiesRouting: [
    {
      id: 1,
      name: "pr01",
      manualFailback: false,
      routingTables: [
        {
          id: 1,
          name: "table01",
          status: "ok",
          operation: "in_use",
          lastChange: "2018-12-13T12:20:02.000Z",
          failbackRemainingSeconds: null,
        },
        {
          id: 2,
          name: "table02",
          status: "ok",
          operation: "ready",
          lastChange: "2018-12-13T12:20:02.000Z",
          failbackRemainingSeconds: 75,
        },
        {
          id: 3,
          name: "table03",
          status: "disabled",
          operation: null,
          lastChange: "2018-12-13T12:20:10.000Z",
          failbackRemainingSeconds: 30,
        },
      ],
    },
    {
      id: 2,
      name: "pr02",
      manualFailback: true,
      routingTables: [
        {
          id: 3,
          name: "table03",
          status: "fail",
          operation: "fail",
          lastChange: "2018-12-13T12:30:02.000Z",
          failbackRemainingSeconds: null,
        },
        {
          id: 4,
          name: "table04",
          status: "ok",
          operation: "in_use",
          lastChange: "2018-12-13T12:30:02.000Z",
          failbackRemainingSeconds: null,
        },
      ],
    },
  ],
}

Formato dos dados

Resposta

Campo Descrição
default_route object

Dados da política e da tabela de roteamento cadastradas na configuração do serviço para serem utilizados na rota padrão

default_route.id int

Identificador da política de roteamento

default_route.policy_routing_name string

Nome da política de roteamento

default_route.routing_table_name string

Nome da tabela de roteamento em uso na rota padrão

last_change string

Data da última modificação da tabela de roteamento

Formato: ISO-8601

policies_routing array<object>

Lista dos dados das políticas de roteamento

policies_routing[].id int

Identificador da política de roteamento

policies_routing[].name string

Nome da política de roteamento

policies_routing[].manual_failback bool

Flag que indica se o failback manual está habilitado ou desabilitado

policies_routing[].routing_tables array<object>

Lista do status das tabelas de roteamento da política

policies_routing[].routing_tables[].id int

Identificador da tabela de roteamento

policies_routing[].routing_tables[].name string

Name da tabela de roteamento

policies_routing[].routing_tables[].status string

Status da tabela de roteamento

Valores possíveis:

  • ok: quando a tabela está ativa
  • fail: quando a tabela está em estado falha
  • disabled: quando a tabela está desabilitada
policies_routing[].routing_tables[].operation string

Estado de operação da tabela de roteamento

Valores possíveis:

  • fail: quando a tabela está com falha
  • in_failback: quando a tabela está aguardando a ação de failback
  • ready: quando a tabela está pronta para uso
  • in_use: quando a tabela está em uso

Valor padrão: NULL

policies_routing[].routing_tables[].last_change string

Data da última modificação da tabela de roteamento

Formato: ISO-8601

policies_routing[].routing_tables[].failback_remaining_seconds int

Tempo restante, em segundos, para o failback