certat / do-portal

This project is in maintenance mode and will only receive bug fixes, but no new features. A new version of this software is being developed.
5 stars 5 forks source link

abuse_finder API #59

Closed MarkHofstetter closed 5 years ago

MarkHofstetter commented 5 years ago

https://github.com/certat/do-portal/wiki#abuse_finder-api

GET /api/v1/ripe/contact?netblock=1.2.3.0/24

implemented in https://github.com/certat/do-portal/commit/fc6d72a1b0b09bb09cd35b52d02aea7ebd46cf48

please review: https://github.com/certat/do-portal/blob/devel/tests/test_fody.py if this is how it was meant

certrik commented 5 years ago

If fody_org2.abusecs is an array which delivers all abuse-cs' that are defined for the orga (manual abuse-c are priorized) than it is okay for me. @wagner-certat please also review.

MarkHofstetter commented 5 years ago

as specified:

A local abusec (if defined) is returned otherwise the abusec from the ripe handle is returned The default setting are returned (config tbd) unless more specific setting are defined.

GET /api/v1/ripe/contact?netblock=1.2.3.0/24 Get the direct abuse_c which holds the netblock 1.2.3.0/24 and only this abuse_c

EITHER the "manual" if present OR the automatic abusecs are returned

certrik commented 5 years ago

Perfect.

MarkHofstetter commented 5 years ago

''' GET /ripe/contact/ripe/contact?cidr=195.245.92.0/23
returns

{ "abusecs": [ "abuse@nextlayer.at" ], "notification_setting": { "cidr": "195.245.92.0/23", "delivery_format": "CSV", "delivery_protocol": "Mail", "notification_interval": 604800, "organization_id": null, "ripe_org_hdl": null } } '''