Name

sn_capi.CMPGetAllCapiInterfaceAction

Description

No description available

Script

var CMPGetAllCapiInterfaceAction = Class.create();
CMPGetAllCapiInterfaceAction.prototype = Object.extendsObject(sn_smd.SMBaseAction, {
   doAction: function(params) {
  	 
  	 try {
  		var capiLibraryServiceScript=new SNC.CAPILibraryServiceScript();
  		var interfaceListJSON=capiLibraryServiceScript.getAllInterfaces();
  		var interfaces=new global.JSON().decode(interfaceListJSON);
  		var gr = new GlideRecord('sn_capi_interface');
  		gr.query();
  		var responseObj = {
  			cloudapiList : interfaces,
  			totalRecords : gr.getRowCount()
  		};
  		return responseObj;
  	 } catch (error) {
  		var e = error;
  		var failedMessage = gs.getMessage("Failed to get all cloud api interface.");
  		throw sn_smd.SMErrorHelper.createScriptAPIError(
  			failedMessage,
  			"CMPGetAllCapiInterfaceAction.doAction(): Failed to get all cloud api interface",
  			error
  		); 
  	 }
  	 
   },

  type: 'CMPGetAllCapiInterfaceAction'
});

Sys ID

4be15fd60b332200a91f6707b6673a8b

Offical Documentation

Official Docs: