Module Web Services API REST (developer): Difference between revisions

Jump to navigation Jump to search
m
Tag: 2017 source edit
Tag: 2017 source edit
Line 122: Line 122:
To use the REST API,  you have to call an url such as this one : <nowiki>http://<my_server>/api/index.php/<action></nowiki><br />
To use the REST API,  you have to call an url such as this one : <nowiki>http://<my_server>/api/index.php/<action></nowiki><br />
with one of the 4 following methods : GET, POST, PUT, DELETE, replacing <action> by the action you want to use. Ex : <nowiki>http://<my_server>/api/index.php/invoices</nowiki>
with one of the 4 following methods : GET, POST, PUT, DELETE, replacing <action> by the action you want to use. Ex : <nowiki>http://<my_server>/api/index.php/invoices</nowiki>
Before using any API, you must first get a custom API-key. You have to create a new user and generate or set its "Key for API".
[[File:Dolibarr user for api.png|thumb|334x334px]]
You will have to use this API key in any of your client program that need to call a Dolibarr API.


==Client code example==
==Client code example==

Navigation menu