Changeset 1196


Ignore:
Timestamp:
Mar 9, 2022 3:37:24 PM (9 months ago)
Author:
ilavsky
Message:

Change api for tiles interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/User Procedures/Indra 2/IN3_BlueSkyReader.ipf

    r1195 r1196  
    1313
    1414//server address.
    15 strconstant ServerAddress="http://usaxscontrol:8000"
     15//strconstant ServerAddress="http://usaxscontrol:8000"
     16strconstant ServerAddress="http://wow.xray.aps.anl.gov:8010"
    1617
    1718//some notes. See end of thsi file for how to talk to the server instructions
     
    5455        //get server info
    5556        //1. check how many catalogs we have on this is bluesky server
    56         string TempAddress = ServerAddress+"/node/search/?fields=&sort="
     57        string TempAddress = ServerAddress+"/api/node/search/?fields=&sort="
    5758        variable jsonid, i
    5859        string TempJSONAdd, tempStr
     
    8081        JSONXOP_Release jsonId
    8182        //overwrite, fails on old catalog:
    82         ListOfCatalogs=stringfromList(0,AllCatalogs)
     83        //ListOfCatalogs=stringfromList(0,AllCatalogs)
     84        ListOfCatalogs=stringfromList(0,grepList(AllCatalogs,"9idc_usaxs"))
    8385
    8486//      //check these are BlueSKy Catalogs
     
    371373        //http://usaxscontrol:8000/node/full/9idc_usaxs/16248ab5-1359-4242-8ec9-6fd66f8b5976/primary/data?format=json
    372374       
    373         string TempAddress = ServerAddress+"/node/full/"+StringFromList(0, ListOfCatalogs)+"/"
     375        string TempAddress = ServerAddress+"/api/node/full/"+StringFromList(0, ListOfCatalogs)+"/"
    374376        TempAddress +=IDwave[selRow]+"/primary/data?format=json"
    375377        //print TempAddress
     
    482484        variable startTimeSec= date2secs((StartYear), (StartMonth), (StartDay)) - 2082844800    //convert to Python time
    483485        variable endTimeSec = startTimeSec + NumOfHours*60*60
    484         string TempAddress = ServerAddress+"/node/search/"
     486        string TempAddress = ServerAddress+"/api/node/search/"
    485487        string StartTimeStr, EndTimeStr
    486488        sprintf StartTimeStr, "%.15g" ,startTimeSec
     
    491493        //TempAddress +=StringFromList(0, ListOfCatalogs)+"?page[offset]=00&page[limit]=1000&filter[time_range][condition][since]="+num2str(startTimeSec, "%.15g")+"&filter[time_range][condition][until]="+num2str(endTimeSec, "%.15g")+"&sort=time"
    492494        // default pagse limit is 100 -  page[offset]=0&page[limit]=1000 loads first 1000 scans.
     495        print TempAddress
    493496        URLRequest/Z url=TempAddress
    494497        if(V_Flag!=0)
Note: See TracChangeset for help on using the changeset viewer.