Before the RESTClient is started, a security exception must be put in place for the HTTPS connection that will be used to PowerMedia XMS. Use a regular Firefox browser window, (not the RESTClient) and go to https://<xms_ip_address>:10443.
A security exception will be generated by the non-verified security certificate supplied with PowerMedia XMS for the RESTful Management API. Handle the exception with: Understand the Risks/Add Exception/Confirm Security Exception. Allow the exception will remain permanently stored. For more information, refer to the CentOS HTTPS Setup for Console Use section in the Dialogic® PowerMedia™ XMS Quick Start Guide.
Proceed as follows to start RESTClient:
From the main Firefox pull-down menu, select Web Developer.
Click on RESTClient.
Select Headers and Custom Header.
Enter:
Name: Content-Type, Value: application/json
Name: Accept, Value: application/json
Note: Two Request Headers must be entered.
Basic Authentication should also be activated. Under Authentication/Basic Authentication, set:
Enter User Name: admin
Enter Password: admin
Remember Me – checked off
Select OK.
The remainder of this section gives examples for each supported HTTP method. However, refer to RESTful Management API Resources for details on using the resource and method.
Select GET from the Method pull-down menu.
Enter the HTTPS URL for the resource
desired.
The format used here is https://<xms_ip_address>:10443/resource.
For example, to look at the domain name server setting (DNS) for the XMS system at 172.31.0.2, the URL would
be https://172.31.0.2:10443/network/dns.
View the Response Header and Response Body by clicking their respective tabs.
The following example shows the JSON representation of the DNS requested above:
{
"hostname" : "novalocal",
"search" : "novalocal",
"nameserver" : [
{
"addr" : "172.31.0.3"
}
]
}
Select PUT from the Method pull-down.
Enter the HTTPS URL for the resource
desired.
The format is https://<xms_ip_address>:10443/resource.
For example, to set the SIP call routing to be used, the URL would
be https://172.31.0.2:10443/routing.
The JSON describing the desired routes would be entered in the Request
Body field.
The following example shows how to set all routes to their original values:
{
"routes" : [
{
"pattern" : "^sip:annc.*",
"application" : "NETANN"
},
{
"pattern" : "^sip:conf=.*",
"application" : "NETANN"
},
{
"pattern" : "^sip:dialog.*",
"application" : "VXML"
},
{
"pattern" : "^sip:.*",
"application" : "app"
}
]
}
Requests can be entered into the Body text field, copied and pasted into the field or read out of a file.
Select POST from the Method pull-down menu.
Enter the HTTPS URL for the resource
desired.
The format is https://<xms_ip_address>:10443/resource.
For example, to create a system backup, the URL would be https://172.31.0.2:10443/system/backup.
The following example shows what would be returned in the Response Body:
{
"system_backup" : [
{
"resources" : [
{
"id" : "xmsbackup-20121011-161653.tar.gz",
"uri" : "\/system\/backup\/xmsbackup-20121011-161653.tar.gz"
}
]
}
}
In addition, the backup file /etc/xms/backup/xmsbackup-20121011-161653.tar.gz would be created.
Select DELETE from the Method pull-down menu.
Enter the HTTPS URL for the resource
desired.
The format is https://<xms_ip_address>:10443/resource.
For example, to delete the media file /var/lib/xms/media/en-US/vxml/recorded/record-120921-085752-0000.wav,
the URL would be https://172.31.0.2:10443/media/vxml/recorded/record-120921-085752-0000.wav.
Note: The root media directory is /var/lib/xms/media/en-US/ and does not need to be specified.