Get all blocked IPs

GET
/api/users/[user_id]/blocked_ips
Retrieves a paginated list of IP addresses that have been blocked for the specified user. Each blocked IP entry includes details about the login attempts and the block duration. The endpoint allows you to specify optional search parameters to filter and refine the results.

Query Parameters

page
number

The page number to retrieve.

Default: 1
size
number

The number of items per page.

Default: 10
filter
string

A query filter to apply when searching for blocked IPs.

sort
string

The sort criteria in 'sort_key:sort_order' format. Sort order can be '1' for ascending and '-1' for descending. Acceptable sort key values are 'block_until' and 'last_login_attempt'.

Path Parameters

user_id
string
Required

The ID of the user whose blocked IP addresses should be retrieved.

Authentication

X-API-KEY
header
Required

The API key is essential for accessing MonoCloud's APIs. You can find it in the Tenant Settings section of your MonoCloud dashboard. To authenticate your requests, include this key in the request header using the following format: X-API-Key: <Your_API_Key>.

Headers

accept
string
  • application/json
  • application/problem+json

Responses

200
Successfully retrieved user's blocked IP addresses
400
Bad Request
422
Client Error
404
Not Found
401
Unauthorized
403
Forbidden

Request Example

Request
curl -X GET "https://<your-domain>/api/users/{user_id}/blocked_ips?page=1&size=10&filter=1.1.1.1&sort=block_until:1" \
 -H "X-API-KEY: <your-api-key>" \
 -H "Accept: application/json"

Response Example

Response
200 OK
[
  {
    "login_count": 20,
    "ip": "1.1.1.1",
    "block_until": 1658129587,
    "failure_count": 4,
    "last_login_attempt": 1640975400
  }
]