Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
docs:xmlrpc [07-12-2013 23:28] cwacha |
docs:xmlrpc [10-10-2019 23:30] (current) cwacha |
| |
===== Getting Started ===== | ===== Getting Started ===== |
- Download an XML-RPC Client such as this one here: http://www.ditchnet.org/xmlrpc/ | {{ :docs:xmlrpc_example.png?nolink&500|}} |
| |
| - Download an XML-RPC Client such as this one here: http://www.ditchnet.org/xmlrpc/ or use the example python script provided here https://svn.code.sf.net/p/iaddressbook/code/trunk/docs/xmlrpc.py |
- Enable the XML-RPC in config.php (HINT: ''$conf['xmlrpc_enable'] = 1'') | - Enable the XML-RPC in config.php (HINT: ''$conf['xmlrpc_enable'] = 1'') |
- Uncomment/setup an XML RPC user in auth.php | - Setup an XML RPC user in auth.php (HINT: uncomment 'abcd' api_key for testing) |
- Set the Endpoint URI to your installation: http://yourdomain.com/your_address_book/xmlrpc.php | - Set the Endpoint URI to your installation: http://yourdomain.com/your_address_book/xmlrpc.php |
- Choose method: ''version'' | - Choose method: ''version'' |
- As parameters type in your API key (don't forget quotation marks if necessary) | - As parameters type in your API key (don't forget quotation marks if necessary) |
- Hit Execute | - Hit Execute |
| - If everything worked you should see an object response similar to the one below |
| |
| <code> |
| { |
| result = "2.0\n"; |
| status = success; |
| } |
| </code> |
| |
===== Authentication and Security ===== | ===== Authentication and Security ===== |
| |
| |
===== Methods in Version 1.0 ===== | ===== Available Methods ===== |
| |
^ Method Name ^ Parameters ^ Return value ^ Description ^ | ^ Method Name ^ Parameters ^ Return value ^ Description ^ |
| version | api_key | version string | Returns the API version (i.e. "1.0") | | | system.listMethods | | array of available methods | Returns all supported methods by iAddressBook XMLRPC | |
| | system.methodSignature | method | signature of method | Returns the method signature for the specified method | |
| | system.methodHelp | method | help string of method | Returns the Parameters and return values for the given method | |
| | version | api_key | version string | Returns the iAddressBook version (i.e. "1.0") | |
| get_contact | api_key, contact id | contact | Returns the contact with the given id | | | get_contact | api_key, contact id | contact | Returns the contact with the given id | |
| get_contacts | api_key, search string, limit, offset | contacts | Returns contacts that match search string (or all if string is empty) starting from offset (max. limit contacts) | | | get_contacts | api_key, search string, limit, offset | contacts | Returns contacts that match search string (or all if string is empty) starting from offset (max. limit contacts) | |
| set_contact | api_key, contact | contact id | Adds or modifies a contact, returns insert id | | | set_contact | api_key, contact | contact id | Adds or modifies a contact, returns insert id | |
| count_contact | api_key, search string | number of id's | Returns the number of contacts that match the search string | | | count_contacts | api_key, search string | number of id's | Returns the number of contacts that match the search string | |
| delete_contact | api_key, contact id | success or error | Deletes the contact with the given id, returns success or error | | | delete_contact | api_key, contact id | success or error | Deletes the contact with the given id, returns success or error | |
| import_vcard | api_key, vcard as string | success or error | Imports a vCard into the addressbook, returns success or error | | | import_vcard | api_key, vcard as string | success or error | Imports a vCard into the addressbook, returns success or error | |
| export_vcard | api_key, contact id's | vcards as string | Exports all contacts matching the id's as one vCard string | | | export_vcard | api_key, contact id's | vcards as string | Exports all contacts matching the id's as one vCard string | |
| |
| |
| |