CERN

Filling Scheme Web-service

LPC home

LPC: 79977

Documentation of the Filling Scheme web-service

In order to retrieve the filling scheme in csv format for a given fill a simple web service has been implemented. This service can be used by scripts to retrieve the filling scheme for any given fill which reached the "Stable Beams" conditions.

The URL for the service is:


    https://lpc.web.cern.ch/lpc/cgi-bin/schemeInfo.py?fill={fillnumber}&fmt={format}
    
    with
    
    fillnumber: the fillnumber for which the filling scheme should be retrieved
fmt: either "download" or "json"

If you choose "download" as a format, the csv file with the filling scheme will be downloaded to your computer. Exactly one "fill" parameter must be present in the URL. In case the filling scheme for the given fill number is not found on the server a small json document with an error message is returned.

If you choose "json" as a format the filling scheme will be embedded in a json object. In this case at least one (but possibly more than one) fill parameter must be present in the URL. The format of the json documents is illustrated in the following example:

      {
         "error" : "some error message",    # only present in case of errors
         "fills" : { 
                      "4444" : {              # the requested fill number
                                 "name" : "filling scheme name",
                                 "csv"  : "contents of the csv file" 
                               }
                    }
      }

    

As an example you can try out the following links:

Download example:

      https://lpc.web.cern.ch/cgi-bin/schemeInfo.py?fill=4444&fmt=download
    

Json example to retrieve the schemes of 2 fills:

      https://lpc.web.cern.ch/cgi-bin/schemeInfo.py?fill=4851&fill=4874&fmt=json