This document provides information on API 5.0 implemented on MCS. The API calls are applicable for both MCS and MCM9000 5.5.x onwards.
The API calls in 5.0 are GET, PUT, POST, and DELETE. Please use an HTTPS call without a /.json at the end if you invoke an API call on MCS or an HTTP call with /.json at the end if you invoke an API on MCM9000 that is connected to the MCS.
For example,
On MCS - https://{{ip_address}}:{{port}}/api/{{version}}/channels/config/
On MCM - http://{{ip_address}}:{{port}}/api/{{version}}/channels/config/.json
Please refer to the examples in each section to use the API calls as needed.
Authorization
MCM9000 uses basic authorization with the same username and password used to log in.
MCS uses refresh token for API 5.0 authorization.
To use this please follow the steps below.
In your postman collection, go to the Pre-request Script copy and paste the following script. Replace the
ip_address
andport
field with your MCS IP address and port id respectively. Change also theusername
andpassword
fields accordingly. In the script, the default credentials are used.
const moment = require('moment'); // Generate inital Collection variables value function init_enviroment() { if(!pm.globals.has('ip_address')){ pm.globals.set('ip_address','xx.xx.xx.xx'); } if(!pm.globals.has('port')){ pm.globals.set('port',xxx); } if(!pm.globals.has('username')){ pm.globals.set('username','Admin'); } if(!pm.globals.has('password')){ pm.globals.set('password','Admin'); } if(!pm.globals.has('access_token')){ pm.globals.set('access_token',null); } if(!pm.globals.has('version')){ pm.globals.set('version','5.0'); } if(!pm.globals.has('refresh_token')){ pm.globals.set('refresh_token',null); } if(!pm.globals.has('expiration')){ pm.globals.set('expiration',0); } } function jwt_decode(token) { return JSON.parse(atob(token.split('.')[1])); } // Set the recived tokens into collection/enviroment cache function handleResponse( response ){ const decoded = jwt_decode(response.json().data.access_token); pm.globals.set('access_token',response.json().data.access_token); pm.globals.set('refresh_token',response.json().data.refresh_token); pm.globals.set('expiration',decoded.exp); } // Login Flow function login() { const loginRequest = { url: `https://${pm.globals.get('ip_address')}:${pm.globals.get('port')}/api/${pm.globals.get('version')}/auth/login`, method: 'POST', header: { 'accept': 'application/json', 'content-type': `application/json` }, body: { mode: 'raw', raw: JSON.stringify({ password : pm.globals.get('password'), username: pm.globals.get('username') }) } } pm.sendRequest(loginRequest, (error, response) => { if(!!error){ console.log(error); } else { handleResponse(response); } }); } // Refresh Token Flow function refresh() { const refreshRequest = { url: `https://${pm.globals.get('ip_address')}:${pm.globals.get('port')}/api/${pm.globals.get('version')}/auth/token/refresh`, method: 'POST', header: { 'accept': 'application/json', 'content-type': `application/json` }, body: { mode: 'raw', raw: JSON.stringify({ refresh_token : pm.globals.get('refresh_token') }) } } pm.sendRequest(refreshRequest, (error, response) => { console.log(response) if(!!error || ( !!response && !!response.code && (response.code >= 400) )){ login(); } else { handleResponse(response); } }); } init_enviroment(); // Run either Initial Login or Refresh as per case if( !pm.globals.has('refresh_token') ) { login(); } else if( ( !pm.globals.has('access_token') ) || ( ( pm.globals.get('expiration') * 1000 - moment().valueOf()) <= 0 ) ){ refresh(); }
2. On the collection click on Authorization choose the Type as Bearer Token and in the Token field input {{access_token}} as shown below.
** Please make sure to use the same authorization for all the API 5.0 requests within the collection.
Channel ConfigurationChannel configuration & management. | |
Resource | Description |
---|---|
Returns a list of all channels configured in the MCS system, with its main configuration data. | |
Returns an extended single channel configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by channel configuration. | |
Delete a specific channel. | |
Edit a channel configuration. | |
Add a new channel, configured according to attached data request. | |
Add multiple new channel, configured according to the attached data request. | |
Edit multiple channel, configured according to the attached data request. | |
Delete multiple channel. |
Channel ControlChannel monitoring and unmonitoring. | |
Resource | Description |
---|---|
Start monitoring a channel on the desired MCM device from MCS. | |
Stop monitoring a channel on the desired MCM device from MCS. |
Channel Scan ConfigurationChannel scan configuration & management. | |
Resource | Description |
---|---|
Returns a list of all scan channel in the system, with its main configuration data. | |
Returns an extended single scan configuration view, specified by the required {uuid} parameter. | |
Delete a specific scan configuration. | |
Edit a scan configuration. | |
Add a new scan, configured according to the attached data request. | |
Add multiple scan, configured according to the attached data request. | |
Edit multiple scan, configured according to the attached data request. | |
Delete multiple scan configuration. |
Channel Scan StatusChannel scan configuration & management. | |
Resource | Description |
---|---|
Returns channels scan status. |
Outputs ConfigurationOutputs configuration & management. | |
Resource | Description |
---|---|
Returns a list of all encoders in the system, with its main configuration data. | |
Returns an extended single encoder configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by output configuration. | |
Delete a specific encoder. | |
Edit a output configuration. | |
Add a new encoder, configured according to the attached data request. | |
Add multiple encoder, configured according to the attached data request. | |
Edit multiple encoder, configured according to the attached data request. | |
Delete multiple output configuration. |
Outputs ControlOutputs monitoring and unmonitoring. | |
Resource | Description |
---|---|
Start a encoder on the desired MCM device from MCS. | |
Stop an encoder on the desired MCM device from MCS. |
Layout ConfigurationLayout configuration & management. | |
Resource | Description |
---|---|
Returns a list of all Layouts in the system, with its main configuration data. | |
Returns an extended single layout configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by layout configuration. | |
Delete a specific layout configuration. | |
Edit a layout configuration. | |
Add a new layout, configured according to the attached data request. | |
Add multiple layout, configured according to the attached data request. | |
Edit multiple layout, configured according to the attached data request. | |
Delete multiple layout configuration. |
Layout Types ConfigurationLayout types configuration & management. | |
Resource | Description |
---|---|
Returns a list of all Layouts types in the system, with its main configuration data. | |
Returns an extended single layout types configuration view, specified by the required {uuid} parameter. | |
Delete a specific layout types configuration. | |
Edit a layout type configuration. | |
Add a new layout type, configured according to the attached data request. | |
Add multiple layout, configured according to the attached data request. | |
Edit multiple layout, configured according to the attached data request. | |
Delete multiple layout types configuration. |
Thresholds ConfigurationThresholds configuration & management. | |
Resource | Description |
---|---|
Returns a list of all thresholds in the system, with its main configuration data. | |
Returns an extended single thresholds configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by the thresholds configuration. | |
Delete a specific thresholds configuration. | |
Edit a thresholds configuration. | |
Add a new threshold, configured according to the attached data request. | |
Add multiple new threshold, configured according to the attached data request. | |
Edit multiple new threshold, configured according to the attached data request. | |
Delete multiple Thresholds configuration. |
DNS ConfigurationDNS configuration & management. | |
Resource | Description |
---|---|
Returns a list of all DNS in the system, with its main configuration data. | |
Returns an extended single DNS configuration view, specified by the required {uuid} parameter. | |
Delete a specific DNS configuration. | |
Edit a DNS configuration. | |
Add a new DNS, configured according to the attached data request. | |
Add multiple dns, configured according to the attached data request. | |
Edit multiple dns, configured according to the attached data request. | |
Delete multiple DNS configuration. |
NTP ConfigurationNTP configuration & management. | |
Resource | Description |
---|---|
Returns a list of all NTP in the system, with its main configuration data. | |
Returns an extended single NTP configuration view, specified by the required {uuid} parameter. | |
Delete a specific NTP configuration. | |
Edit a NTP configuration. | |
Add a new NTP, configured according to the attached data request. | |
Add multiple NTP, configured according to the attached data request. | |
Edit multiple NTP, configured according to the attached data request. | |
Delete multiple NTP configuration. |
PTP ConfigurationPTP configuration & management. | |
Resource | Description |
---|---|
Returns a list of all PTP in the system, with its main configuration data. | |
Returns an extended single PTP configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by the PTP configuration. | |
Delete a specific PTP configuration. | |
Edit a PTP configuration. | |
Add a new PTP, configured according to the attached data request. | |
Add multiple PTP, configured according to the attached data request. | |
Edit multiple PTP, configured according to the attached data request. | |
Delete multiple PTP configuration. |
KMS ConfigurationKMS configuration & management. | |
Resource | Description |
---|---|
Returns a list of all KMS in the system, with its main configuration data. | |
Returns an extended single KMS configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by the KMS configuration. | |
Delete a specific KMS configuration. | |
Edit a KMS configuration. | |
Add a new KMS, configured according to the attached data request. | |
Add multiple KMS, configured according to the attached data request. | |
Edit multiple KMS, configured according to the attached data request. | |
Delete multiple KMS configuration. |
SchedulerScheduler configuration & management. | |
Resource | Description |
---|---|
Returns a list of all scheduler config in the system, with its main configuration data. | |
Returns an extended single scheduler configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by scheduler configuration. | |
Delete a specific scheduler configuration. | |
Edit a scheduler configuration. | |
Add a new scheduler, configured according to the attached data request. | |
Add multiple scheduler, configured according to the attached data request. | |
Edit multiple scheduler, configured according to the attached data request. | |
Delete multiple scheduler configuration. |
Notifications ConfigurationNotifications configuration & management. | |
Resource | Description |
---|---|
Returns a list of all notifications in the system, with its main configuration data. | |
Returns an extended single notifications configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by the notifications configuration. | |
Delete a specific notifications configuration. | |
Edit a notifications configuration. | |
Add a new notifications, configured according to the attached data request. | |
Add multiple Notifications, configured according to the attached data request. | |
Edit multiple Notifications, configured according to the attached data request. | |
Delete multiple Notifications configuration. |
Notification Agents ConfigurationNotification Agents configuration & management. | |
Resource | Description |
---|---|
Returns a list of all notification agents in the system, with its main configuration data. | |
Returns an extended single notification agents configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by the notification agents configuration. | |
Delete a specific notification agents configuration. | |
Edit a notification agents configuration. | |
Add a new notification agents, configured according to the attached data request. | |
Add multiple Notification agents, configured according to the attached data request. | |
Edit multiple Notification agents, configured according to the attached data request. | |
Delete multi Notification agents configuration. |
Timezones ConfigurationTimezones configuration & management. | |
Resource | Description |
---|---|
Returns a list of all timezones in the system, with its main configuration data. | |
Returns an extended single timezones configuration view, specified by the required {uuid} parameter. | |
Delete a specific timezones configuration. | |
Edit a timezones configuration. | |
Add a new timezones, configured according to the attached data request. | |
Add multiple Timezones, configured according to the attached data request. | |
Edit multiple Timezones, configured according to the attached data request. | |
Delete multiple Timezones configuration. |
Networks ConfigurationNetworks configuration & management. | |
Resource | Description |
---|---|
Returns a list of all networks in the system, with its main configuration data. | |
Returns an extended single networks configuration view, specified by the required {uuid} parameter. | |
Delete a specific networks configuration. | |
Edit a networks configuration. | |
Add a new network, configured according to the attached data request. | |
Add multiple Networks, configured according to the attached data request. | |
Edit multiple Networks, configured according to the attached data request. | |
Delete multiple Networks configuration. |
Network Interfaces ConfigurationNetwork Interfaces configuration & management. | |
Resource | Description |
---|---|
Returns a list of all networks in the system, with its main configuration data. | |
Returns an extended single networks configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by the networks configuration. | |
Edit a networks configuration. | |
Edit multiple Network Interfaces configuration. |
Device ConfigurationDevice configuration & management. | |
Resource | Description |
---|---|
Returns a list of all device in the system, with its main configuration data. | |
Returns an extended single device configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by the device configuration. | |
Delete a specific device configuration. | |
Edit a device configuration. | |
Add a new device, configured according to the attached data request. | |
Returns the device info. |
Tile EditorTile editor configuration. | |
Resource | Description |
---|---|
Returns a list of all Tiles in the system, with its main configuration data. | |
Returns an extended single Tiles configuration view, specified by the required {uuid} parameter. | |
Returns all meta data used by Tiles configuration. | |
Edit a tile configuration. | |
Delete a specific tile configuration. | |
Adds a new tile configuration. | |
Adds multi tile configuration. | |
Edit multi tile configuration. | |
Delete multiple tile configuration. |
Penalty BoxPenalty box configuration. | |
Resource | Description |
---|---|
Returns a list of all penalty box config in the system, with its main configuration data. | |
Returns an extended single penalty box configuration view, specified by the required {uuid} parameter. | |
Delete a specific penalty box configuration. | |
Edit a penalty box configuration. | |
Add a new penalty box, configured according to the attached data request. | |
Add multiple penalty box, configured according to the attached data request. | |
Edit multiple penalty box, configured according to the attached data request. | |
Delete multiple penalty box configuration. |
UsersUsers configuration. | |
Resource | Description |
---|---|
Returns a list of all users config in the system, with its main configuration data. | |
Returns an extended single users configuration view, specified by the required {uuid} parameter. | |
Delete a specific users configuration. | |
Add a new users, configured according to the attached data request. |
Backup and RestoreBackup and restore configuration. | |
Resource | Description |
---|---|
Back’s up system files, configured according to the attached data request. |
Proxy TallyProxy tally configuration. | |
Resource | Description |
---|---|
Returns a list of all proxy tally config in the system, with its main configuration data. | |
Returns a single proxy tally config in the system filtered by the label name and device, with its main configuration data. | |
Delete a specific proxy tally configuration. | |
Add a new proxy tally, configured according to the attached data request. | |
Returns a list of meta data in the system, with its main configuration data. | |
Delete a multiple proxy tally configuration. | |
Add multiple proxy tally, configured according to the attached data request. | |
Edit a proxy tally configuration by device. | |
Edit a proxy tally configuration by output. | |
Edits multiple proxy tally configuration by output. |