This documentation relates to QuickBuild 10.0.x
Select here if you are using a different version

RESTful API (JSON Edition)

Version 1 by Robin Shen
on Mar 01, 2020 07:22.


 
compared with
Current by Robin Shen
on Mar 01, 2020 07:24.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 0 changes. View first change.

 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}