Code example explaining how to use Spotfire Statistics Services Administration Client C# API.
Overview
You can use the Administration Client API for the following job management tasks:
- Locating jobs on the server.
- Retrieving a job stored on the server.
- Requesting the path to the directory where a job's input files will be stored.
- Interrupting a job run before it is completed.
- Removing a job from the server.
- Examining the status of a job.
Example
The following example retrieves a list of jobs that are stored on the server.
- Set the path to the server:
string serviceUrl = "http://localhost:8080/SplusServer";
string username = "myusername";
string password = "mypassword";
- Create the
AdministrationClient object:
IAdministrationClient api = ClientFactory.GetAdministrationClient(serviceUrl, username, password);
- Send the request:
SplusJobs jobs = api.GetJobs();
- Receive returned jobs:
foreach (SplusDataResult job in jobs.Jobs)
{
Console.WriteLine("Job #" + job.JobId + " Status: " + job.Status);
}
See also: