Difference between revisions of "QM Client API"

From ScarletDME
Jump to navigation Jump to search
(→‎API library's: updated php entry)
(Moved server setup guide to own page)
Line 1: Line 1:
 
==Overview==
 
==Overview==
 
QM provides a remote API access to any client system that can get to the server via socket 4243, and obeys the protocol.
 
QM provides a remote API access to any client system that can get to the server via socket 4243, and obeys the protocol.
 +
 +
[[QM-API Server | QM API Server setup guide]]
  
 
==Server Setup==
 
==Server Setup==
 
QM is technically able to handle API connections about of the box. However your server will need some configuring. (RPM will do this for you in near future).
 
QM is technically able to handle API connections about of the box. However your server will need some configuring. (RPM will do this for you in near future).
 
===Service===
 
First we need to register port 4243 in /etc/services to let the system recognize it.
 
 
Personally I just manually edited /etc/services, found the apropriate place (ie entry's in port order) to put it in and popped in the following:
 
  qmclient        4243/tcp                        # Open QM API
 
 
Save and exit.
 
 
===Xinitd===
 
Firstly you will need xinetd installed, if you are running on telnet it's already there.
 
 
Second you will need an entry in xinit for qmclient. So put the following in /etc/xinit.d/qmclient
 
<pre>
 
# default: on
 
# description: OpenqQMs API port, unencrypted binary protocol.
 
service qmclient
 
{
 
        flags          = REUSE
 
        socket_type    = stream
 
        wait            = no
 
        user            = root
 
        server          = /usr/qmsys/bin/qm
 
        server_args    = -n -q
 
        log_on_failure  += USERID
 
        disable        = no
 
        port            = 4243
 
}
 
</pre>
 
 
Now restart xinetd (/etc/init.d/xinetd restart)
 
 
===Testing===
 
If you need to. Telnet localhost 4243 can check if your changes have worked. Telnet will connect but leave you clung on, but it will not refuse your connection. Ctr-] will allow you to quit. You can test WAN port availability, firewalls, etc, using this test.
 
  
 
==Protocol==
 
==Protocol==

Revision as of 13:02, 5 December 2008

Overview

QM provides a remote API access to any client system that can get to the server via socket 4243, and obeys the protocol.

QM API Server setup guide

Server Setup

QM is technically able to handle API connections about of the box. However your server will need some configuring. (RPM will do this for you in near future).

Protocol

The following is a guide to the protocol that the server responds to.

Currently a working document, far from perfect, but you get the idea:

QMClient-Protocol.v1.alpha.pdf

API library's

  • C - native - Released
  • Visual Basic - native - released (library not released with commercial?)
  • Java API - native - Alpha stage
  • Delphi - Wrapper - (native expected Q1 2009)
  • PHP - wrapper - Beta (Native - Prototype (Dec 08))