TIBCO Spotfire Statistics Services Users Guide

Write requests using the URL API

You can use the URL API to send administration, expression, or function requests to the server. Use the URL API for testing the health of the server, rather than for creating web-based applications. This section describes sending requests via the URL API.

The URL API is most useful for such tasks as checking server health, retrieving version information, or checking job status. It does not support sending or receiving binary objects.

The URL API accesses five services. The functions you can use to access these services are described in detail, with examples, in the URL API help, available from your server’s landing page http://servername:port/<service_name>. (Ask your server administrator if you are not sure of the exact URL.)

Important: By default, certain Spotfire Statistics Services capabilities are disabled. If you have functions that you created or used in a previous release, you might find that they no longer work as expected. Additionally, any expression that TERR determines to be potentially malicious is disabled. Below is a non-exhaustive example of some of the capabilities disabled by default in Spotfire Statistics Services.
  • Sending TERR expressions that perform I/O to the file system or the internet.
  • Spawning new OS processes by calling the system function.
  • Calling into Java using the terrJava package, or using functions in the parallel package.
  • Loading new packages, except for those included with TERR.
  • Calling .C or .Fortran.
  • Send expressions to the server using the Expression Service.
  • Calling ExtendedServerInfo or sending other expressions that read from, or write to, your server.
  • Sending potentially malicious expressions to the server using the URL API.
Additionally, the Function Service can execute only one function, which allows a connection from Spotfire. If you have functions that you want to have enabled on Spotfire Statistics Services, or if you have additional questions about the configuration settings that control these capabilities, see your server administrator.
Table 1. URL API services
Service Description
Administration service Contains a subset of functions found in the Java and C# APIs. This service is meant to be used for simple server administration. Includes functions to get information about the server, a list of jobs, or specific job details. Users can also use the URL API to interrupt jobs in the queue or to delete existing jobs.
Expression service Contains two functions:eval, which sends an expression to the server to evaluate; andgetJobDetails, which retrieves the details about a specific job. (This function is deprecated; use the jobs function instead.)
Note: By default, the Expression Service is not enabled. See your server administrator for more information.
Function service Contains two functions: function, which sends the call to a function on the server to evaluate; and getJobDetails, which retrieves the details about a specific job. (This function is deprecated; use the jobs function instead.)
Note: The function service can handle only strings and numbers as arguments.
Authentication service Contains one function, validateUserCredentials, for checking whether the current user is authorized to use the server.
Public service Contains functions for discovering information about the server, including server configuration and version information, and whether it has authentication turned on. You can also use a Public service API to check job status for one or all jobs

Also included in the URL API is the function jobs, which, when combined with various resources, can provide information about jobs on the server.