VO-Paris Data Centre

Observatoire de Paris

SsoDNet Resolver REST API v1

February 21, 2017. Please note that this service has been deprecated and should no longer be used. The first version of SsODNet Quaero REST API which improves this service and introduces some new features has been released. For a complete documentation please refer to:

This service will not be maintained after the 1st April 2017, please use the SsODNet Quaero REST API.

This API is intended to provide a fast search engine to seek and discover solar system object (Sso) names. The version 1.0 of the API does not provide the celestial coordinates of Sso (this functionnality will be added in version 2). Depending on the submitted text, it send back a list of Sso names and all the known aliases. This API is dedicated to set up a discovery or autocompletion mechanism of Sso names into Web forms and applications connected to Internet.

Search

Description
Returns metadata for all solar system objects matching a specified query.
This operation is case and accent insensitive.
URL Structure
http://voparis-registry.obspm.fr/ssodnet/1/search
Method
GET
URL Parameters
Success Response
  • Code: 200 OK / Content: see here
  • Code: 204 No Content
Error Response
  • Code: 400 Bad Request
  • Code: 405 Method Not Allowed
  • Code: 500 Server error
Returns
JSON-formatted list of metadata for any solar system objects. More information on the returned metadata fields are available here.
{
   "count": 2,
   "hits": [
      {
         "type": "Asteroid",
         "name": "Io",
         "aliases": [
            "85",
            "1899 LA",
            "1899 UA"
         ]
      },
      {
         "type": "Natural satellite",
         "name": "Io",
         "aliases": [
            "501",
            "j-1",
            "j-i"
         ]
      }
   ],
   "total": 2
}
Return metadata definitions
  • count The number of sso returned.
  • total The number of sso matching the query.
  • hits The list of metadata for each sso returned.

/autocomplete

Description
Returns metadata for the 10 first solar system objects matching a specified query.
This operation is case and accent insensitive. It is intended to be used in an autocomplete search box.
URL Structure
http://voparis-registry.obspm.fr/ssodnet/1/autocomplete
Method
GET
URL Parameters
  • q required URL-encoded string.
  • limit The maximum number of objects to return. Default to 10.
  • highlight To perform highlighting by wrapping matching fragments in <em> and </em>. Default to False
Success Response
  • Code: 200 OK / Content: see here
Error Response
  • Code: 400 Bad Request
  • Code: 405 Method Not Allowed
  • Code: 500 Server error
Returns
JSON-formatted list of metadata for any solar system objects. More information on the returned metadata fields are available here.
{
   "count": 6,
   "hits": [
      {
         "type": "Natural satellite",
         "name": "Io",
         "aliases": [
            "501",
            "j-1",
            "j-i"
         ]
      },
      {...},
      ...
   ],
   "total": 6
}
Code sample
<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <title>Demo SsoDNet Resolver</title>
      <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
      <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
      <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
      <script>
         $(function() {
            $('#ssosearch').autocomplete({
               source: function(request, response) {
                  $.ajax({
                     url: "http://voparis-registry.obspm.fr/ssodnet/1/autocomplete",
                     type: "GET",
                     data: 'q="' + request.term + '"',
                     dataType: "json",
                     success: function(data, status, xhr) {
                        response($.map(data.hits, function(item) {
                           return {
                              name: item['name'],
                              type: item['type'],
                              aliases: item['aliases'],
                              label: item['name'],
                              value: item['name']
                           }
                        }));
                     }
                  });
               },
               minLength: 2
            });
         });
      </script>
   </head>
   <body>
      <input id="ssosearch"/>
   </body>
</html>