API for Data Access Services (v0 - Archived)

Reference document for LSST data products:

General comments about URI structure

General information about output:

Unclassified:

Open questions, comments, concerns:

Related pages/ticket(s):


#APIFull DescriptionOptional ParametersReturned JSON structureExamples of Returned Result

GET /List services.


Array of strings["db", "image", "meta"]

Metadata Service (metaserv) API
M1GET /metaList API versions for "meta".


Array of strings["v0", "v1"]
M2GET /meta/v0List types served for v0 of "meta" API.


Array of strings


{
  "result": ['db']
}


M3GET /meta/v0/dbList levels of databases.


Array of strings["dc", "L1", "L2", "L3", "dev"]
M4GET /meta/v0/db/L1?containing=%Stripe82%List databases available for a given level, containing substring "Stripe82"
  • start=0
  • count=1000
  • containing (show only names containing a given substring / regexp)
Array of strings

for L1: ["live", "userDB"]

for L2: ["DR1", "DR2"]

for L3: ["joe_myDb", "bill_test1", "mike_scratch56"]

M5GET /meta/v0/db/L3/joe_myDbRetrieve information about L3 database "joe_myDb"


Array containing 2 dictionaries. Keys for 1st:

  • name
  • owner
  • connectionHost
  • connectionPort

Keys for 2nd:

  • key-value pairs representing user annotations
[{"name":"joe_myDb", "owner": "joe", host: "lsst10", "port": "3360"}, {}]
M6GET /meta/v0/db/L2/DC_W13_Stripe82/tablesList tables for L2 database "DC_W13_Stripe82"
  • containing (show only names containing given keyword)
Array of strings

Example of results (truncated for formatting)

{
  "results": [
    [
      "AvgForcedPhot"
    ],
    [
      "AvgForcedPhotYearly"
    ],
    [
      "DeepCoadd"
    ],
    [
      "DeepCoadd_Metadata"
    ],
    [...]
  ]
}


M7GET /meta/v0/db/L3/joe_myDb/tables/ObjectRetrieve information about table "Object" in L3 database "joe_myDb"


Array of two dictionariers. Keys for 1st:

  • name
  • description

Keys for 2nd:

  • key-value pairs representing user annotations
[{"name": "Object", "descr": "this is my object table"}, {}]
M8GET

/meta/v0/db/L2/DC_W13_Stripe82/tables/Science_Ccd_Exposure/schema

Retrieve schema for table "Object" in database "Science_Ccd_Exposure".


String containing output from "SHOW CREATE TABLE"

Truncated for formatting:

{
  "result": [
    "Science_Ccd_Exposure",
    "CREATE TABLE `Science_Ccd_Exposure` (\n `scienceCcdExposureId` bigint(20) NOT NULL,\n `run` int(11) NOT NULL,\n ... PRIMARY KEY (`scienceCcdExposureId`),\n ...) ENGINE=MyISAM DEFAULT CHARSET=latin1"
  ]
}


M9GET /meta/v0/imageList levels of images.


Array of strings["DC", "L1", "L2", "L3", "dev"]
M10GET /meta/v0/image/L1List image collections available in a given <level>
Array of strings["DR1", "DR2", "ktl/test20150202"]
M11GET/meta/v0/image/L2/DR1List image kinds available in a given collection
Array of strings["raw", "fpCoadd", "deepCoadd", "diffIm", "template", "calExp"]
M12GET /meta/v0/image/L2/DR1/coadd?start=200&count=100List coadd images (200-300) for L2 DR1
  • start=0
  • count=1000
  • owner
  • createAfter
  • createBefore
  • more TBD
Array of strings["url/of/im1", "url/of/im2"]
M13GET /meta/v0/image/L2/DR1/coadd/12345Retrieve information about a coadd image identified by imageId = 12345


Dictionary. Keys:

  • url
  • owner
  • more TBD


{"url": "url/of/img", "owner": "tom"}

Database Query (dbserv) API
DB1GET /db/v0/tap<Nothing>


