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
Reference: API endpoint: 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 ofclient_id
of the network stored in the databasedescr
- Description of the networknetname
- Name of the networkrank
- Rank of the network, used for reportingsource
- The source of the networkresolved_abuses
- A dictionary which may contain the following keys:low
- A list of email addresses used for reporting events with low severitymedium
- A list of email addresses used for reporting events with medium severityhigh
- A list of email addresses used for reporting events with high severitycritical
- A list of email addresses used for reporting events with critical severityfallback
- A list of fallback email addresses
the IP address of the network, which could be either
IP4_start
andIP4_end
, orIP6_addr
andIP6_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"