New route to check blacklist only
Some checks are pending
continuous-integration/drone/push Build is running
Some checks are pending
continuous-integration/drone/push Build is running
This commit is contained in:
parent
d82dddb45e
commit
6f22d340d2
9 changed files with 586 additions and 2 deletions
|
|
@ -202,6 +202,39 @@ paths:
|
|||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
|
||||
/blacklist:
|
||||
post:
|
||||
tags:
|
||||
- tests
|
||||
summary: Check an IP address against DNS blacklists
|
||||
description: Tests a single IP address (IPv4 or IPv6) against configured DNS-based blacklists (RBLs) without requiring an actual email to be sent. Returns results immediately.
|
||||
operationId: checkBlacklist
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BlacklistCheckRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Blacklist check completed successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BlacklistCheckResponse'
|
||||
'400':
|
||||
description: Invalid request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
|
||||
/status:
|
||||
get:
|
||||
tags:
|
||||
|
|
@ -1182,3 +1215,48 @@ components:
|
|||
example: "A"
|
||||
dns_results:
|
||||
$ref: '#/components/schemas/DNSResults'
|
||||
|
||||
BlacklistCheckRequest:
|
||||
type: object
|
||||
required:
|
||||
- ip
|
||||
properties:
|
||||
ip:
|
||||
type: string
|
||||
description: IPv4 or IPv6 address to check against blacklists
|
||||
example: "192.0.2.1"
|
||||
pattern: '^([0-9]{1,3}\.){3}[0-9]{1,3}$|^([0-9a-fA-F]{0,4}:){7}[0-9a-fA-F]{0,4}$|^::([0-9a-fA-F]{0,4}:){0,6}[0-9a-fA-F]{0,4}$|^([0-9a-fA-F]{0,4}:){1,6}:([0-9a-fA-F]{0,4}:){0,5}[0-9a-fA-F]{0,4}$'
|
||||
|
||||
BlacklistCheckResponse:
|
||||
type: object
|
||||
required:
|
||||
- ip
|
||||
- checks
|
||||
- listed_count
|
||||
- score
|
||||
- grade
|
||||
properties:
|
||||
ip:
|
||||
type: string
|
||||
description: The IP address that was checked
|
||||
example: "192.0.2.1"
|
||||
checks:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/BlacklistCheck'
|
||||
description: List of blacklist check results
|
||||
listed_count:
|
||||
type: integer
|
||||
description: Number of blacklists that have this IP listed
|
||||
example: 0
|
||||
score:
|
||||
type: integer
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
description: Blacklist score (0-100, higher is better)
|
||||
example: 100
|
||||
grade:
|
||||
type: string
|
||||
enum: [A+, A, B, C, D, E, F]
|
||||
description: Letter grade representation of the score
|
||||
example: "A+"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue