skorper opened a new pull request, #261:
URL: https://github.com/apache/incubator-sdap-nexus/pull/261

   _NOTE: This is branched off SDAP-455. Once that is merged, we can point this 
PR to the master branch._
   
   Add pagination to the `/cdmsresults` endpoint. The new query params are:
   
   - `pageNum`: starts at 1, optional, default is 1
   - `pageSize`: optional, default is 1000
   
   This PR contains the following updates:
   
   - Added new query params (see above) to `/cdmsresults` endpoint
   - Added query params to all 3 output formats
   - Updated openapi spec with new params
   
   ---
   
   ## JSON Example:
   
   ```bash
   /cdmsresults?id=6e7606e3-d7f2-4952-922c-e4d31019cd42&output=JSON
   ```
   
   ```json
   {
       "executionId": "6e7606e3-d7f2-4952-922c-e4d31019cd42",
       "data": [    ],
       "params": {
           "primary": "MUR25-JPL-L4-GLOB-v04.2",
           "matchup": "SAMOS",
           "startTime": 1515024000,
           "endTime": 1515110399,
           "bbox": "-120,30,-110,40",
           "timeTolerance": 86400,
           "radiusTolerance": 50000.0,
           "platforms": "30",
           "parameter": null,
           "depthMin": -35.0,
           "depthMax": 10.0
       },
       "bounds": {},
       "count": 8,
       "details": {
           "timeToComplete": 126,
           "numSecondaryMatched": 24,
           "numPrimaryMatched": 8,
           "pageNum": 1,
           "pageSize": 1000
       }
   }
   ```
   
   ## CSV Example:
   
   ```bash
   /cdmsresults?id=6e7606e3-d7f2-4952-922c-e4d31019cd42&output=CSV
   ```
   
   ```
   product_version,1.0
   Conventions,"CF-1.6, ACDD-1.3"
   title,CDMS satellite-insitu machup output file
   history,"Processing_Version = V1.0, Software_Name = CDMS, Software_Version = 
1.1.0a3"
   institution,"JPL, FSU, NCAR, Saildrone"
   source,doms.jpl.nasa.gov
   standard_name_vocabulary,"CF Standard Name Table v27, BODC controlled 
vocabulary"
   cdm_data_type,"trajectory, station, point, swath, grid"
   processing_level,4
   project,Cloud-based Data Matchup Service (CDMS)
   keywords_vocabulary,NASA Global Change Master Directory (GCMD) Science 
Keywords
   keywords,"SATELLITES, OCEAN PLATFORMS, SHIPS, BUOYS, MOORINGS, AUVS, ROV, 
NASA/JPL/PODAAC, FSU/COAPS, UCAR/NCAR, SALINITY, SEA SURFACE TEMPERATURE, 
SURFACE WINDS"
   creator_name,Cloud-Based Data Matchup Service (CDMS)
   creator_email,c...@jpl.nasa.gov
   creator_url,https://doms.jpl.nasa.gov/
   publisher_name,CDMS
   publisher_email,c...@jpl.nasa.gov
   publisher_url,https://doms.jpl.nasa.gov
   acknowledgment,CDMS is a NASA/ACCESS funded project with prior support from 
NASA/AIST
   Platform,"orbiting satellite, 30"
   time_coverage_start,2018-01-04T00:00:00+0000
   time_coverage_end,2018-01-04T23:59:59+0000
   geospatial_lon_min,-120
   geospatial_lat_min,30
   geospatial_lon_max,-110
   geospatial_lat_max,40
   geospatial_lat_units,degrees_north
   geospatial_lon_units,degrees_east
   geospatial_vertical_min,-35.0
   geospatial_vertical_max,10.0
   geospatial_vertical_units,m
   geospatial_vertical_positive,down
   CDMS_matchID,6e7606e3-d7f2-4952-922c-e4d31019cd42
   CDMS_TimeWindow,24.0
   CDMS_TimeWindow_Units,hours
   CDMS_platforms,30
   CDMS_SearchRadius,50000.0
   CDMS_SearchRadius_Units,m
   CDMS_DatasetMetadata,
   CDMS_primary,MUR25-JPL-L4-GLOB-v04.2
   CDMS_secondary,"S,A,M,O,S"
   CDMS_ParameterPrimary,
   CDMS_time_to_complete,126
   CDMS_time_to_complete_units,seconds
   CDMS_num_secondary_matched,24
   CDMS_num_primary_matched,8
   date_modified,2023-06-28T21:47:58+0000
   date_created,2023-06-28T21:47:58+0000
   
URI_Matchup,https://doms.jpl.nasa.gov/domsresults?id=6e7606e3-d7f2-4952-922c-e4d31019cd42&output=CSV
   CDMS_page_num,1
   CDMS_page_size,1000
   ```
   
   ## NetCDF Example:
   
   ```bash
   /cdmsresults?id=6e7606e3-d7f2-4952-922c-e4d31019cd42&output=NETCDF
   ```
   
   ![Screenshot 2023-06-28 at 2 52 38 
PM](https://github.com/apache/incubator-sdap-nexus/assets/11022336/97ee6b78-9a03-4f7b-accc-fa91e9efb666)
   
   
   ---
   
   Example showing how the results are truncated to the number of points 
requested:
   
   ```bash
   /cdmsresults?id=6e7606e3-d7f2-4952-922c-e4d31019cd42&output=JSON&pageSize=1
   ```
   ```json
   {
       "executionId": "6e7606e3-d7f2-4952-922c-e4d31019cd42",
       "data": [],
       "params": {
           "primary": "MUR25-JPL-L4-GLOB-v04.2",
           "matchup": "SAMOS",
           "startTime": 1515024000,
           "endTime": 1515110399,
           "bbox": "-120,30,-110,40",
           "timeTolerance": 86400,
           "radiusTolerance": 50000.0,
           "platforms": "30",
           "parameter": null,
           "depthMin": -35.0,
           "depthMax": 10.0
       },
       "bounds": {},
       "count": 1,
       "details": {
           "timeToComplete": 126,
           "numSecondaryMatched": 24,
           "numPrimaryMatched": 8,
           "pageNum": 1,
           "pageSize": 1
       }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sdap.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to