Difference between revisions of "CMEMS Importer Service"

From Gcube Wiki
Jump to: navigation, search
(Created page with "=Overview= =Usage= ==REST API== ===Discover the service=== The service is registered in the Information System with the following coordinates: Group: DataAnalysis Name:...")
 
(List Products)
Line 41: Line 41:
 
   </product>
 
   </product>
 
</cmemsProducts>
 
</cmemsProducts>
 +
</source>
 +
 +
===Get a Single Product===
 +
 +
Request:
 +
<source lang="java">
 +
GET /api/cmems/products/{productName}
 +
</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'
 +
</source>
 +
 +
Sample output:
 +
<source lang="xml">
 +
<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>
 
</source>
 
</source>

Revision as of 13:23, 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>