cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3472
Views
1
Helpful
0
Comments
rwhitear42
Cisco Employee
Cisco Employee

Task Name

UCSD 6.5 has global Variables that the user can define. These workflows can create and update and read and delete these variables

Description

Prerequisites

  1. 1. Works only on 6.5 and above

Category

CloupiaScript

Components

User Inputs

The following CloupiaScript can be used to create a new user group via an API call:

importClass(com.cisco.cuic.api.client.APIGroup);

importClass(com.cisco.cuic.api.client.CuicServer);

importClass(com.cisco.cuic.api.models.UserAPIGlobal);

var ucsdIP = "10.52.249.102";

var xCloupiaRequestKey = "E85B98439B194AAFB82A022BCCD83214";

var groupName = "TestGroup";

var email = "rwhitear@cisco.com";

var firstName = "Russ";

var lastName = "Whitear";

var address = "Bedfont";

var description = "Created by an API call";

var phoneNo = "123456789";


var server = CuicServer.getAPI(ucsdIP, xCloupiaRequestKey, "https", 8443);

 

var instance = new UserAPIGlobal(server);

 

var apiGroup = new  APIGroup();

 

apiGroup.setGroupName(groupName); //Mandatory

apiGroup.setEmailAddress(email); //Mandatory

//apiGroup.setGroupType(0); //Optional- can accept either 0 or 1; by default 0.

//apiGroup.setParentGroupId(2); //Optional

//apiGroup.setParentGroupName("MSP ORG 1"); //Optional

apiGroup.setFirstName(firstName); //Optional

apiGroup.setLastName(lastName); //Optional

apiGroup.setAddress(address); //Optional

apiGroup.setDescription(description); //Optional

apiGroup.setPhoneNumber(phoneNo); //Optional

var groupId = instance.userAPICreateGroup(apiGroup);

 

logger.addInfo("Group Id for the group created: "+groupId);

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links