Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

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.

  1. In your postman collection, go to the Pre-request Script copy and paste the following script. Replace the ip_address and port field with your MCS IP address and port id respectively. Change also the username and password 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 Configuration

Channel configuration & management.

Resource

Description

GET channels/config

Returns a list of all channels configured in the MCS system, with its main configuration data.

GET channels/config/{uuid}

Returns an extended single channel configuration view, specified by the required {uuid} parameter.

GET channels/config/meta

Returns all meta data used by channel configuration.

DELETE channels/config/{uuid}

Delete a specific channel.

PUT channels/config/{uuid}

Edit a channel configuration.

POST channels/config

Add a new channel, configured according to attached data request.

POST channels/config multi

Add multiple new channel, configured according to the attached data request.

PUT channels/config multi

Edit multiple channel, configured according to the attached data request.

DELETE channels/config multiple

Delete multiple channel.

Channel Control

Channel monitoring and unmonitoring.

Resource

Description

PUT channels/start

Start monitoring a channel on the desired MCM device from MCS.

PUT channels/stop

Stop monitoring a channel on the desired MCM device from MCS.

Channel Scan Configuration

Channel scan configuration & management.

Resource

Description

GET channels/scan/config

Returns a list of all scan channel in the system, with its main configuration data.

GET channels/scan/config/{uuid}

Returns an extended single scan configuration view, specified by the required {uuid} parameter.

DELETE channels/scan/config/{uuid}

Delete a specific scan configuration.

PUT channels/scan/config/{uuid}

Edit a scan configuration.

POST channels/scan/config

Add a new scan, configured according to the attached data request.

POST channels/scan/config multi

Add multiple scan, configured according to the attached data request.

PUT channels/scan/config multi

Edit multiple scan, configured according to the attached data request.

DELETE channels/scan/config multi

Delete multiple scan configuration.

Channel Scan Status

Channel scan configuration & management.

Resource

Description

GET channels/scan/status

Returns channels scan status.

Outputs Configuration

Outputs configuration & management.

Resource

Description

GET outputs/config

Returns a list of all encoders in the system, with its main configuration data.

GET outputs/config/{uuid}

Returns an extended single encoder configuration view, specified by the required {uuid} parameter.

GET outputs/config/meta

Returns all meta data used by output configuration.

DELETE outputs/config/{uuid}

Delete a specific encoder.

PUT outputs/config/{uuid}

Edit a output configuration.

POST outputs/config

Add a new encoder, configured according to the attached data request.

POST outputs/config multi

Add multiple encoder, configured according to the attached data request.

PUT outputs/config multi

Edit multiple encoder, configured according to the attached data request.

DELETE outputs/config multi

Delete multiple output configuration.

Outputs Control

Outputs monitoring and unmonitoring.

Resource

Description

PUT outputs/command/stream/enable

Start a encoder on the desired MCM device from MCS.

PUT outputs/command/stream/disable

Stop an encoder on the desired MCM device from MCS.

Layout Configuration

Layout configuration & management.

Resource

Description

GET layouts/config

Returns a list of all Layouts in the system, with its main configuration data.

GET layouts/config/{uuid}

Returns an extended single layout configuration view, specified by the required {uuid} parameter.

GET layouts/config/meta

Returns all meta data used by layout configuration.

DELETE layouts/config/{uuid}

Delete a specific layout configuration.

PUT layouts/config/{uuid}

Edit a layout configuration.

POST layouts/config

Add a new layout, configured according to the attached data request.

POST layouts/config multi

Add multiple layout, configured according to the attached data request.

PUT layouts/config multi

Edit multiple layout, configured according to the attached data request.

DELETE layouts/config multi

Delete multiple layout configuration.

Layout Types Configuration

Layout types configuration & management.

Resource

Description

GET layout_types/config

Returns a list of all Layouts types in the system, with its main configuration data.

GET layout_types/config/{uuid}

Returns an extended single layout types configuration view, specified by the required {uuid} parameter.

DELETE layout_types/config/{uuid}

