Logo IMCCE-VOParis

THE IMCCE VIRTUAL OBSERVATORY
SOLAR SYSTEM PORTAL
Observatoire de Paris / CNRS

Logo IMCCE
Portal Home Page | Report issue | Legal notice | Contact us

The Virtual Observatory Sky Body Tracker

.: skybotstatus :.

.: Purpose

This method is intended to people who need to know the actual status of the SkyBoT database.

.: HTTP Request

If you are a software/solutions developer, you might want to include the Skybot Status service into your application. This can be done by using the the Web service method or by using the following HTTP request:
http://vo.imcce.fr/webservices/skybot/skybotstatus_query.php?[parameters]
where [parameters] is a list of parameters separated by the character &. The allowed parameters are:
ParameterDefinitionValues
-mime=<string> Mime type of the results votable | html | text
-ep=<dateTime> Epoch for which the status is requested (optional) all | now | Y-m-d [h:m:s]
-from=<string> Word which definite the name of the caller application, or which describes the request (optional) any short string (without space)

The output is described in the following table and is available in VOTable, HTML or plain text format (cf. examples). The -mime parameter is optionnal and its value can be omitted (just write nothing or &-mime= without value). In this case, the output is displayed in VOTable. The parameter -ep is also optionnal (just write nothing or &-ep= without value). If omitted, the actual status of the SkyBoT database is given for all periods of time.

.: Web service

The SkyBoT Web service provides methods based on SOAP and HTTP POST verb which allow one to interact between its own application and the SkyBoT services. Here is the useful information to invoke the skybotstatus method:
Web Service URI:
http://vo.imcce.fr/webservices/skybot/skybot.php
Namespace:
http://vo.imcce.fr/webservices/skybot
WSDL:
http://vo.imcce.fr/webservices/skybot/skybot.php?wsdl
SOAP header:
name of the SOAP header element: 'clientID'
SOAP header's content: array('from' => 'YourName', 'hostip'=>'')
Method:
skybotstatus  (mime, epoch)
- The input parameters of the method are a string which provides the format of the output, and a dateTime which limits the request for the period of time matched by the given epoch. Just leave this parameter empty to request the actual status for all periods of time spanned by the database.
VariableTypeUnitsLimits or valuesDefaultComment
mime string - votable | html | text votable Mime type of the results
epoch dateTime - empty | Y-m-d [h:m:s] empty Epoch for which the status is requested (optional)
- The output parameters of the method is a string which contains the following information:
No.DefinitionValue
1 Status of the database 'ok', 'update in progress', 'check in progress', 'unavailable'
2 Starting date of the time span covered by the database julian day
3 Ending date of the time span covered by the database julian day
4 Number of asteroids in the database -
5 Number of planets in the database -
6 Number of natural satellites in the database -
7 Number of comets in the database -
8 Date of the last update dateTime (ISO format)
- Depending on the selected mime type, the output is formatted as:
votable
the data are written in the IVOA standard VOTable format
html
the data are transformed in a HTML document using a XSLT processing (SkyBoT XSL style sheet)
text
the data are returned in plain text where each value is separated by the pipe '|' character
MessageDescription
'ok' means that all the database is up to date and fully available
'update in progress' means that the database is in the process of update (*)
'check in progress' means that the database is in the process of check (*)
'unavailable' means that the database is down and the services not available
(*) In this case, you can access the database but a waiting time or a SQL error (e.g. a table is crashed) may occur.
- Examples: click on the following links to get the status of the database with:
mime=text
mime=html
mime=votable

.: How to consume:

In order to help you to invoke the SkyBoT web services, we provide some clients written in differents languages. Here are some detailed explanations to see how to write a client with PHP and SOAP which invokes the skybotstatus method:

1/ Provide the input parameters which are mandatory for the service:

// Client's ID: provide the name of your project or organisation or yourself
$from = 'MyName';
// Input parameters (votable or html or text)
$param = array('mime' => "html");

2/ Define the SOAP options, the namespace and the WSDL URI of SkyBoT web service:

// Enables or disables the WSDL caching feature
ini_set('soap.wsdl_cache_enabled', 1);
// SOAP version
$soapVersion = 'SOAP_1_2';
// SkyBoT namespace
$namespace = 'http://vo.imcce.fr/webservices/skybot';
// SkyBoT WSDL
$uriwsdl = $namespace.'/skybot.wsdl';

3/ Create a SoapClient object in WSDL mode, set the SOAP header, then call the method and catch exceptions:

try
{
  // Constructs the client
  $client = new SoapClient($uriwsdl, array('exceptions'=>1, 'soap_version'=>$soapVersion));
  // SOAP header
  $header = array('from'=>$from, 'hostip'=>'');
  $client->__setSoapHeaders(array(new SOAPHeader($namespace, 'clientID', $header)));
  // Call the resolver method
  $response = $client->__soapCall('skybotstatus', $param);
  // Display the results
  if ($param['mime'] == 'text')
  {
    header("Content-Type: text/plain");
    $res = explode(';', $response);
    $nbr = count($res);
    $key = array_keys($res);
    for ($i=0; $i<$nbr; $i++) { echo $res[$key[$i]],"\n"; };
  }
  else
  {
    header("Content-Type: text/xml");
    echo $response."\n";
  }
}
catch (SoapFault $fault)
{
  trigger_error("SOAP Fault: {$fault->getTraceAsString()} (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}