Global SettingsUpdate Geo Block Settings

Update Geo Block Settings

update streams geoblock setting

curl -X POST "https://api.5centscdn.com/v2/streams/settings/security/geoblock" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "enabled": "Y",
  "policy": "N",
  "list": [
    "US",
    "GB",
    "IN"
  ],
  "ips": "192.168.0.1",
  "mode": "save"
}'
{
  "result": "success",
  "message": "Stream Settings Updated. Please wait till the deployment completes."
}
POST
/streams/settings/security/geoblock
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
enabledstring

Values can be Y or N. Set to Y if Geo Block should be enabled. Set to N if Geo Block should not be enabled.

policystring

Values can be Y or N. Set to Y if geoblock countries list should be allowed. Set to N if geoblock countries list should be blocked.

listarray

List of ISO 3166-1 alpha-2 country codes to allow or block based on the policy. Each entry must be a valid two-letter country code (e.g. US for United States, GB for United Kingdom, IN for India).

ipsstring

List of IPs to whitelist when geoblock is enabled. IPs should be separated by comma.

modestring

Controls how the settings are applied to streams. save — only saves the settings, no changes will be made to existing stream settings. append — appends the values to existing streams data and updates. overwrite — overwrites the existing streams values, replacing them and updates.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Body

application/json
enabledstring

Values can be Y or N. Set to Y if Geo Block should be enabled. Set to N if Geo Block should not be enabled.

Example:
Y
policystring

Values can be Y or N. Set to Y if geoblock countries list should be allowed. Set to N if geoblock countries list should be blocked.

Example:
N
listarray

List of ISO 3166-1 alpha-2 country codes to allow or block based on the policy. Each entry must be a valid two-letter country code (e.g. US for United States, GB for United Kingdom, IN for India).

Example:
["US","GB","IN"]
ipsstring

List of IPs to whitelist when geoblock is enabled. IPs should be separated by comma.

Example:
192.168.0.1
modestring

Controls how the settings are applied to streams. save — only saves the settings, no changes will be made to existing stream settings. append — appends the values to existing streams data and updates. overwrite — overwrites the existing streams values, replacing them and updates.

Example:
save

Responses

resultstring

Status of the API response.

messagestring

Human-readable message describing the result.