katilp / sandbox

My trials
0 stars 0 forks source link

Notes: API for get the file list from the portal #36

Open katilp opened 4 years ago

katilp commented 4 years ago

The CERN Open Data command-line client (cernopendata-client) is now available on LXPLUS.

(1) Login to LXPLUS and activate the client:

$ ssh lxplus.cern.ch $ source ~simko/public/cernopendata/bin/activate or $ source ~simko/public/cernopendata/bin/activate.csh

(2) Check whether it works for you:

$ cernopendata-client --help

(3) Example: listing all index files for a collision dataset:

$ cernopendata-client get-file-locations --recid 1 --no-expand

The same in the HTTP protocol format:

$ cernopendata-client get-file-locations --recid 1 --no-expand --protocol http

(4) Example: listing all individual data file locations for a collision dataset:

$ cernopendata-client get-file-locations --recid 1

The same in the HTTP protocol format:

$ cernopendata-client get-file-locations --recid 1 --protocol http