networks

This pluggable module provides access to network record management features. These features include:

  • general network record listing

  • detailed network record view

  • creating new network records

  • updating existing network records

  • deleting existing network records

Provided endpoints

/api/networks/get

Web API

For general information about web API please refer to section Web API.

Following is a list of all currently available API endpoints. These endpoints provide results as JSON document instead of full HTML page.

API endpoint: get

Relevant endpoint:

/api/networks/get
  • Authentication: login required

  • Authorization: maintainer, admin

  • Methods: GET

Response format

JSON document, that will be received as a response for the search, contains the following keys:

data
  • Description: This key contains a list of networks. Every network is a dictionary with following keys:

    • client_id - The value of client_id of the network stored in the database

    • descr - Description of the network

    • netname - Name of the network

    • rank - Rank of the network, used for reporting

    • source - The source of the network

    • resolved_abuses - A dictionary which may contain the following keys:

      • low - A list of email addresses used for reporting events with low severity

      • medium - A list of email addresses used for reporting events with medium severity

      • high - A list of email addresses used for reporting events with high severity

      • critical - A list of email addresses used for reporting events with critical severity

      • fallback - A list of fallback email addresses

    • the IP address of the network, which could be either

      • IP4_start and IP4_end, or

      • IP6_addr and IP6_prefix

  • Datatype: list of dictionaries

view_icon
  • Description: This subkey is always present in the response. It is intended for internal purposes.

  • Datatype: string

view_title
  • Description: This subkey is always present in the response. It is intended for internal purposes.

  • Datatype: string

Example response:

{
  "data": [
    {
      "client_id": 123456,
      "descr": "First demonstration IPv4 network",
      "ip4_end": "192.168.0.255",
      "ip4_start": "192.168.0.0",
      "netname": "NETNAME1",
      "rank": 999,
      "resolved_abuses": {
        "low": [
          "abuse@bogus-domain.org"
        ]
      },
      "source": "manual"
    },
    ...
  ],
  "view_icon": "module-networks",
  "view_title": "Networks"
}

Example usage with curl:

$ curl -X GET -d "api_key=your%AP1_k3y" "https://.../api/networks/get"