All Downloads are FREE. Search and download functionalities are using the official Maven repository.

api.banlists-api.adoc Maven / Gradle / Ivy

There is a newer version: 1.0.50
Show newest version
= Restcomm API – Ban List

[[BanLists]]
== BanLists

Ban lists perform allow/deny access control (ACL) at IP address level. Two implementations of BanLists are available: WhiteList and BlackList.
WhiteList allows certain IP Addresses to reach DMZ interfaces while BlackList blocks them at all. White/Black list consistence is controlled by the system while Black lists have precedence analysis over White ones.

=== BanList Resource URI

*/2012-04-24/[WhiteLists|BlackLists]/\{IpAddress}*

=== Resource Properties

[cols=",",options="header",]
|=========================================================================================================================
|Property |Description
|IpAddress |A string that uniquely identifies the host/net address.
|DateCreated |The date that this entry was created.
|DateExpires |The date that this entry will expire.
|Reason |A description of the cause this entry is included in the list, available options are: Threat, Admin.
|Action |The action to be taken for further processing.
|AccountSid |The account ID who created the entry.
|=========================================================================================================================

=== Supported Operations

*HTTP GET.* Returns the representation of an BanList resource, including the properties above.

* BanList Resource URI. */2012-04-24/[WhiteLists|BlackLists]/\{IpAddress}*

**HTTP POST/PUT**. Creates a new BanList entry resource and returns the representation, including the properties above. Below you will find a list of optional parameters.

=== Request Parameters

[cols=",",options="header",]
|==============================================================================================
|Parameter |Description
|IpAddress |A description of the address, up to 64 characters long.
|==============================================================================================

**Get information about a BanList.**

....
curl -X GET  http://ACae6e420f425248d6a26948c17a9e2acf:[email protected]:8080/restcomm-sbc/2012-04-24/WhiteLists
....


The above commands will print an output similar to the one below:

----

 
  
     
       Mon, 25 Jul 2016 08:14:57 -0300
       Mon, 25 Jul 2016 08:14:57 -0300
       ACae6e420f425248d6a26948c17a9e2acf
       192.168.0.32
       Apply
       Admin
     
     
       Mon, 25 Jul 2016 08:15:58 -0300
       Mon, 25 Jul 2016 08:15:58 -0300
       ACae6e420f425248d6a26948c17a9e2acf
       192.168.0.33
       Apply
       Admin
     
     
       Tue, 26 Jul 2016 13:57:17 -0300
       Tue, 26 Jul 2016 13:57:17 -0300
       ACae6e420f425248d6a26948c17a9e2acf
       192.168.2.33
       Remove
       Threat
     
     
       Tue, 26 Jul 2016 14:30:29 -0300
       Tue, 26 Jul 2016 14:30:29 -0300
       ACae6e420f425248d6a26948c17a9e2acf
       192.168.2.38
       Apply
       Admin
     
   
 
----


[[entry-creation]]
== Entry creation


Here is an example of how to create a new ban entry.

....
curl -X POST http://administrator%40company.com:[email protected]:8080/restcomm-sbc/2012-04-24/WhiteLists/ -d "IpAddress=201.215.232.188" 
....


=== Supported Operations

[[delete-entry]]
=== Delete Entries

.XML Entry Deletion
----
curl -X DELETE http://ACae6e420f425248d6a26948c17a9e2acf:[email protected]:8080/restcomm-sbc/2012-04-24/WhiteLists/
----

.JSON Entry Deletion
----
curl -X DELETE http://ACae6e420f425248d6a26948c17a9e2acf:[email protected]:8080/restcomm/2012-04-24/WhiteLists.json/.json
----


NOTE: the **IpAddress** deletion just tags the entry to be removed by the system monitoring thread.




© 2015 - 2025 Weber Informatics LLC | Privacy Policy