Skip to content

Validating if APIs work on ZM

Pliable Pixels edited this page Sep 29, 2016 · 27 revisions

Please make sure you go through this before you wonder why zmNinja is not working.

Assumption: Your ZM server is accessible at http://server/zm -> replace this with your actual path

Make sure ZM APIs are working:
  • Step 1: Open up a browser
  • Step 2: Log into ZM
  • Step 3: Open another tab in the same browser (IMPORTANT: Has to be from the same browser you logged into ZM)
  • Step 4: Type in http://server/zm/api --> you should see a page with green bars. If you see red, your APIs are not working
  • Step 5: Type in http://server/zm/api/host/getVersion.json --> you should see a response like:
{
    "version": "1.30.0",
    "apiversion": "1.0"
}

version/apiversion may be different. If you don't see such a response, your APIs are not working

  • Step 6: Type in http://server/zm/api/monitors.json --> you should see a JSON list of monitors. If you see no monitors, the login you used does not have read access to monitors. Or you have no monitors. Please correct user permissions

Also make sure you can see monitors and events:

Type in http://server/zm/api/monitors.json --> you should see a response like:

{
    "monitors": [
        {
            "Monitor": {
                <lots of additional details>
            },
            <more monitor objects if you have more than one>
        }]
}

Type in http://server/zm/api/events --> you should see a response like:

{"events":[{"Event":{ <many more details> }}]}

zmNinja API notes:

  • Please make sure the user credentials you use has:
  • view or edit access to monitors
  • view or edit access to streams
  • view or edit access to system
  • If you are accessing zmNinja remotely, make sure you first access ZM remotely from your desktop browser, ensure it works and then use the same DNS/IP for zmNinja

How to report errors

  • I'm not a magician. I don't know why something is not working if you don't provide sufficient inputs. Enable debug logs in zmNinja Developer options and then email me the logs. Thats a good start.
  • Its often hard to infer a problem especially when its due to some unique apache/nginx mungling you might have done but haven't told me about it. In such cases, try and give me remote access to your ZM for a day. Configure a limited user with just one monitor. It will save hours of frustration (mostly on my side). Thanks