Difference between revisions of "CMEMS Importer Service"

From Gcube Wiki
Jump to: navigation, search
(List Products)
(Get a Single Product)
Line 66: Line 66:
 
   ...
 
   ...
 
</product>
 
</product>
 +
</source>
 +
 +
===List Datasets available under the Subsetter protocol===
 +
 +
Request:
 +
<source lang="java">
 +
GET /api/cmems/products/{productName}/datasets/tds
 +
</source>
 +
 +
With curl:
 +
<source lang="php">
 +
$ curl --header "gcube-token: **********" --request GET 'http://<hostname>/cmems-importer-service/rest/cmems/products/GLOBAL_ANALYSIS_FORECAST_PHY_001_024/datasets/tds'
 +
</source>
 +
 +
Sample output:
 +
<source lang="xml">
 +
  <cmemsDatasets>
 +
    <dataset>
 +
      <name>global-analysis-forecast-phy-001-024</name>
 +
      <protocol>TDS</protocol>
 +
      <url>
 +
        http://nrtcmems.mercator-ocean.fr/motu-web/Motu?action=describeproduct&service=GLOBAL_ANALYSIS_FORECAST_PHY_001_024-TDS&product=global-analysis-forecast-phy-001-024
 +
      </url>
 +
    </dataset>
 +
    <dataset>
 +
      ...
 +
    <dataset>
 +
  </cmemsDatasets>
 +
 +
</source>
 +
 +
===OP===
 +
 +
Request:
 +
<source lang="java">
 +
GET /api/
 +
</source>
 +
 +
URL parameters:
 +
* '''v''': desc here
 +
 +
With curl:
 +
<source lang="php">
 +
</source>
 +
 +
Sample output:
 +
<source lang="xml">
 
</source>
 
</source>

Revision as of 13:31, 22 January 2018

Overview

Usage

REST API

Discover the service

The service is registered in the Information System with the following coordinates:

Group: DataAnalysis

Name: cmems-importer-service

List Products

Request:

GET /api/cmems/products

With curl:

$ curl --header "gcube-token: **********" --request GET 'http://<hostname>/cmems-importer-service/rest/cmems/products'

Sample output:

<cmemsProducts>
  <product>
    <abstract>...</abstract>
    <allKeywords>
      numerical-model, salinity, sea-ice, sea-level, currents, temperature, forecast, near-real-time, global-ocean
    </allKeywords>
    <coordRefSys>WGS 84 (EPSG 4326)</coordRefSys>
    <creationDate>2016-10-14T00:00:00Z</creationDate>
    ...
  </product>
  <product>
    ...
  </product>
</cmemsProducts>

Get a Single Product

Request:

GET /api/cmems/products/{productName}

With curl:

$ curl --header "gcube-token: **********" --request GET 'http://<hostname>/cmems-importer-service/rest/cmems/products/GLOBAL_ANALYSIS_FORECAST_PHY_001_024'

Sample output:

<product>
  <abstract>...</abstract>
  <allKeywords>
    numerical-model, salinity, sea-ice, sea-level, currents, temperature, forecast, near-real-time, global-ocean
  </allKeywords>
  <coordRefSys>WGS 84 (EPSG 4326)</coordRefSys>
  <creationDate>2016-10-14T00:00:00Z</creationDate>
  ...
</product>

List Datasets available under the Subsetter protocol

Request:

GET /api/cmems/products/{productName}/datasets/tds

With curl:

$ curl --header "gcube-token: **********" --request GET 'http://<hostname>/cmems-importer-service/rest/cmems/products/GLOBAL_ANALYSIS_FORECAST_PHY_001_024/datasets/tds'

Sample output:

  <cmemsDatasets>
    <dataset>
      <name>global-analysis-forecast-phy-001-024</name>
      <protocol>TDS</protocol>
      <url>
        http://nrtcmems.mercator-ocean.fr/motu-web/Motu?action=describeproduct&service=GLOBAL_ANALYSIS_FORECAST_PHY_001_024-TDS&product=global-analysis-forecast-phy-001-024
      </url>
    </dataset>
    <dataset>
      ...
    <dataset>
  </cmemsDatasets>

OP

Request:

GET /api/

URL parameters:

  • v: desc here

With curl:

 

Sample output: