Cisco Unity Connection Provisioning Interface (CUPI) API -- Cluster

From DocWiki

(Difference between revisions)
Jump to: navigation, search
m (1 revision)
 
(2 intermediate revisions not shown)
Line 12: Line 12:
== About Clusters ==
== About Clusters ==
-
This page contains information on how to use the CUPI API to view cluster information.
+
Administrator can use this API to fetch the details of a Unity Connection cluster. This page contains information on how to use the CUPI API to view cluster information.
-
== Viewing ==
+
== Listing Cisco Unity Connection Cluster locations ==
The following is an example of a GET that displays cluster information:
The following is an example of a GET that displays cluster information:
Line 28: Line 28:
200
200
OK
OK
-
<?xml version="1.0" encoding="UTF-8"?>
+
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-
<Cluster>
+
<VmsServers total="2">
-
   <Server>
+
   <VmsServer>
-
    <Key>24a001ce-5090-44ec-99b2-0a214a4f8884</Key>
+
  <URI>/vmrest/vmsservers/3ee10726-9634-4066-bfcb-c936bc074be6</URI>
-
    <DatabaseReplication>0</DatabaseReplication>
+
  <ObjectId>3ee10726-9634-4066-bfcb-c936bc074be6</ObjectId>
-
    <HostName>qa-ks-vm-48</HostName>
+
  <ServerName> qa-ks-vm-279</ServerName>
-
    <Ipv6Name/>
+
  <IpAddress>10.65.156.193</IpAddress>
-
    <MacAddress/>
+
  <VmsServerObjectId>3ee10726-9634-4066-bfcb-c936bc074be6</VmsServerObjectId>  
-
    <Description/>
+
  <ClusterMemberId>0</ClusterMemberId>  
-
   </Server>
+
  <ServerState>1</ServerState>
-
   <Server>
+
  <HostName> qa-ks-vm-279.cisco.com</HostName>  
-
    <Key>56831ca1-e855-6305-3d47-58a5f9dc6d2c</Key>
+
  <ServerDisplayState>3</ServerDisplayState>  
-
    <DatabaseReplication>1</DatabaseReplication>
+
  <IpAddressV6>fe80::250:56ff:feab:1c6</ IpAddressV6>
-
    <HostName>qa-ks-vm-107.cisco.com</HostName>
+
  <SubToPerformReplicationRole>false</SubToPerformReplicationRole>  
-
    <Ipv6Name/>
+
   </VmsServer>
-
    <MacAddress/>
+
   <VmsServer>
-
    <Description/>
+
  <URI>/vmrest/vmsservers/a57a68c6-782f-4757-945c-270e0fba2734</URI>  
-
   </Server>
+
  <ObjectId>a57a68c6-782f-4757-945c-270e0fba2734</ObjectId>
-
</Cluster>
+
  <ServerName> qa-ks-vm-279.cisco.com </ServerName>
 +
  <IpAddress>10.65.156.252</IpAddress>
 +
  <VmsServerObjectId>a57a68c6-782f-4757-945c-270e0fba2734</VmsServerObjectId>
 +
  <ClusterMemberId>1</ClusterMemberId>
 +
  <ServerState>8</ServerState>  
 +
  <HostName> qa-ks-vm-279.cisco.com </HostName>  
 +
  <ServerDisplayState>4</ServerDisplayState>
 +
  <IpAddressV6>fe85::450:56ff:feab:1c6</ IpAddressV6>
 +
  <SubToPerformReplicationRole>false</SubToPerformReplicationRole>  
 +
   </VmsServer>
 +
</VmsServers>
</pre>
</pre>
 +
In case of a standalone location, only the data related to that location gets displayed.
 +
 +
'''JSON Example'''
 +
 +
The following is an example of a GET that displays the list of servers in the cluster:
 +
 +
<pre>
 +
GET http://<connection-server>/vmrest/vmsservers
 +
Accept: application/json
 +
Content-type: application/json
 +
Connection: keep-alive
 +
</pre>
 +
 +
The following is the response from the above *GET* request and the actual response will depend upon the information given by you:
 +
 +
<pre>
 +
200
 +
OK
 +
{
 +
"@total": "2",
 +
"VmsServer":[
 +
{
 +
  "URI": "/vmrest/vmsservers/ef03ca05-3c05-4465-9985-9de371e2e94e",
 +
  "ObjectId": "ef03ca05-3c05-4465-9985-9de371e2e94e",
 +
  "ServerName": " qa-ks-vm-19",
 +
  "IpAddress": "10.78.171.134",
 +
  "VmsServerObjectId": "ef03ca05-3c05-4465-9985-9de371e2e94e",
 +
  "ClusterMemberId": "0",
 +
  "ServerState": "20",
 +
  "HostName": " qa-ks-vm-19.cisco.com",
 +
  "ServerDisplayState": "3",
 +
  "IpAddressV6":"fe80::250:56ff:feab:1c6"
 +
  "SubToPerformReplicationRole": "false"
 +
},
 +
{
 +
  “URI” : “/vmrest/vmsservers/a57a68c6-782f-4757-945c-270e0fba2734”,
 +
  “ObjectId” : “a57a68c6-782f-4757-945c-270e0fba2734”,
 +
  “ServerName” : “qa-ks-vm-279.cisco.com”,
 +
  “IpAddress” : “10.65.156.25”,
 +
  “VmsServerObjectId” : “a57a68c6-782f-4757-945c-270e0fba2734”,
 +
  “ClusterMemberId” : “1”,
 +
  “ServerState” : “8”,
 +
  “HostName” : “qa-ks-vm-279.cisco.com”,
 +
  “ServerDisplayState>”: “4”,
 +
  "IpAddressV6":"fe85::450:56ff:feab:1c6"
 +
  “SubToPerformReplicationRole”: “false”
 +
} ]
 +
}
 +
</pre>
 +
 +
== Viewing a specific location in Cisco Unity Connection Cluster ==
 +
 +
Administrator can use this API to fetch details of a particular server in a Unity Connection cluster.
 +
The following is an example of the GET request :
 +
 +
<pre>
 +
GET https://<connection-server>/vmrest/vmsservers/<vmsServerObjectId>
 +
</pre>
 +
 +
The following is the response from the above *GET* request and the actual response will depend upon the information given by you:
 +
 +
<pre>
 +
200
 +
ok
 +
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 +
<VmsServer>
 +
  <URI>/vmrest/vmsservers/3ee10726-9634-4066-bfcb-c936bc074be6</URI>
 +
  <ObjectId>3ee10726-9634-4066-bfcb-c936bc074be6</ObjectId>
 +
  <ServerName> qa-ks-vm-279</ServerName>
 +
  <IpAddress>10.65.156.193</IpAddress>
 +
  <VmsServerObjectId>3ee10726-9634-4066-bfcb-c936bc074be6</VmsServerObjectId>
 +
  <ClusterMemberId>0</ClusterMemberId>
 +
  <ServerState>1</ServerState>
 +
  <HostName> qa-ks-vm-279.cisco.com</HostName>
 +
  <ServerDisplayState>3</ServerDisplayState>
 +
  <IpAddressV6>fe85::450:56ff:feab:1c6</ IpAddressV6>
 +
  <SubToPerformReplicationRole>false</SubToPerformReplicationRole>
 +
</VmsServer>
 +
</pre>
 +
 +
'''JSON Example'''
 +
 +
The following is an example of the GET command to view the details of particular server in the cluster.
 +
 +
<pre>
 +
GET https://< connection-server >/vmrest/vmsservers/<vmsServerObjectId>
 +
Accept: application/json
 +
Content-type: application/json
 +
Connection: keep-alive
 +
</pre>
 +
 +
The following is the response from the above *GET* request and the actual response will depend upon the information given by you:
 +
 +
<pre>
 +
200
 +
Ok
 +
{
 +
{
 +
  "URI": "/vmrest/vmsservers/ef03ca05-3c05-4465-9985-9de371e2e94e",
 +
  "ObjectId": "ef03ca05-3c05-4465-9985-9de371e2e94e",
 +
  "ServerName": " qa-ks-vm-19",
 +
  "IpAddress": "10.78.171.134",
 +
  "VmsServerObjectId": "ef03ca05-3c05-4465-9985-9de371e2e94e",
 +
  "ClusterMemberId": "0",
 +
  "ServerState": "20",
 +
  "HostName": " qa-ks-vm-19.cisco.com",
 +
  "ServerDisplayState": "3",
 +
  "IpAddressV6":"fe80::250:56ff:feab:1c6"
 +
 +
  "SubToPerformReplicationRole": "false"
 +
}
 +
}
 +
