Sending API Calls to a System via Nx Meta Developer Portal
Sending Generic Events/API Calls to an Nx Meta System via Nx Meta Developer Portal is both possible and pretty straightforward.
- the protocol (http, https)
- domain (IP address + port or domain name)
- and path to api (/api).
When sending an API call on a local or virtual network most often the domain is the IP address (either public or private) of the computer running the Nx Meta Server application followed by port 7001 (the default port when installing Nx Meta).
When sending an API call via Nx Meta Developer Portal the request will be transferred through the Nx Meta Developer Portal proxy service (e.g. 3rd Party --> Nx Meta Developer Portal --> Nx Meta Server) and, as a result, you'll need to:
- modify the URL structure
- include the cloudSystemId
Below we outline how to do that in a bit more detail.
A few things to consider before you begin:
- Only HTTPS calls will work using this method.
- Browser based requests will not work (CORS protection)
- Supports HLS streams but doesn’t support RTSP streams
Step 1: Find your cloudSystemId
There are three different methods to find the cloudSystemId:
Method 1: Find cloudSystemId in a Browser
This is the simplest method.
- Log in to the Nx Meta Developer Portal https://meta.nxvms.comhttps://$CLOUD_PORTAL_HOST/systems
- Select the target System (the System you'd like send API calls to)
- In the browser check the URL - the cloudSystemId is the long string after https://meta.nxvms.comhttps://$CLOUD_PORTAL_HOST/systems/
397f56fb-4c5c-485e-a923-9bea345fa7ba is the ID you need
Method 2: Find cloudSystemId via a direct API call
Make sure you're logged into the Nx Meta Server Web Admin interface or include
- Send a direct API call to a Server in your System to request moduleInformation
- API format: https://serverIPaddress/api/moduleInformation
- Search through the Json response for cloudSystemId and you should be good to go.
Method 3: Find cloudSystemId via an Nx Meta Developer Portal API call
- Make a cloud request https://meta.nxvms.comhttps://$CLOUD_PORTAL_HOST/cdb/system/get using digest authentication and your Nx Meta Developer Portal credentials (username, password).
- The response will contain a list of all cloud-connected Systems available for the credentials you use.