API Documentation

Felipe Zimmerle edited this page Jan 27, 2014 · 1 revision
Clone this wiki locally

The ModSecurity API is under testing it is already available at: http://status.modsecurity.org/api. It is currently been used by the web site: http://status.modsecurity.org. Patches are welcomed.

Currently the API has a unique method, which returns data in between a set of time. This set of time can be specified by parameters as following:


In this example, the parameters "0" and "1390252267" were used. Those are Epochs in UNIX format, which represents the dates: January 1, 1970 and January 20 2014, respectively.

This API returns as response of the requests an JSON formatted content. This JSON contains headers and an array of results, as shown below.


time: {
    from: "0",
    to: "1390252267"
amount: 3015,
results: [ ... ]

The tag time returns the time slice requested while the query was performed. amount contains the amount of results that was found for that time slice. A result contains the following information:


    ts_epoch: "1390235787",
    version: "2.7.7",
    dns_server: {
        latitude: "33.7490",
        longitude: "-84.3880",
        country: "United States",
        city: "Atlanta"

Results information detailed:

  • ts eopch: is the time that the query arrived in status.modsecurity.org DNS server.
  • version: ModSecurity's version.
  • dns server: GeoLocation information about the client's DNS server.