Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CURL is commonly available on a default install of many UNIX/Linux platforms. Try typing curl in your favorite shell to see if it is installed and in your PATH. If you don't have the tool installed, visit the download page on the CURL website to obtain the official source or a user-contributed binary package: http://curl.haxx.se/download.html

Note that the command-line tool uses the libcurl library, which may be offered as a separate download package, so, if you're not compiling from the source, be sure to download a binary package instead of a libcurl package. The SSL-enabled packages are required to use the ECaccess Web Services.

...

You need to ensure the following environment variables are set with the correct values:

...

Code Block
languagebash
> export ECACCESS_URLV2="https://ecaccess.ecmwf.int/ecaccess/v2"

...

> export ECACCESS_OPTS="-

...

w \ncode=%{http_code}\

...

n -

...

3 -k"

...

If you are using the RMDCN network to access ECMWF then please use msaccess.ecmwf.int instead of ecaccess.ecmwf.int. The curl options used are the following:

...

If you don't want or can't setup these environment parameters then just replace $ECACCESS_URLV2 and $ECACCESS_OPTS by their contents in the rest of the document.

...

For each ECaccess Service available an example is given in the rest of this document with the CURL syntax to use, the list of parameters and the expected output.

Most of the services will return a JSON message. JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.

Each JSON message should include a field "success" set to "yes". If an error occurs then this field is set to "no" and an "error" field gives the error message returned by the service.

For more informations concerning JSON see http://www.json.org/

There are a few occasions when an error will not be indicated via a JSON message but with an http error code (e.g. when a binary stream is expected rather than a message):

401 Unauthorizedauthentication error when trying to download a new certificate
400 Bad requesterror when downloading a data file or job output/input file.
403 Forbiddenacces is only allowed through a secure connection (https).
412 Precondition failedmissing mandatory URL parameter or unknown JSON parameter.
404 Not Foundthe requested service does not exists.

On a successful request the http status code returned by the server is the following:

...

{
  "success" : "yes"
}
code=200

All Parameters The table below lists all parameters for the ECtrans Association are listed in table 10. Table 10: Parameters for the ECtrans Association. For additional information please see the ecaccess-association-put manpage.

...

{
  "jobId" : "2368129",
  "success" : "yes"
}
code=200

All The table below lists all Job Request parameters are listed in table 11. Table 11: Parameters for a Job Request. For additional information please see the ecaccess-job-submit manpage.

...