Name
sn_capi.CMPGetAllCloudApiAction
Description
No description available
Script
var CMPGetAllCloudApiAction = Class.create();
CMPGetAllCloudApiAction.prototype = Object.extendsObject(sn_cloud_api.CAPIBaseAction, {
doAction: function(params) {
gs.info('CMPGetAllCloudApiAction: params-->' + params);
try {
var capiLibraryServiceScript=new SNC.CAPILibraryServiceScript();
var capiListJSON=capiLibraryServiceScript.getAllCloudApis();
var cloudapis=new global.JSON().decode(capiListJSON);
var gr = new GlideRecord('sn_capi_cloud_api');
gr.query();
var responseObj = {
cloudapiList : cloudapis,
totalRecords : gr.getRowCount()
};
return responseObj;
} catch (error) {
var e = error;
var failedMessage = gs.getMessage("Failed to get all cloud api.");
throw sn_smd.SMErrorHelper.createScriptAPIError(
failedMessage,
"CMPGetAllCloudApiAction.doAction(): Failed to get all cloud api",
error
);
}
},
type: 'CMPGetAllCloudApiAction'
});
Sys ID
7a9199c60bff6200a91f6707b6673a99