Delete a specific layout types configuration.

PUT layout_types/config/{uuid}

Edit a layout type configuration.

POST layout_types/config

Add a new layout type, configured according to the attached data request.

POST layout_types/config multi

Add multiple layout, configured according to the attached data request.

PUT layout_types/config multi

Edit multiple layout, configured according to the attached data request.

DELETE layout_types/config multi

Delete multiple layout types configuration.

Thresholds Configuration

Thresholds configuration & management.

Resource

Description

GET thresholds/config

Returns a list of all thresholds in the system, with its main configuration data.

GET thresholds/config/{uuid}

Returns an extended single thresholds configuration view, specified by the required {uuid} parameter.

GET thresholds/config/meta

Returns all meta data used by the thresholds configuration.

DELETE thresholds/config/{uuid}

Delete a specific thresholds configuration.

PUT thresholds/config/{uuid}

Edit a thresholds configuration.

POST thresholds/config

Add a new threshold, configured according to the attached data request.

POST thresholds/config multi

Add multiple new threshold, configured according to the attached data request.

PUT thresholds/config multi

Edit multiple new threshold, configured according to the attached data request.

DELETE thresholds/config multi

Delete multiple Thresholds configuration.

DNS Configuration

DNS configuration & management.

Resource

Description

GET dns/config

Returns a list of all DNS in the system, with its main configuration data.

GET dns/config/{uuid}

Returns an extended single DNS configuration view, specified by the required {uuid} parameter.

DELETE dns/config/{uuid}

Delete a specific DNS configuration.

PUT dns/config/{uuid}

Edit a DNS configuration.

POST dns/config

Add a new DNS, configured according to the attached data request.

POST dns/config multi

Add multiple dns, configured according to the attached data request.

PUT dns/config multi

Edit multiple dns, configured according to the attached data request.

DELETE dns/config multi

Delete multiple DNS configuration.

NTP Configuration

NTP configuration & management.

Resource

Description

GET ntp/config

Returns a list of all NTP in the system, with its main configuration data.

GET ntp/config/{uuid}

Returns an extended single NTP configuration view, specified by the required {uuid} parameter.

DELETE ntp/config/{uuid}

Delete a specific NTP configuration.

PUT ntp/config/{uuid}

Edit a NTP configuration.

POST ntp/config

Add a new NTP, configured according to the attached data request.

POST ntp/config multi

Add multiple NTP, configured according to the attached data request.

PUT ntp/config multi

Edit multiple NTP, configured according to the attached data request.

DELETE ntp/config multi

Delete multiple NTP configuration.

PTP Configuration

PTP configuration & management.

Resource

Description

GET ptp/config

Returns a list of all PTP in the system, with its main configuration data.

GET ptp/config/{uuid}

Returns an extended single PTP configuration view, specified by the required {uuid} parameter.

GET ptp/config/meta

Returns all meta data used by the PTP configuration.

DELETE ptp/config/{uuid}

Delete a specific PTP configuration.

PUT ptp/config/{uuid}

Edit a PTP configuration.

POST ptp/config

Add a new PTP, configured according to the attached data request.

POST ptp/config multi

Add multiple PTP, configured according to the attached data request.

PUT ptp/config multi

Edit multiple PTP, configured according to the attached data request.

DELETE ptp/config multi

Delete multiple PTP configuration.

KMS Configuration

KMS configuration & management.

Resource

Description

GET kms/config

Returns a list of all KMS in the system, with its main configuration data.

GET kms/config/{uuid}

Returns an extended single KMS configuration view, specified by the required {uuid} parameter.

GET kms/config/meta

Returns all meta data used by the KMS configuration.

DELETE kms/config/{uuid}

Delete a specific KMS configuration.

PUT kms/config/{uuid}

Edit a KMS configuration.

POST kms/config

Add a new KMS, configured according to the attached data request.

POST kms/config multi

Add multiple KMS, configured according to the attached data request.

PUT kms/config multi

Edit multiple KMS, configured according to the attached data request.

