Banned IP
  • 16 Jun 2022
  • 2 Minutes to read
  • Dark
    Light

Banned IP

  • Dark
    Light

Article summary

Banned IP

You need the Manage Ban List permission to manage Banned Ip.

Banned IP JSON Format

Banned IP is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the banned IP.
ipRangeFromstringBeginning of the banned IP range.
ipRangeTostringEnd of the banned IP range.
commentstringComment of the banned IP.
lastUpdatedTimetimestampLast updated time of the banned IP.
createdTimedatetimeCreated time of the ban.
agentIdguidId of the agent.

Get the list of Banned IPs

GET livechat/bannedIps

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "agent".
  • Response:

An array of Banned IP

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/bannedIps \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "bannedIps": [
      {
          "id": "7ba1f316-2ae2-49fc-ab65-0114a636c4ca",
          "ipRangeFrom": "192.168.2.127",
          "ipRangeTo": "192.168.2.127",
          "comment": "This comment is used as an example.",
          "lastUpdatedTime": "2021-04-12T02:50:25.64Z",
          "createdTime": "2021-04-12T02:40:25.64Z",
          "agentId": "AF63BFD4-3C20-4D16-833D-C9F9671589CD"
      }
  ],
  "nextPage": null,
  "previousPage": null,
  "total": 1
} 

Get a single Banned IP

GET livechat/bannedIps/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "agent".
  • Response:

Banned IP

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/bannedIps/7ba1f316-2ae2-49fc-ab65-0114a636c4ca \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "7ba1f316-2ae2-49fc-ab65-0114a636c4ca",
  "ipRangeFrom": "192.168.2.127",
  "ipRangeTo": "192.168.2.127",
  "comment": "This comment is used as an example.",
  "lastUpdatedTime": "2021-04-12T02:50:25.64Z",
  "createdTime": "2021-04-12T02:40:25.64Z",
  "agentId": "AF63BFD4-3C20-4D16-833D-C9F9671589CD"
} 

Create a new Banned IP

POST livechat/bannedIps

  • Parameters:

NameTypeinRequiredDescription
ipRangeFromstringbodyyesBeginning of the banned IP range.
ipRangeTostringbodyyesEnd of the banned IP range.
commentstringbodynoComment of the banned IP.
agentIdguidbodynoId of the agent.
  • Response:

Banned IP

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/bannedIps \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"ipRangeFrom":"192.168.2.127","ipRangeTo":"192.168.2.127","comment":"This comment is used as an example.","agentId":"AF63BFD4-3C20-4D16-833D-C9F9671589CD"}' 

Response:

HTTP/1.1 201 Created

{
  "id": "7ba1f316-2ae2-49fc-ab65-0114a636c4ca",
  "ipRangeFrom": "192.168.2.127",
  "ipRangeTo": "192.168.2.127",
  "comment": "This comment is used as an example.",
  "lastUpdatedTime": "2021-04-12T02:50:25.64Z",
  "createdTime": "2021-04-12T02:40:25.64Z",
  "agentId": "AF63BFD4-3C20-4D16-833D-C9F9671589CD"
} 

Update the Banned IP

PUT livechat/bannedIps/{id}

  • Parameters:

NameTypeinRequiredDescription
ipRangeFromstringbodyyesBeginning of the banned IP range.
ipRangeTostringbodyyesEnd of the banned IP range.
commentstringbodynoComment of the banned IP.
agentIdguidbodynoId of the agent.
  • Response:

Banned IP

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/bannedIps/7ba1f316-2ae2-49fc-ab65-0114a636c4ca \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"ipRangeFrom":"192.168.2.127","ipRangeTo":"192.168.2.127","comment":"This comment is used as an example.","agentId":"AF63BFD4-3C20-4D16-833D-C9F9671589CD"}' 

Response:

HTTP/1.1 200 OK

{
  "id": "7ba1f316-2ae2-49fc-ab65-0114a636c4ca",
  "ipRangeFrom": "192.168.2.127",
  "ipRangeTo": "192.168.2.127",
  "comment": "This comment is used as an example.",
  "lastUpdatedTime": "2021-04-12T02:50:25.64Z",
  "createdTime": "2021-04-12T02:40:25.64Z",
  "agentId": "AF63BFD4-3C20-4D16-833D-C9F9671589CD"
} 

Remove the Banned IP

DELETE livechat/bannedIps/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/bannedIps/7ba1f316-2ae2-49fc-ab65-0114a636c4ca \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?

What's Next