</pre>
 +
 +
== Explanation of Data Fields ==
 +
 +
{| border="1" cellspacing="0" cellpadding="5" align="center"
 +
! Parameter
 +
! Operations
 +
! Data Type
 +
! Comments
 +
|-
 +
| Object id
 +
| char
 +
| Read-Only
 +
| Acts as a primary key for the API. The ObjectID is a unique system-generated identifier for a VMSServer object.
 +
 +
|-
 +
| ServerName
 +
| nvarchar
 +
| Read-Only
 +
| Specifies the name of the server.
 +
|-
 +
| IpAddress
 +
| varchar
 +
| Read-Only
 +
| Specifies the IP address of the server.
 +
|-
 +
| VmsServerObjectId
 +
| char
 +
| Read-Only
 +
| Acts as a primary key for the API. The VmsServerObjectId is a unique system-generated identifier for a VMSServer object.
 +
|-
 +
| ClusterMemberId
 +
| smallint
 +
| Read-Only
 +
| Specifies a unique number assigned to each server in the cluster as per their failover order.
 +
Values can be:
 +
*0-Primary
 +
*1-Secondary
 +
|-
 +
| ServerState
 +
| int
 +
| Read-Only
 +
| Specifies the current state of the server.
 +
Values can be:
 +
*0-Pri_Init
 +
*1-Pri_Active
 +
*2-Pri_Act_Secondary
 +
*3-Pri_Idle
 +
*4-Pri_Failover
 +
*5-Pri_Takeover
 +
*6-Pri_SBR
 +
*7-Sec_Init
 +
*8-Sec_Active
 +
*9-Sec_Act_Primary
 +
*10-Sec_Idle
 +
*11-Sec_Takeover
 +
*12-Sec_Failover
 +
*13-Sec_SBR
 +
*14-Db_Sync
 +
*15-Set_Peer_Idle
 +
*16-Undefined
 +
*17-Pri_Active_Disconnected
 +
*18-Pri_Connecting
 +
*19-Pri_Choose_Role
 +
*20-Pri_Single_Server
 +
*21-Sec_Act_Primary_Disconnected
 +
*22-Sec_Connecting
 +
*23-Sec_Choose_Role
 +
*24-Shutdown
 +
|-
 +
| HostName
 +
| varchar
 +
| Read-Only
 +
| Indicates the hostname of the VMS server
 +
|-
 +
| ServerDisplayState
 +
| int
 +
| Read-Only
 +
| Specifies the values for the admin to display current server status.
 +
Values can be:
 +
*0 – UNKNOWN
 +
*1 – DOWN
 +
*2 – INITIALIZING
 +
*3 – PRIMARY
 +
*4 – SECONDARY
 +
*5 – IDLE
 +
*6 - IN_DB_SYNC
 +
*7 - IN_SBR
 +
|-
 +
| IpAddressV6
 +
| varchar
 +
| Read-Only
 +
| Specifies the IPV6 address of the server.
 +
|-
 +
| SubToPerformReplicationRole
 +
| boolean
 +
| Read-Only
 +
|Note – Defined for future purpose.
 +
Indicates whether the subscriber machine is enabled for directory replication; On Publisher machine its value is always false.
 +
Values can be:
 +
*0- false
 +
*1- true
 +
|}
 +
-
For the DatabaseReplication field, a value of 0 indicates that the server is the publisher, whereas 1 indicates that it is the subscriber.
 
[[Category:Cisco Unity Connection Provisioning Interface (CUPI) API]]
[[Category:Cisco Unity Connection Provisioning Interface (CUPI) API]]

Latest revision as of 10:50, 1 November 2013

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation

Contents



About Clusters

Administrator can use this API to fetch the details of a Unity Connection cluster. This page contains information on how to use the CUPI API to view cluster information.


Listing Cisco Unity Connection Cluster locations

The following is an example of a GET that displays cluster information:

GET http://<connection-server>/vmrest/cluster

The following is the response from the above GET request:

200
OK
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <VmsServers total="2">
  <VmsServer>
   <URI>/vmrest/vmsservers/3ee10726-9634-4066-bfcb-c936bc074be6</URI> 
   <ObjectId>3ee10726-9634-4066-bfcb-c936bc074be6</ObjectId> 
   <ServerName> qa-ks-vm-279</ServerName> 
   <IpAddress>10.65.156.193</IpAddress> 
   <VmsServerObjectId>3ee10726-9634-4066-bfcb-c936bc074be6</VmsServerObjectId> 
   <ClusterMemberId>0</ClusterMemberId> 
   <ServerState>1</ServerState> 
   <HostName> qa-ks-vm-279.cisco.com</HostName> 
   <ServerDisplayState>3</ServerDisplayState> 
   <IpAddressV6>fe80::250:56ff:feab:1c6</ IpAddressV6>
   <SubToPerformReplicationRole>false</SubToPerformReplicationRole> 
  </VmsServer>
  <VmsServer>
   <URI>/vmrest/vmsservers/a57a68c6-782f-4757-945c-270e0fba2734</URI> 
   <ObjectId>a57a68c6-782f-4757-945c-270e0fba2734</ObjectId> 
   <ServerName> qa-ks-vm-279.cisco.com </ServerName> 
   <IpAddress>10.65.156.252</IpAddress> 
   <VmsServerObjectId>a57a68c6-782f-4757-945c-270e0fba2734</VmsServerObjectId> 
   <ClusterMemberId>1</ClusterMemberId> 
   <ServerState>8</ServerState> 
   <HostName> qa-ks-vm-279.cisco.com </HostName> 
   <ServerDisplayState>4</ServerDisplayState>
   <IpAddressV6>fe85::450:56ff:feab:1c6</ IpAddressV6>
   <SubToPerformReplicationRole>false</SubToPerformReplicationRole> 
  </VmsServer>
 </VmsServers>

In case of a standalone location, only the data related to that location gets displayed.

JSON Example

The following is an example of a GET that displays the list of servers in the cluster:

GET http://<connection-server>/vmrest/vmsservers
Accept: application/json
Content-type: application/json
Connection: keep-alive

The following is the response from the above *GET* request and the actual response will depend upon the information given by you:

200
OK
{
 "@total": "2",
 "VmsServer":[
 {
  "URI": "/vmrest/vmsservers/ef03ca05-3c05-4465-9985-9de371e2e94e",
  "ObjectId": "ef03ca05-3c05-4465-9985-9de371e2e94e",
  "ServerName": " qa-ks-vm-19",
  "IpAddress": "10.78.171.134",
  "VmsServerObjectId": "ef03ca05-3c05-4465-9985-9de371e2e94e",
  "ClusterMemberId": "0",
  "ServerState": "20",
  "HostName": " qa-ks-vm-19.cisco.com",
  "ServerDisplayState": "3",
  "IpAddressV6":"fe80::250:56ff:feab:1c6"
  "SubToPerformReplicationRole": "false"
 },
 {
  “URI” : “/vmrest/vmsservers/a57a68c6-782f-4757-945c-270e0fba2734”,
  “ObjectId” : “a57a68c6-782f-4757-945c-270e0fba2734”,
  “ServerName” : “qa-ks-vm-279.cisco.com”,
  “IpAddress” : “10.65.156.25”,
  “VmsServerObjectId” : “a57a68c6-782f-4757-945c-270e0fba2734”, 
  “ClusterMemberId” : “1”, 
  “ServerState” : “8”,
  “HostName” : “qa-ks-vm-279.cisco.com”, 
  “ServerDisplayState>”: “4”, 
  "IpAddressV6":"fe85::450:56ff:feab:1c6"
  “SubToPerformReplicationRole”: “false” 
 } ]
}

Viewing a specific location in Cisco Unity Connection Cluster

Administrator can use this API to fetch details of a particular server in a Unity Connection cluster. The following is an example of the GET request :

GET https://<connection-server>/vmrest/vmsservers/<vmsServerObjectId>

The following is the response from the above *GET* request and the actual response will depend upon the information given by you:

200
ok
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <VmsServer>
  <URI>/vmrest/vmsservers/3ee10726-9634-4066-bfcb-c936bc074be6</URI> 
  <ObjectId>3ee10726-9634-4066-bfcb-c936bc074be6</ObjectId> 
  <ServerName> qa-ks-vm-279</ServerName> 
  <IpAddress>10.65.156.193</IpAddress> 
  <VmsServerObjectId>3ee10726-9634-4066-bfcb-c936bc074be6</VmsServerObjectId> 
  <ClusterMemberId>0</ClusterMemberId> 
  <ServerState>1</ServerState> 
  <HostName> qa-ks-vm-279.cisco.com</HostName> 
  <ServerDisplayState>3</ServerDisplayState> 
  <IpAddressV6>fe85::450:56ff:feab:1c6</ IpAddressV6>
  <SubToPerformReplicationRole>false</SubToPerformReplicationRole> 
 </VmsServer>

JSON Example

The following is an example of the GET command to view the details of particular server in the cluster.

GET https://< connection-server >/vmrest/vmsservers/<vmsServerObjectId>
Accept: application/json
Content-type: application/json
Connection: keep-alive

The following is the response from the above *GET* request and the actual response will depend upon the information given by you:

200
Ok
{
 {
  "URI": "/vmrest/vmsservers/ef03ca05-3c05-4465-9985-9de371e2e94e",
  "ObjectId": "ef03ca05-3c05-4465-9985-9de371e2e94e",
  "ServerName": " qa-ks-vm-19",
  "IpAddress": "10.78.171.134",
  "VmsServerObjectId": "ef03ca05-3c05-4465-9985-9de371e2e94e",
  "ClusterMemberId": "0",
  "ServerState": "20",
  "HostName": " qa-ks-vm-19.cisco.com",
  "ServerDisplayState": "3",
  "IpAddressV6":"fe80::250:56ff:feab:1c6"

  "SubToPerformReplicationRole": "false"
 }
}

Explanation of Data Fields

Parameter Operations Data Type Comments
Object id char Read-Only Acts as a primary key for the API. The ObjectID is a unique system-generated identifier for a VMSServer object.
ServerName nvarchar Read-Only Specifies the name of the server.
IpAddress varchar Read-Only Specifies the IP address of the server.
VmsServerObjectId char Read-Only Acts as a primary key for the API. The VmsServerObjectId is a unique system-generated identifier for a VMSServer object.
ClusterMemberId smallint Read-Only Specifies a unique number assigned to each server in the cluster as per their failover order.

Values can be:

  • 0-Primary
  • 1-Secondary
ServerState int Read-Only Specifies the current state of the server.

Values can be:

  • 0-Pri_Init
  • 1-Pri_Active
  • 2-Pri_Act_Secondary
  • 3-Pri_Idle
  • 4-Pri_Failover
  • 5-Pri_Takeover
  • 6-Pri_SBR
  • 7-Sec_Init
  • 8-Sec_Active
  • 9-Sec_Act_Primary
  • 10-Sec_Idle
  • 11-Sec_Takeover
  • 12-Sec_Failover
  • 13-Sec_SBR
  • 14-Db_Sync
  • 15-Set_Peer_Idle
  • 16-Undefined
  • 17-Pri_Active_Disconnected
  • 18-Pri_Connecting
  • 19-Pri_Choose_Role
  • 20-Pri_Single_Server
  • 21-Sec_Act_Primary_Disconnected
  • 22-Sec_Connecting
  • 23-Sec_Choose_Role
  • 24-Shutdown
HostName varchar Read-Only Indicates the hostname of the VMS server
ServerDisplayState int Read-Only Specifies the values for the admin to display current server status.

Values can be:

  • 0 – UNKNOWN
  • 1 – DOWN
  • 2 – INITIALIZING
  • 3 – PRIMARY
  • 4 – SECONDARY
  • 5 – IDLE
  • 6 - IN_DB_SYNC
  • 7 - IN_SBR
IpAddressV6 varchar Read-Only Specifies the IPV6 address of the server.
SubToPerformReplicationRole boolean Read-Only Note – Defined for future purpose.

Indicates whether the subscriber machine is enabled for directory replication; On Publisher machine its value is always false. Values can be:

  • 0- false
  • 1- true

Rating: 0.0/5 (0 votes cast)

Personal tools