DELETE kms/config multi

Delete multiple KMS configuration.

Scheduler

Scheduler configuration & management.

Resource

Description

GET scheduler/config

Returns a list of all scheduler config in the system, with its main configuration data.

GET scheduler/config/{uuid}

Returns an extended single scheduler configuration view, specified by the required {uuid} parameter.

GET scheduler/config/meta

Returns all meta data used by scheduler configuration.

DELETE scheduler/config/{uuid}

Delete a specific scheduler configuration.

PUT scheduler/config/{uuid}

Edit a scheduler configuration.

POST scheduler/config

Add a new scheduler, configured according to the attached data request.

POST scheduler/config multi

Add multiple scheduler, configured according to the attached data request.

PUT scheduler/config multi

Edit multiple scheduler, configured according to the attached data request.

DELETE scheduler/config multi

Delete multiple scheduler configuration.

Notifications Configuration

Notifications configuration & management.

Resource

Description

GET notifications/config

Returns a list of all notifications in the system, with its main configuration data.

GET notifications/config/{uuid}

Returns an extended single notifications configuration view, specified by the required {uuid} parameter.

GET notifications/config/meta

Returns all meta data used by the notifications configuration.

DELETE notifications/config/{uuid}

Delete a specific notifications configuration.

PUT notifications/config/{uuid}

Edit a notifications configuration.

POST notifications/config

Add a new notifications, configured according to the attached data request.

POST notifications/config multi

Add multiple Notifications, configured according to the attached data request.

PUT notifications/config multi

Edit multiple Notifications, configured according to the attached data request.

DELETE notifications/config multi

Delete multiple Notifications configuration.

Notification Agents Configuration

Notification Agents configuration & management.

Resource

Description

GET notification_agents/config

Returns a list of all notification agents in the system, with its main configuration data.

GET notification_agents/config/{uuid}

Returns an extended single notification agents configuration view, specified by the required {uuid} parameter.

GET notification_agents/config/meta

Returns all meta data used by the notification agents configuration.

DELETE notification_agents/config/{uuid}

Delete a specific notification agents configuration.

PUT notification_agents/config/{uuid}

Edit a notification agents configuration.

POST notification_agents/config

Add a new notification agents, configured according to the attached data request.

POST notification agents/config multi

Add multiple Notification agents, configured according to the attached data request.

PUT notification agents/config multi

Edit multiple Notification agents, configured according to the attached data request.

DELETE notification agents/config multi

Delete multi Notification agents configuration.

Timezones Configuration

Timezones configuration & management.

Resource

Description

GET timezones/config

Returns a list of all timezones in the system, with its main configuration data.

GET timezones/config/{uuid}

Returns an extended single timezones configuration view, specified by the required {uuid} parameter.

DELETE timezones/config/{uuid}

Delete a specific timezones configuration.

PUT timezones/config/{uuid}

Edit a timezones configuration.

POST timezones/config

Add a new timezones, configured according to the attached data request.

POST timezones/config multi

Add multiple Timezones, configured according to the attached data request.

PUT timezones/config multi

Edit multiple Timezones, configured according to the attached data request.

DELETE timezones/config multi

Delete multiple Timezones configuration.

Networks Configuration

Networks configuration & management.

Resource

Description

GET networks/config

Returns a list of all networks in the system, with its main configuration data.

GET networks/config/{uuid}

Returns an extended single networks configuration view, specified by the required {uuid} parameter.

DELETE networks/config/{uuid}

Delete a specific networks configuration.

PUT networks/config/{uuid}

Edit a networks configuration.

POST networks/config

Add a new network, configured according to the attached data request.

POST networks/config multi

Add multiple Networks, configured according to the attached data request.

PUT networks/config multi

Edit multiple Networks, configured according to the attached data request.

DELETE networks/config multi

Delete multiple Networks configuration.

Network Interfaces Configuration

Network Interfaces configuration & management.

Resource

Description

GET interfaces/config

Returns a list of all networks in the system, with its main configuration data.

