TANDBERG D14172.01 Introduction to TANDBERG XML API Service TXAS, Bare-bone HTTPS access, getxml

Models: D14172.01

1 84
Download 84 pages 8.98 Kb
Page 14
Image 14
1.5Introduction to TANDBERG XML API Service (TXAS)

TANDBERG Gatekeeper/Border Controller API User Guide

1.5Introduction to TANDBERG XML API Service (TXAS)

TXAS is a service provided by TANDBERG units for transmitting and receiving information encoded in XML format.

The API uses HTTP(S) as the transport mechanism and connects to the normal web port (80). TXAS can be accessed in two ways:

bare-bone HTTP requests where URLs uniquely identify the request, and

SOAP, where a single URI is used but the request itself is encoded with XML.

1.5.1 Bare-bone HTTP(S) access

The bare-bone HTTP(S) mode uses a unique URL to identify the specific request. The contents of the HTTP body will be a XML document (or part of it).

Bare-bone HTTP(S) access is accomplished by passing arguments in the query string (after '?' in a URI) in a GET request, or using the "application/x-www-form-urlencoded" content-type method of POSTing form data.

getxml

Request URI:

/getxml

 

 

Request parameter:

location = XPath expression

 

 

The getxml request returns an XML document based on the location parameter passed to the request. The elements (or complete document) matching the expression will be returned.

If an invalid XPath expression is supplied, a <Fault> element with a <XPathError> element will be returned.

Example 1.15

Using the Unix curl command, the up time of a system can be retrieved from the Status document:

curl –k –u admin:<password> \ https://10.0.0.1/getxml?location=Status/SystemUnit/Uptime

<?xml version="1.0"?> <Status>

<SystemUnit item="1">

<Uptime item="1">604800</Uptime> </SystemUnit>

</Status>

formputxml

Request URI:

/formputxml

 

 

Request parameter:

xmldoc = "an XML document of Configuration or a Command"

 

 

This is most useful in a POST (to extend character limit of 255 of GET urls). It posts a Configuration or Command document to set some configuration values or issue a command.

D14172.01

page 14 of 84

Page 14
Image 14
TANDBERG D14172.01 Introduction to TANDBERG XML API Service TXAS, Bare-bone HTTPS access, getxml, formputxml, Example