Retrieve security settings for PortSIP PBX
GET
/security/show
Retrieves the security settings of PortSIP PBX.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.
Sample Request
https://example.com/api/security/show?access_token=196ACE20C6F34027895F7F95402BB164
Response
Placeholder
web_login
object
required
Show child attributesPlaceholdersip
object
required
Show child attributesPlaceholder
Sample Response
{
"web_login": {
"failed_auth_amount": 5,
"blacklist_time_interval": 3600
},
"sip": {
"failed_auth_amount": 5,
"failed_challenge_requests_amount": 1000,
"blacklist_time_interval": 3600,
"detection_period": 200,
"security_barrier_a": {
"packets_amount": 4000,
"blacklist_time_interval": 3600
},
"security_barrier_b": {
"packets_amount": 2000,
"block_time_interval": 5
}
}
}
Update security settings for PortSIP PBX
POST
/security/update
Modify the global security settings of PortSIP PBX.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.web_login
object
required
Show child attributesPlaceholdersip
object
required
Show child attributesPlaceholder
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"web_login": {
"failed_auth_amount": 5,
"blacklist_time_interval": 3600
},
"sip": {
"failed_auth_amount": 5,
"failed_challenge_requests_amount": 1000,
"blacklist_time_interval": 3600,
"detection_period": 200,
"security_barrier_a": {
"packets_amount": 4000,
"blacklist_time_interval": 3600
},
"security_barrier_b": {
"packets_amount": 2000,
"block_time_interval": 5
}
}
}
Response
Placeholders
Sample Response
List allowed country codes
GET
/security/allowed_country_codes/list
List allowed country codes
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.
Sample Request
https://example.com/api/security/allowed_country_codes/list?access_token=196ACE20C6F34027895F7F95402BB164
Response
Placeholders
codes
array
required
Collection of allowed country codes
Sample Response
{
"codes": [
"86",
"1"
]
}
Update allowed country codes
POST
/security/allowed_country_codes/update
Update allowed country codes
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.codes
array
required
Collection of allowed country codes
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"codes": [
"86",
"1"
]
}
Response
Placeholders
Sample Response
List disallowed codes
GET
/security/disallowed_codes/list
List disallowed codes
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.pagination
integer
required
The pagination of paging.pagesize
integer
optional
The pagesize of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user has not specified value for this field.
Sample Request
https://example.com/api/security/disallowed_codes/list?access_token=196ACE20C6F34027895F7F95402BB164&pagesize=100&pagination=1&sort_by=DEFAULT
Response
Placeholders
pagination
integer
required
The pagination of paging.pagesize
integer
optional
The pagesize of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user has not specified value for this field.page_count
integer
required
The total count of pages.count
integer
required
Current pagesize.codes
array
required
Show child attributesPlaceholder
Sample Response
{
"pagination": 1,
"pagesize": 100,
"sort_by": "DEFAULT",
"page_count": 100,
"count": 100,
"codes": [
{
"number_prefix": 64,
"description": 64
},
{
"number_prefix": 128,
"description": 128
}
]
}
Create new disallowed country code
POST
/security/disallowed_codes/create
Create new disallowed country code
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.number_prefix
string
required
Placeholderdescription
string
required
Placeholder
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"number_prefix": 64,
"description": 64
}
Response
Placeholders
Sample Response
Delete disallowed country code
POST
/security/disallowed_codes/destroy
Delete disallowed country code
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.number_prefix
string
required
Placeholder
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"number_prefix": 64
}
Response
Placeholders