GET interfaces/config/{uuid}

Returns an extended single networks configuration view, specified by the required {uuid} parameter.

GET interfaces/config/meta

Returns all meta data used by the networks configuration.

PUT interfaces/config/{uuid}

Edit a networks configuration.

PUT interfaces/config multi

Edit multiple Network Interfaces configuration.

Device Configuration

Device configuration & management.

Resource

Description

GET devices/config

Returns a list of all device in the system, with its main configuration data.

GET devices/config/{uuid}

Returns an extended single device configuration view, specified by the required {uuid} parameter.

GET devices/config/meta

Returns all meta data used by the device configuration.

DELETE devices/config/{uuid}

Delete a specific device configuration.

PUT devices/config/{uuid}

Edit a device configuration.

POST devices/config

Add a new device, configured according to the attached data request.

GET devices/info

Returns the device info.

Tile Editor

Tile editor configuration.

Resource

Description

GET tiles/config

Returns a list of all Tiles in the system, with its main configuration data.

GET tiles/config/{uuid}

Returns an extended single Tiles configuration view, specified by the required {uuid} parameter.

GET tiles/config/meta

Returns all meta data used by Tiles configuration.

PUT tiles/config/{uuid}

Edit a tile configuration.

DELETE tiles/config/{uuid}

Delete a specific tile configuration.

POST tiles/config/{uuid}

Adds a new tile configuration.

POST tiles/config multi

Adds multi tile configuration.

PUT tiles/config multi

Edit multi tile configuration.

DELETE tiles/config multi

Delete multiple tile configuration.

Penalty Box

Penalty box configuration.

Resource

Description

GET penalty_box/config

Returns a list of all penalty box config in the system, with its main configuration data.

GET penalty_box/config/{uuid}

Returns an extended single penalty box configuration view, specified by the required {uuid} parameter.

DELETE penalty_box/config/{uuid}

Delete a specific penalty box configuration.

PUT penalty_box/config/{uuid}

Edit a penalty box configuration.

POST penalty_box/config/{uuid}

Add a new penalty box, configured according to the attached data request.

POST penalty_box/config multi

Add multiple penalty box, configured according to the attached data request.

PUT penalty_box/config multi

Edit multiple penalty box, configured according to the attached data request.

DELETE penalty_box/config multi

Delete multiple penalty box configuration.

Users

Users configuration.

Resource

Description

GET users/config

Returns a list of all users config in the system, with its main configuration data.

GET users/config/{uuid}

Returns an extended single users configuration view, specified by the required {uuid} parameter.

DELETE users/config/{uuid}

Delete a specific users configuration.

POST users/config/{uuid}

Add a new users, configured according to the attached data request.

Users Status

Users Status.

Resource

Description

GET users/config

Return the user’s status configured in the system.

Backup and Restore

Backup and restore configuration.

Resource

Description

POST system/files/command/backup

Back’s up system files, configured according to the attached data request.

Proxy Tally

Proxy tally configuration.

Resource

Description

GET tally/proxy

Returns a list of all proxy tally config in the system, with its main configuration data.

GET tally/proxy filtered

Returns a single proxy tally config in the system filtered by the label name and device, with its main configuration data.

DELETE tally/proxy/{device}/{label}

Delete a specific proxy tally configuration.

POST tally/proxy

Add a new proxy tally, configured according to the attached data request.

GET tally/proxy/meta

Returns a list of meta data in the system, with its main configuration data.

DELETE multiple tally/proxy

Delete a multiple proxy tally configuration.

POST multiple tally/proxy

Add multiple proxy tally, configured according to the attached data request.

PUT tally/proxy/{label} (By Device)

Edit a proxy tally configuration by device.

PUT tally/proxy/{label} (By Output)

Edit a proxy tally configuration by output.

PUT multiple tally/proxy

Edits multiple proxy tally configuration by output.

Elastic Search

All the events and logs are through elastic search. Please refer to Elastic search for all the relevant API’s

  • No labels