View Source

Starting from QuickBuild 10, A JSON based RESTful api is supported. It works exactly the same as the [traditional XML based api|RESTful API], except that one has to specify http header _Accept: application/json_ when retrieving json content from server, and specify http header _Content-Type: application/json_ when posting json content back to server.

For instance, to get JSON representation of a configuration, you may refer to section _Access configuration by id_ of page [interact with configurations|Interact with Configurations], and modify the demonstration command as below:
{code}
curl -u admin:admin -H "Accept: application/json" http://localhost:8810/rest/configurations/1
{code}

Or if you want to update a configuration, just refer to section _Update configuration_ of the same page, and modify the demonstration command like below:
{code}
curl -X POST -u admin:admin -H "Content-Type: application/json" --data-binary "@tempfile.json" http://localhost:8810/rest/configurations
{code}