Blocked clients
Use these methods to manage blocked clients. Clients can be blocked for a certain period of time after exceeding various limits specified on the System > Settings page of the Back Office.
GET[host]/api/v2/security/addresses |
|
GET[host]/api/v2/security/addresses/{addressId} |
|
DELETE[host]/api/v2/security/addresses/{addressId} |
Get a list of blocked clients
Use this method to obtain a list of blocked clients.
Request
Header parameters:
Authorization: Bearer <access_token>
Query parameters:
The following filter parameters are available for this method:
- clientId
The client identifier.
- clientEmail
The client email address.
- ip
The IP address from which a client attempted to sign in to the B2Core UI.
The following sorting parameter is available for this method:
- createTime
The date and time when a client was blocked.
Refer to the Query parameters section of the Overview for details on applying filter and sorting parameters.
GET[host]/api/v2/security/addresses
curl --location -g --request GET 'https://host.name/api/v2/security/addresses?limit=10&offset=0&sort_order=desc&sort_by=createTime&filter[clientId]=1&filter[clientEmail]=example@gmail.com&filter[ip]=192.168.1.1' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response contains an array of objects providing the following data about each blocked client:
- id integer
The identifier of an event of client blocking.
- clientId integer
The client identifier.
- clientEmail string
The client email address.
- ip string
The IP address from which a client attempted to sign in to the B2Core UI.
- reason string
The reason for blocking a client.
- createTime string
The date and time when a client was blocked.
- expireTime string
The date and time when a blocking period expires.
{
"total": 1,
"data": [
{
"id": 1,
"clientId": 1,
"clientEmail": "jdoe@example.com",
"ip": "127.0 0.1",
"reason": "Too many login attempts",
"createTime": "2022-01-01T00:00:00+00:00",
"expireTime": "2022-01-01T00:00:00+00:00"
},
{
"id": 2,
"clientId": 2,
"clientEmail": "smith@example.com",
"ip": "125.0 0.3",
"reason": "Too many login attempts",
"createTime": "2022-01-01T00:00:00+00:00",
"expireTime": "2022-01-01T00:00:00+00:00"
}
]
}
Get blocked client details
Use this method to obtain detailed information about a specified blocked client.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- addressId required
The identifier of an event of client blocking.
GET[host]/api/v2/security/addresses/{addressId}
curl --location --request GET 'https://host.name/api/v2/security/addresses/1' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response includes the following data:
- id integer
The identifier of an event of client blocking.
- clientId integer
The client identifier.
- clientEmail string
The client email address.
- ip string
The IP address from which a client attempted to sign in to the B2Core UI.
- reason string
The reason for blocking a client.
- createTime string
The date and time when a client was blocked.
- expireTime string
The date and time when a blocking period expires.
{
"id": 1,
"clientId": 1,
"clientEmail": "example@gmail.com",
"ip": "127.0 0.1",
"reason": "Too many login attempts",
"createTime": "2022-01-01T00:00:00+00:00",
"expireTime": "2022-01-01T00:00:00+00:00"
}
Unblock a client
Use this method to unblock a specified client.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- addressId required
The identifier of an event of client blocking.
DELETE[host]/api/v2/security/addresses/{addressId}
curl --location --request DELETE 'https://host.name/api/v2/security/addresses/1' \
--header 'Authorization: Bearer <token>'
Response
In case of success, no response body is returned.