Remote Access Services

Ubiqua Protocol Analyzer provides a number of services exposing a limited set of the functionality available throughout the application as Web resources. The Remote Access Service is one of such services. In this chapter you will find the specification of its interface containing the provided resources, what HTTP methods are allowed, what the data representation formats are, and some examples of what you can expect as service outputs.

Remote Access Service

Enabling the Service

At the bottom right of Ubiqua there is a server icon that represents the status of your RESTful service, this can have 2 different states as shown in the image below, the left icon which is the default status appears when the service is not enabled and the icon with the green circle appears when the service is running.

RESTful service icon

To enable the RESTful service, click the Tools > Preferences menu item in the main menu, then press the “Remote access service” toggle button (see the figure below); this box does not denote the service status, it only enables the service. A label showing the service status is next to the right of the “Listening port:” box. The default port is 19501, to specify another one use the “Listening port:” option. The RESTful service will start after you click on the OK button. If you keep the enable option checked, the service will start as soon as the application starts. Once the application has started the default icon will be updated with the server icon with the green circle.

Security Notice

As of Ubiqua 2.0, for better security and user protection, the Remote Services functionality requires an administrator to authorize the use of the network port assigned to Ubiqua. You can authorize the port by running the following command with a privileged account:

netsh http add urlacl url=http://*:19501/ user=Everyone listen=yes

The parameter user may vary depending on the language in which your operating system is, for example in English as shown in the command above user=everyone, in Spanish and Portuguese user=todos, Swedish user=alla, German user=Jeder, French user="Tout le monde”, Dutch user=iedereen, Russian user=все.

If you are having problems connecting to the Remote Access Service, your Operating System may be blocking access to the configured port, refer to this link for more information.

If you want to secure the access, the service supports HTTP Basic Authentication. Just check the “Require authentication” box and provide a username and a password.

The service is still enabled if an error occurs and the status label will indicate the current status of the service.

The Options dialog and the option to enable the Remote Access service

Available Resources

The Remote Access Service provides 5 resources: /capture , /sniffers , /adapters /filters , /keys and /addresses . The /capture resource represents the current capture in Ubiqua, and it can be used to retrieve the current number of packets and a specific range of packets, to export the capture file to the local file system, or to clear all the packets. The /sniffers resource represents the sniffer devices currently attached and available in Ubiqua, it can be used to retrieve the list of all devices, the status of a specific device, and to start or stop a sniffer. The /adapters replace the sniffers, they support different functions both for their configuration and their use. The /filters resource represents the current filters in Ubiqua, and it can be used to retrieve the list of filters, to enable or disable a filter. The /keys resource represents the current security keys in Ubiqua, and it can be used to retrieve the list of security keys, and to insert a new security key. The /addresses resource represents the current addresses in Ubiqua, and it can be used to retrieve the list of addresses, and to insert a new relationship of long address and short address.

The schema document for this service responses is located at http://www.ubilogix.com/api/v1/services.xsd

Current Capture

GET /capture

Returns information about the current capture.

Request Parameters

Response Code 200 (OK)

An XML document with the information about the current capture.

Response Code 400 (Bad Request)

Sample Request

A GET request to the URL http://localhost:19501/capture?offset=10&limit=2 , produces a response with code 200, and the following document:

  xmlns="urn:ubilogix:services">  Count="48454" Offset="10" Limit="2">  Id="11"> Beacon File Normal 008038AA1A0000FFCF80000022841111111111111111FFFFFF00FFFF   Id="12"> Beacon Request File Normal 03087DFFFFFFFF07FFFF    

PUT /capture

Performs the specified action on the current capture.

Request Parameters