The API provides access to data in the ForestCRM system.
Some of the most important terms and their respective definitions used in this document:
All API requests are in the form of HTML requests to designated URLs. It is a RESTful API, though not all services ('verbs') are implemented for all entity types.
API URLs are of the format: <server>/api/<format>/<API key>/<data-type>[/function]
<API key>
); thus the client needs a valid API key in order to use the server's API services. API keys are provided to tenants as defined in the service conditions.<format>
can be either "xml", "xls" or "csv". Available endpoints and responses may differ by format; it is intentional because they are designed for different use-cases:
Relationship of the main entities are depicted in the following diagram:
If — for any reason — you want to download all your data available through the APIs, you can use the following UNIX/Linux script:
#!/bin/bash key='demo-en' wget --no-check-certificate -o /tmp/wget.log -O - \ https://app.forestcrm.hu/api/xml/$key/companies \ https://app.forestcrm.hu/api/xml/$key/contacts \ https://app.forestcrm.hu/api/xml/$key/activities \ https://app.forestcrm.hu/api/xml/$key/products \ https://app.forestcrm.hu/api/xml/$key/opportunities \ https://app.forestcrm.hu/api/xml/$key/invoices \ | gzip > forest_data_$(date +%Y-%m-%d).gz
Of course the key
variable has to be replaced with your own API key. Also make sure that the output is placed where you mean.