yourCMDB (since version 0.5 or higher) provides a REST API for accessing the data. You can access the data by using HTTP and the methods GET, DELTE, PUT and POST on the rest resources. The data that is used in GET responses and must be used in PUT and POST requests is represented in JSON.
The base for the API is rest.php which you can find in the <yourcmdb-root>/web directory. Authentication is done by HTTP Basic auth. You should use the credentials of a valid yourCMDB user, that has access rights for “rest”. Please see more details on authentication by having a look at the following Wiki page: authentication and authorisation
In the following sections you can find an overview over the resources and methods that are available in the API.
For accessing single objects. methods:
GET /rest.php/objects/<assetId> DELETE /rest.php/objects/<assetId> PUT /rest.php/objects/<assetId> POST /rest.php/objects
For accessing the object log of a specific object. methods:
GET /rest.php/objectlogs/<assetId>
For accessing all links to other objects. methods:
GET /rest.php/objectlinks/<assetidA> DELETE /rest.php/objectlinks/<assetidA>/<assetidB> POST /rest.php/objectlinks/<assetidA>
Getting a list of objects. methods:
GET /rest.php/objectlist/by-fieldvalue/<value> GET /rest.php/objectlist/by-objecttype/<type>
Getting all configured object types and objecttype groups. methods:
GET /rest.php/objecttypes/groups/ GET /rest/objecttypes/groups/<groupname>
Getting a list of all configured exportAPI tasks methods:
GET /rest.php/exporter/list/
Executing an export task. If the exporter writes something to STDOUT, the output will be returned.
PUT /rest.php/exporter/export/<taskname>
Getting a list of all configured label printers which can be used for printing methods:
GET /rest.php/labelprinter/list/print
Prints a label for the with assetId given object on the label printer with the name <printer name>.
PUT /rest.php/labelprinter/print/<printer name>/<assetId>