DB2POST** /db/v0/tap/sync?query=SELECT+id,ra,decl+
FROM+myDb.Object+WHERE+flux=3.2
Run a given query on L2 DR1 database
  • sql

2 rows from "select deepForcedSourceId,scienceCcdExposureId" would look like:

{
  "result": {
    "metadata": {
      "elements": [
        {
          "datatype": "long",
          "name": "deepForcedSourceId"
        },
        {
          "datatype": "long",
          "name": "scienceCcdExposureId"
        }
      ]
    },
    "table": {
      "data": [
        [
          8404051561545729,
          125230127
        ],[
          8404051561545730,
          125230127
        ]
      ]
    }
  }
}


DB3
tbd, see
Retrieve query type for a given query



Image Query (imgserv) API (see also Image Service and Image Cutout Details)
I1GET /image/v0/<nothing>




I2GET /image/v0/654/explainReturn cost estimate of asynchronous query identified by a resourceId (returned through "POST /image/...")


String (for now)TBD
I3GET /image/v0/654/statusRetrieve status of asynchronous request identified by a given resourceId (returned through "POST /image/...")


Dictionary. Keys:

  • status
  • startTime
  • progress
[{"status": "running", "startTime: "2015/05/14 016:43:21", "progress": "34%"}]
I4GET /image/v0/654/resultsRetrieve results of asynchronous request identified by a given resourceId (returned through "POST /image/...")


Array of strings

["/nfs/lsst/L3/jack/scratch/img1", "/nfs/lsst/L3/jack/scratch/img2", "/nfs/lsst/L3/jack/scratch/img3"]

I5GET** /image/v0/L2/DR7/coaddRetrieve all coadd images for L2 DR7
  • start=0
  • count=1000
  • plane (supported: data, mask, variance)
Array of strings["/nfs/lsst/L2/coadds/coad001", "/nfs/lsst/L2/coadds/coad002", "/nfs/lsst/L2/coadds/coad003", "/nfs/lsst/L2/coadds/coad004"]
I6GET** /image/v0/L2/DR1/coadd/12345?plane=maskRetrieve "mask" plane of a full "coadd" image from L2 DR1, identified by imageId = 12345
  • plane (supported: data, mask, variance)
Image
I7GET /image/v0/L2/DR1/coadd/12345?plane=data
GET /image/v0/L2/DR1/coadd/12345?plane=mask
Retrieve a multi-extension FITS file containing coadd identified by imageId = 12345, and the corresponding mask.
  • plane (supported: data, mask, variance)
Image
I8GET** /image/v0/L2/DR1/coadd/12345/cutout?x=1&y=2&width=30&height=30Retrieve a cutout of a "coadd" image identified by imageId = 12345. The cutout area: 30x30 pixels centered around (1,2)
  • plane (supported: data, mask, variance)
Image
I9GET** /image/v0/L2/DR1/calexp/12345/cutout?x1=1&y1=1&x2=2&y2=2Retrieve a cutout of an image identified by imageId. Corners of the cutout: (1,1), (2,2)
  • plane (supported: data, mask, variance)
Image
I10GET** /image/v0/L2/DR1/calexp/12345/cutout?plane=data&ra=1&dec=1&deltaRa=2&deltaDec=2Retrieve "data" plane of a cutout of an image identified by imageId centered around (ra,dec) = (1,1) with a box size 2x2 arcmin.
  • plane (supported: data, mask, variance)
Image
I11GET /image/v0/L2/DR1/calexp/12345/cutout?ra=1&dec=1&widthAng=10&heightAng=10 Retrieve a cutout of a "calexp" image identified by imageid=12345. The heightAng and widthAng are in arc seconds.
  • Natural 3-plane results
Image
I12GET /image/v0/L2/DR1/calexp/12345/cutout?ra=1&dec=1&widthPix=30&heightPix=30Retrieve a cutout of a "calexp" image identified by imageid=12345. The heightPix and widthPix are in pixels.
  • Natural 3-plane results
Image