Documentation how to use parameters in PHP API

Any issue about Cyclos 4 scripting and Webservices

Moderators: hugo, alexandre, rmvanarkel

Post Reply
marcel
Posts: 53
Joined: Mon May 25, 2009 9:29 am
Location: The Netherlands
Contact:

Documentation how to use parameters in PHP API

Post by marcel »

I have some trouble finding the right parameters using the PHP API.
For instance i want to use the search function of transactionService.php.
I found out i can use owner to select the transactions of a specific user.
I didn't found yet how ik search for transactions in a specific period. Hopefully someone can help me out how to select a specific period.
More in general where i can find the possible items and syntax for for instance a query.

Thanks and best regards,

Marcel de Poel

luis
Posts: 185
Joined: Fri Feb 17, 2006 11:01 am

Re: Documentation how to use parameters in PHP API

Post by luis »

As of Cyclos 4.7, is is recommended to use the REST API instead of the regular API when the functionality is covered. It is more stable and fully documented.
You can browse the api documentation on your own cyclos installation via <installation_root>/api.
We don't provide a client library for PHP in this case, but you can generate one. On the API documentation page, copy the link for cyclos-swagger.json, import it on the online swagger editor at http://editor.swagger.io/ and click Generate client > PHP.
It takes a while because the API is quite large for the online editor.
Note that we haven't used this library and don't support it.
Another option is to use plain HTTP GET/POST requests.

You probably want to search the account history, which is a search on transfers, not transactions. On the api documentation page there is a brief explanation on the differences.
Anyway, you can take a look on the JavaDocs at http://documentation.cyclos.org/4.7/ws-api-docs/.
When you need to reference system accounts (the SystemAccountOwner in java) just pass the string system.
Luis Fernando Planella Gonzalez
Cyclos development team

Post Reply