By Clay Li on Saturday, 07 April 2018
Category: Tutorial

Calem Integration 2: REST API

Calem Enterprise comes with integration capabilities including:

1. Overview

APIs are discussed in this blog. Calem Enterprise comes with REST APIs. Other applications can use the REST API to fetch data from Calem; or update data in Calem. For instance, a customer likes to create a service request in Calem when a device is not reachable from a network monitoring system.

2. Sandbox vs. Production

​The REST API should be developed and tested in a Sandbox environment before deploying to the Production environment. This is good practice and should be adhered to.

3. Rest APIs

The REST APIs are a powerful set of programming interfaces for third party applications. They can be used to insert, update, read and delete objects in Calem Enterprise. See Calem Enterprise REST API manual for more information.

​API Type API Sample
​ Get an object by Id ​ Get asset with id "009621a0-56c2-b974-f162-640541bd748a":

GET /api/get/cm_asset/009621a0-56c2-b974-f162-640541bd748a
​Get objects by query​Get assets with query: asset_no like 'pump%' and last_modified>='2014-12-11' (URL encoded in query below).

GET /api/search/cm_asset/w= asset_no%20like%20%27pump%25%27%20and%20last_modified%3E%3D%272014-12-11%27
​Insert an object​Insert an asset with the following info:

note=My asset note; location_id=My location id; in_id=My asset type id

POST /api/insert/cm_asset

note=My%20asset%20note&location_id=My%20location%20id&in_id=My%20asset%20type%20id

​Update an object​Update an asset with the following info:

note=My asset note; in_id=My asset type id

PUT /api/update/cm_asset/009621a0-56c2-b974-f162-640541bd748a

note=My%20asset%20note&in_id=My%20asset%20type%20id

​Delete an object​Delete an asset with Id:

DELETE /api/delete/cm_asset/009621a0-56c2-b974-f162-640541bd748a

​API Key Attributes​​Get the attributes for an API key including the max number of rows to fetch per each API search invocation.

GET /api/get/cm_vt_apikey_so/attributes

 4. Identify Objects from Forms

Forms are based on objects (also called models). You can find the object used by a form - see Step 0 of this blog for more info. Field names are also shown in forms. You can find more info about a field in Data Dictionary.

 5. Integration APIs

There are integration APIs that are developed for custom projects when the standard APIs above are not sufficient. Contact us when needs arise for your integration projects.


Additional resources