Syntax:
GET https://<hostname>/api/tool/Macro/
?hierarchy=<hierarchy>
&method=evaluate
&input='<macro>'
Parameter values:
<hierarchy>
parameter<input>
parameterLinks provide details in the API Guide. To see a response in Response samples, select it from Example dropdown.
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB&method=evaluate
&input='{# device.hcmf.Customer.shortName,extendedName,dealIDInfo | type: Customer #}'
dealIDInfo
:GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB&method=evaluate
&input='{# device.hcmf.Customer. shortName,extendedName | dealIDInfo:01150015 | type: Customer #}'
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB&method=evaluate
&input='{# data.HCSHcmfCustomerDAT.shortName,extendedName,dealIDInfo #}'
dealIDInfo
:GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB&method=evaluate
&input='{# data.HCSHcmfCustomerDAT.shortName,extendedName | dealIDInfo:VC-1010 #}'
Sites belonging to the Customer
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB&method=evaluate
&input={# device.hcmf.CustomerLocation.shortName | bkCustomer_shortName:Innovia #}
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate
&input='{# data.InternalNumberInventory.internal_number,e164number,description,status,usage #}'
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate
&input='{{ fn.one data.InternalNumberInventory.internal_number | status:Available | direction:up }}'
Phone models currently available to a customer
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate
&input='{{ data.PhoneConfigMapping.profiles.*.profile_name | name:Default }}'
Phone models currently offered to customers by the provider
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate
&input='{# data.HcsDeviceTypeDAT.name | name:/^Cisco \d\d\d\d/ | direction:up #}'
All phones belonging to the customer
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate&format=json
&input='{# device.cucm.Phone.__pkid,name,product,description,ownerUserName,lines.line.index,lines.line.dirn.pattern,lines.line.display,lines.line.displayAscii,lines.line.label,lines.recordingFlag,lines.recordingMediaSource,lines.recordingProfileName #}'
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate&format=json
&input='{# device.cucm.User.firstName,userid,__pkid,lastName #}'
customer:
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate&format=json
&input='{{ fn.get_phone_choices ,,,down }}'
site:
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate&format=json
&input='{{ fn.get_phone_choices ,,,local }}'
All phones belonging to a user
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate&format=json
&input='{{ fn.one device.cucm.User.associatedDevices.device | userid:ZAID.AL-FARHAN }}'
All Phones without associated user
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate
&input='{# device.cucm.Phone.name,description | ownerUserName:null | direction:local #}'
All DeviceProfiles without associated user
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate
&input='{# fn.list_set_left macro.DEVICEPROFILE_LIST,macro.PHONEPROFILE_LIST_FLATTENED #}'
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate
&input='{# device.cucm.Line.__pkid,pattern,description,alertingname,asciialertingname #}'
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate
&input='{{ fn.get_associated_lines M.O.Alshahri }}'
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate
&input='{{device.cucm.PhoneType.ProtocolTemplates.*.Protocol | PhoneType:Cisco 6901 | direction:up, device:macro.SITE_CUCM }}'
Phone Button Templates for Phone Model
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate
&input='{{ device.cucm.PhoneType.ProtocolTemplates.*.PBT| PhoneType:Cisco 9971, ProtocolTemplates.*.Protocol:SIP | direction:up, device:macro.SITE_CUCM }}'
Security Profiles for Phone Model
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate
&input='{{ device.cucm.PhoneType.ProtocolTemplates.*.SecurityProfile | PhoneType:Cisco 9951, ProtocolTemplates.*.Protocol:SIP | direction:up, device:macro.SITE_CUCM }}'
Subscriber Phones and Services
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate&nowait=true&format=json
&input='{{ fn.movesub_getguirules_on_username_change zaid.al-farhan }}'
Available Hierarchies of a Customer
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate
&input='{# fn.friendly_path_choices ,down #}'
Usernames at Customer and downwards
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate
&input='{{ fn.list_end_user_names down, fn.null }}'
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate&format=json
&input='{# data.User.username,first_name,last_name,email,sync_type | username: zaid.al-farhan #}'
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia&method=evaluate&format=json
&input='{# device.cucm.CommonPhoneConfig.name #}'
GET /api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate&format=json
&input='{# data.QuickAddGroups.group_name || direction:up, to:Hcs #}'
Unassociated phones of specific model at Site
GET https://<hostname>/api/tool/Macro/?hierarchy=sys.hcs.CS-P.CS-NB.Innovia.INV-Reading&method=evaluate&format=json
&input='{{ fn.get_phone_choices Cisco 8961,SIP,null,up }}'
hierarchy required | string Example: hierarchy=sys.hcs.CS-P.CS-NB Hierarchy at which macro should be evaluated |
method required | string Value: "evaluate" The |
input required | string The macro to be evaluated. Refer to Advanced Configuration Guide for macro syntax. |
[- {
- "shortName": "InGen",
- "extendedName": "InGen Biotech Corporation",
- "dealIDInfo": "InGen-1001"
}, - {
- "shortName": "Paxus",
- "extendedName": "Paxus Bio Science Inc",
- "dealIDInfo": "Paxus-1001"
}, - {
- "shortName": "SBNK-GB",
- "extendedName": "S-Bank Great Britain Ltd",
- "dealIDInfo": "SBNK-GB-1001"
}, - {
- "shortName": "Nine9Nine9",
- "extendedName": "Nine9Nine Action Sports Ltd",
- "dealIDInfo": "Deal-999"
}
]
This API call creates a standalone phone.
For details and how to obtain inputs, see: ADD (standalone) Phone
hierarchy required | string The site hierarchy |
Standalone phone data
standalone | boolean |
name | string = 15 characters ^SEP[:xdigit:]{12} The MAC address (specs above). |
device_type | string The phone model. |
description | string <= 30 characters The phone description. |
Array of objects Line details for each line added. | |
object Contains callback details that will enable VOSS Automate can connect back and update the status when the initiated transaction is completed. |
{- "standalone": true,
- "name": "SEP9971FFEEDDBB",
- "device_type": "Cisco 9971",
- "description": "Meeting Room 1 (x84000)",
- "lines": [
- {
- "directory_number": "1084207",
- "label": "x1084207",
- "display": "Meeting Room1 x1084207"
}, - {
- "directory_number": "1084000",
- "label": "Reception x1084000",
- "display": "Reception x1084000"
}
], - "request_meta": {
- "external_id": "3x4mpl3-3xtern4l-FF",
- "external_reference": "Add Standalone Phone-FF",
- "callback_url": "46.49.134.136",
- "callback_username": "username",
- "callback_password": "password"
}
}
This API call is used to create a new Subscriber.
For details and how to obtain inputs, see: ADD Subscriber
hierarchy required | string The site hierarchy |
Subscriber, devices and services details
lookUpForUser | boolean |
username | string The username. For local users, the operator enters the user details (username, firstname, lastname, and email) in the form. For Active Directory (AD) users, the user details (username, firstname, lastname, and email) are fetched from the system, and the form fields are read-only. |
firstname | string The user's first name. For local users, the operator enters the user details (username, firstname, lastname, and email) in the form. For Active Directory (AD) users, the user details (username, firstname, lastname, and email) are fetched from the system, and the form fields are read-only. |
lastname | string The user's last name. For local users, the operator enters the user details (username, firstname, lastname, and email) in the form. For Active Directory (AD) users, the user details (username, firstname, lastname, and email) are fetched from the system, and the form fields are read-only. |
string The user's email address. For local users, the operator enters the user details (username, firstname, lastname, and email) in the form. For Active Directory (AD) users, the user details (username, firstname, lastname, and email) are fetched from the system, and the form fields are read-only. | |
custom_string_1 | string |
password | string The user's password. For local users, the operator enters the user password in the form. For Active Directory (AD) users, the user password is not relevant, and the password field is hidden on the form. |
pin | string Voicemail/extension mobility PIN. |
Array of objects One or more user lines. Multiple lines can be added to a phone, and are ordered 1,2, and so on, e.g. "directory_number":"line_1", "directory_number":"line_2", "directory_number":"line_n". | |
qagroup_name | string The Quick Add Group name. Part of the desk phone details, which includes qagroup_name, phone_type, phone_protocol, phone_name. |
voice | boolean Default: false Desk phone. Defines whether a desk phone is required. |
phone_type | string The phone model. Part of the desk phone details, which includes qagroup_name, phone_type, phone_protocol, phone_name. Displays when "voice" is True. |
phone_protocol | string The desk phone protocol. Part of the desk phone details, which includes qagroup_name, phone_type, phone_protocol, phone_name. |
button_template | string The desk phone button template name. |
Array of objects One or more phones. Includes the desk phone MAC address (phone_name) for each of the user's phones. | |
voicemail | boolean Default: false Voicemail service. Defines whether the voicemail service is required. |
mobility | boolean Default: false Enum: true false Extension mobility service. Defines whether the extension mobility service is required. |
jabber | boolean Default: false Jabber service. Allows allocation of soft phones. |
Array of objects One or more Jabber devices. If Four types of jabber devices can be assigned
| |
custom_string_2 | string |
custom_string_3 | string |
object Contains callback details that will enable VOSS Automate can connect back and update the status when the initiated transaction is completed. |
{- "lookUpForUser": true,
- "username": "syed.shahnawaz",
- "firstname": "Syed",
- "lastname": "Shahnawaz",
- "password": "C1&a2*B3$d4.",
- "pin": "13579",
- "lines": [
- {
- "directory_number": "1084008"
}, - {
- "directory_number": "1084000"
}
], - "qagroup_name": "99XX Reference Quick Add Group",
- "voice": true,
- "phone_type": "Cisco 9971",
- "phone_protocol": "SIP",
- "button_template": "Standard 9971 SIP",
- "phones": [
- {
- "phone_name": "SEP9971EECCBBAA"
}
], - "voicemail": true,
- "mobility": true,
- "jabber": true,
- "jabber_devices": [
- {
- "jabber_agent": "android",
- "device_name": "BOTSYEDSHAHNAWAZ"
}, - {
- "jabber_agent": "csf",
- "device_name": "CSFSYEDSHAHNAWAZ"
}, - {
- "jabber_agent": "ipad",
- "device_name": "TABSYEDSHAHNAWAZ"
}, - {
- "jabber_agent": "iphone",
- "device_name": "TCTSYEDSHAHNAWAZ"
}
], - "request_meta": {
- "external_id": "3x4mpl3-3xtern4l-FF",
- "external_reference": "Add-Subscriber-FF",
- "callback_username": "username",
- "callback_password": "password"
}
}
This API call triggered is to reset the following:
For details and how to obtain inputs, see: Change CUCM PIN/Password and/or CUC PIN
hierarchy required | string Site hierarchy |
User credentials, services applied
user | string The username. |
cucm | boolean Default: false Defines whether the password/PIN reset is for CUCM. Set to True to reset a CUCM PIN or password. |
cuc | boolean Default: false Defines whether the password/PIN reset is for CUC. Set to True to reset a CUC PIN or password. |
password | string The Jabber password. When value for |
object Contains callback details that will enable VOSS Automate can connect back and update the status when the initiated transaction is completed. |
{- "user": "jo.bloggs",
- "cucm": true,
- "cuc": true,
- "password": "A@e£%44e11223",
- "pin": "82245698",
- "request_meta": {
- "external_id": "3x4mpl3-3xtern4l-FF",
- "external_reference": "Reset Credential-FF",
- "callback_url": "46.49.134.136",
- "callback_username": "username",
- "callback_password": "password"
}
}
This API call is triggered to replace an existing Phone with a new one.
For details and how to obtain inputs, see: POST - Replace a Cisco phone
hierarchy required | string Site hierarchy |
Existing and new phone details
existing_phone | string = 15 characters ^SEP[:xdigit:]{12} The MAC address (specs above). |
replacement_phone | string = 15 characters ^SEP[:xdigit:]{12} The MAC address (specs above). |
replacement_model | string Choose from existing phone models available. |
protocol | string The phone protocols that the replacement phone model supports. |
pbt | string The phone button template from those that are available in the system for the specified replacement phone model. |
security_profile | string The phone security profile for the replacement phone model. |
replacement_description | string A phone description for the new, replacement phone. |
object Contains callback details that will enable VOSS Automate can connect back and update the status when the initiated transaction is completed. |
{- "existing_phone": "SEP9951EEDDAABB",
- "replacement_phone": "SEP8945EEAADDBB",
- "replacement_model": "Cisco 8945",
- "protocol": "SIP",
- "pbt": "Standard 8945 SIP",
- "security_profile": "Cisco 8945 - Standard SIP Non-Secure Profile",
- "replacement_description": "Ismail x1084005",
- "request_meta": {
- "external_id": "3x4mpl3-3xtern4l-FF",
- "external_reference": "ReplacePhone-FF",
- "callback_url": "46.49.134.136",
- "callback_username": "username",
- "callback_password": "password"
}
}
This API call is to associate a standalone phone or standalone UDP to a Subscriber.
For details and how to obtain inputs, see: Associate existing Phone to existing Subscriber
hierarchy required | string Site hierarchy |
User and device details.
username | string The username. |
newDeviceName | string The name of an unassociated device or unassociated device profile name |
newDeviceType | string Device type, either Cisco device (phone), or Cisco UDP (device profile). |
object Contains callback details that will enable VOSS Automate can connect back and update the status when the initiated transaction is completed. |
{- "username": "jo.bloggs",
- "newDeviceName": "SEP8945EEAADDBB",
- "newDeviceType": "phone",
- "request_meta": {
- "external_id": "3x4mpl3-3xtern4l-FF",
- "external_reference": "SNow - Associate Phone with Subscriber",
- "callback_url": "46.49.134.136",
- "callback_username": "username",
- "callback_password": "password"
}
}
This API call is to remove a Subscriber-Phone association to make it a unassigned/standalone device.
For details and how to obtain inputs, see: Disassociate Phone associated to Subscriber
hierarchy required | string Site hierarchy |
User and device details
username | string The username. |
oldDeviceName | string The name of the device you are removing. |
object Contains callback details that will enable VOSS Automate can connect back and update the status when the initiated transaction is completed. |
{- "username": "jo.bloggs",
- "oldDeviceName": "SEP8945EEAADDBB",
- "request_meta": {
- "external_id": "3x4mpl3-3xtern4l-FF",
- "external_reference": "SNow - Disassociate Phone with Subscriber",
- "callback_url": "46.49.134.136",
- "callback_username": "username",
- "callback_password": "password"
}
}
This API call is to move a Subscriber and its services/devices between Sites. One or more new Lines are created during the move process and the new line(s) are assigned to the devices / services.
For details and how to obtain inputs, see: Move Subscriber between Sites
hierarchy required | string Customer hierarchy |
Subscriber, sites and devices details
username | string The username. |
move_from_hn | string The name of the site where you are moving the subscriber from. |
move_to_hn | string The name of the site where you are moving the subscriber to. |
move_line | boolean Default: false Defines whether existing lines need to be moved to the new site. |
AllowLineMove | boolean Default: false Whether to move lines. |
new_line | boolean Default: true Defines whether to allocate new lines in the target site when moving the subscriber. |
Array of objects Line details. For each line you add, the directory number, the line label, and the line display name. | |
move_phone | boolean Whether to move the phone. |
new_phone | boolean Whether to add a new phone. |
new_phone_from_source | boolean Whether to create a new phone from existing phone. |
new_phone_config_source_product | string The source phone type. |
new_phone_config_source | string New phone's configuration source. |
phone_type | string Phone type at target site. |
name | string = 15 characters ^SEP[:xdigit:]{12} The MAC address (specs above). |
newCucUserTemplate | string Default CUC template. This value is defined in the Site Defaults. |
default_dp | boolean Hardcoded to |
default_css | boolean The CSS. Hardcoded to |
object Contains callback details that will enable VOSS Automate can connect back and update the status when the initiated transaction is completed. |
{- "username": "zaid.al-farhan",
- "move_from_hn": "sys.hcs.CS-P.CS-NB.Innovia.INV-NewYork",
- "move_to_hn": "sys.hcs.CS-P.CS-NB.Innovia.INV-JerseyCity",
- "move_phone": true,
- "move_line": false,
- "new_line": true,
- "lines": [
- {
- "directory_number": "1037505",
- "label": "Zaid.Al-Farhan x1037505",
- "display": "Zaid.Al-Farhan"
}
], - "default_css": true,
- "newCucUserTemplate": "cu197-innovia-vms-2_usertemplate_1",
- "request_meta": {
- "external_id": "3x4mpl3-3xtern4l-FF",
- "external_reference": "SNow - Move Subscriber to another Site",
- "callback_url": "46.49.134.136",
- "callback_username": "username",
- "callback_password": "password"
}
}
This API call updates the following device line information:
For details and how to obtain inputs, see: Modify Line Data
Line PKID required | string The PKID of the line to update. |
hierarchy required | string Site hierarchy |
description | string <= 30 characters Line description. |
alertingName | string <= 30 characters Line alerting name. |
asciialertingname | string <= 30 characters Line alerting ASCII name. |
object Contains callback details that will enable VOSS Automate can connect back and update the status when the initiated transaction is completed. |
{- "description": "FrontDesk x1084004",
- "alertingName": "1084004",
- "asciiAlertingName": "FrontDesk 1084004",
- "request_meta": {
- "external_id": "3x4mpl3-3xtern4l-FF",
- "external_reference": "SNow-Change Line Details",
- "callback_url": "46.49.134.136",
- "callback_username": "username",
- "callback_password": "password"
}
}
API call to modify the following Phone data: Phone Description, Line Label, Line Display Name, Line ASCII Display Name and Line Call Recording settings
For details and how to obtain inputs, see: Modify Phone Data - Line Recording Details
Phone PKID required | string The PKID of the phone to update. |
hierarchy required | string Site hierarchy |
object (callback details) Only one of these objects can be in the array. Contains callback details that will enable VOSS Automate can connect back and update the status when the initiated transaction is completed. | |
object (line data) More than one of these objects can be in the array. |
[- {
- "op": "add",
- "path": "/request_meta",
- "value": [
- {
- "external_id": "3x4mpl3-3xtern4l-FF",
- "external_reference": "SNow-Change Line Details",
- "callback_url": "46.49.134.136",
- "callback_username": "username",
- "callback_password": "password"
}
]
}, - {
- "op": "replace",
- "path": "/description",
- "value": "Bart Simpson Phone 1"
}
]
Format: DELETE /api/relation/SubscriberPhone/<Removal_Phone_PKID>/?hierarchy=<Customer Hierarchy>&nowait=true&format=json
For details and how to obtain inputs, see Delete a phone
Removal_Phone_PKID required | string The phone PKID |
hierarchy required | string Customer hierarchy |
nowait | boolean Set to |
format | string Set to |
{- "href": "/api/tool/Transaction/9095e5a2-6b62-45f8-abbb-93bd908a8bef/",
- "transaction_id": "9095e5a2-6b62-45f8-abbb-93bd908a8bef",
- "success": true
}
This API call is used to delete a subscriber.
For details and how to obtain inputs, see: Delete a Subscriber
Deletion Subscriber PKID required | string PKID of the subscriber to delete. |
hierarchy required | string Customer hierarchy |
{- "href": "/api/tool/Transaction/b471aa05-01d5-46c9-981e-685774b645be/",
- "transaction_id": "b471aa05-01d5-46c9-981e-685774b645be",
- "success": true
}