HTTP API for the Reporting function of Ozeki NG SMS Gateway

(available in version: Ozeki NG SMS Gateway v4.1.22 or newer)

This method can be used to query the messages that are sent and received by the Ozeki NG SMS Gateway software. With the help of different parameters it becomes possible to filter the messages by operator, user, and date. Therefore it is also possible to query the sent and received messages from an external application.

Description

By using the reporting function (if it is configured in the NG), the following data can be queried:

  • the sender user of the SMS message
  • the service provider through which the message went
  • the exact time when the message was sent
  • the content of the SMS message
Important!
To use the reporting function, it needs to be allowed in the Ozeki NG SMS Gateway. For the exact configuration steps, please visit the following website: http://ozekisms.com/index.php?owpn=2378

Example URL Request

http://127.0.0.1:9501/api?action=reporting&username=admin&password=abc123&repDirection=in&toExport=summary

Example Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 246

<?xml version="1.0" encoding="utf-8"?>
<response>
   <action>reporting</action>
   <data>
      <user>
         <username>admin</username>
         <messages>4</messages>
      </user>
   </data>
</response>

Request parameters

Parameter Description Possible values Example M/O*
action Specifies the HTTP API command sendmessage reporting action=reporting M
username Specifies the username. The username and password parameters are used to authenticate the user. The value must be urlencoded. admin (the admin user's username) username=admin M
password Specifies the password. The username and password parameters are used to authenticate the user. The value must be urlencoded. string value, maximum length is 16 characters (the admin user's password) password=abc123 M
repDirection Specifies whether we would like to list the incoming or the outgoing messages. urlencoded. in, out repDirection=in M
toExport Specifies what the got back xml should contain. A summary of the number of the messages or the messages themselves.
summary, messages toExport=messages M
repUser Specifies which user's data we would like to list. In case we do not define the user, the admin user is being listed automatically.
string, maximum 16 characters repUser=testuser O
repOperator Specifies the name of the service provider the data of which we would like to know. string value, maximum 16 characters repOperator=HTTPServer0 O
repStartTime Specifies the date after which the sent and received messages we would like to know about. The value must be YYYY-MM-DD hh:mm::ss urlencoded. date in urlencoded form: YYYY-MM-DD hh:mm::ss repStartTime=2011-11-29%2011:00:00 O
repStopTime Specifies the date before which the sent and received messages we would like to know about. The value must be YYYY-MM-DD hh:mm::ss urlencoded. date in urlencoded form: YYYY-MM-DD hh:mm::ss repStartTime=2020-11-29%2011:00:00 O

More information