How to Use Metadata Compliance Checker (MCC) API

How to Use Metadata Compliance Checker (MCC) API

Postby yiboj » Mon Mar 06, 2017 3:54 pm

In addition to the web frontend, there is a queryable API frontend that you can use to perform validation.

It returns a JSON response that is identical to the data that's used to generate the HTML templates. PDF and HTML responses are also available.

Both GET (for remote URLs) and POST (for local file uploads) requests can be used.

* GET query (from remote host)







ParameterDetailsPossible Values
checkersMust specify at least one test. Multiple tests are delimited by commas.
ACDD-x.x (specify version)
CF
GDS2 -- also requires
GDS2-parameters:level Available levels are L2P, L3, and L4.
url-uploadA valid url to a netCDF file; maximum 5.00 GB
responseSpecify html, json, or pdf result output.html, json, pdf -- default is json.


GET Examples
Code: Select all
$ curl 'http://podaac-uat.jpl.nasa.gov/mcc/check?checkers=GDS2&GDS2-parameters:L4,CF&url-upload=https://github.com/ioos/compliance-checker/raw/master/compliance_checker/tests/data/2dim-grid.nc&response=pdf'

$ curl 'http://podaac-uat.jpl.nasa.gov/mcc/check?checkers=acdd-1.1&url-upload=https://github.com/ioos/compliance-checker/raw/master/compliance_checker/tests/data/2dim-grid.nc&response=json'



* POST query (for local file)


















ParameterDetailsPossible Values
ACDD'ACDD-version' tag must also be present.must be set to 'on'
ACDD-versionACDD tag must also be present.1.1, 1.3
CFmust be set to 'on'
GDS2'GDS2-parameter' tag must also be presentmust be set to 'on'
GDS2-parameter'GDS2' tag must also be presentL2P, L3, L4
file-uploada valid netCDF file; maximum 5.00 GBlocation of file
responseSpecify html, json, or pdf result output.html, json, pdf -- default is json.


POST Examples

Note that you need to append an '@' to the beginning of the filename in the CURL request.
Code: Select all
$ curl -F ACDD=on -F ACDD-version=1.3 -F file-upload=@granule.nc -F response=json http://podaac-uat.jpl.nasa.gov/mcc/check

$ curl -F GDS2=on -F GDS2-parameters=L4 -F file-upload=@/home/user/granule.nc -F response=pdf http://podaac-uat.jpl.nasa.gov/mcc/check



Please refer to the API document (https://podaac-uat.jpl.nasa.gov/mcc/about_api) for details.
yiboj
 
Posts: 130
Joined: Mon Mar 30, 2015 11:22 am

Return to Data Access and Services