...
CURL is commonly available on a default install of many UNIX/Linux platforms. Try typing curl in your favorite favourite 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
...
Code Block | ||
---|---|---|
| ||
> 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:
-w | display the http code on stdout (\ncode=%{http_code}\n) |
-k | disable certificate checking |
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.
...
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 information 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 Unauthorized | authentication error when trying to download a new certificate |
400 Bad request | error when downloading a data file or job output/input file. |
403 Forbidden |
access is only allowed through a secure connection (https). | |
412 Precondition failed | missing mandatory URL parameter or unknown JSON parameter. |
404 Not Found | the requested service does not exists. |
On a successful request the http status code returned by the server is the following:
200 OK | the request has |
produced a JSON message. |
If you get an HTML document then that could be a problem with a proxy. In this case the HTML message should give you an indication of what the problem is.
...
All your ECtrans Associations for a Gateway (e.g. the "ecaccess.ecmwf.int" Gateway) can be listed with
...
The table below lists all parameters for the ECtrans Association. For additional information please see the ecaccess-association-put manpage.
Type | Name | Comment |
String | name | |
Boolean | active | default FALSE |
String | comment | |
String | grantedUserList | multiple users separated by a ',' |
String | data | |
String | directory | |
String | hostName | |
String | login | |
String | password | |
String | protocol |
Protocols
To list all the ECtrans Protocols supported by a Gateway (e.g. ecaccess.ecmwf.int) command
> curl $ECACCESS_OPTS -H "Token: ahs4w294" "$ECACCESS_URLV2/protocols/ecaccess.ecmwf.int"
...
The ECaccess files are in the form [domain:][/user-id/]path. Please refer to section 5.4 to File Management for more information on the ECaccess File System. To download a source ecaccess file, e.g. c2a:/tmp/test.tar.gz), use
> curl $ECACCESS_OPTS -H "Token: ahs4w294" -o test.tar.gz \ "$ECACCESS_URLV2/file?source=c2a:/tmp/test.tar.gz&offset=0"
...
The table below lists all Job Request parameters. For additional information please see the ecaccess-job-submit manpage.
Type | Name | Comment |
String | scheduledDate | in the form 'yyyy-MM-dd HH:mm' |
String | userMailAddress | |
Boolean | sendMailOnStart | |
Boolean | sendMailOnSuccess | |
Boolean | sendMailOnFailure | |
Boolean | sendMailOnRetry | |
Boolean | containsDirectives | default TRUE |
String | queueName | default is ecgate |
String | name | |
String | transferGatewayName | default is current Gateway |
String | transferRemoteLocation | in the format association-name[@protocol] |
String | transferOutputFile | |
String | transferErrorFile | |
String | transferInputFile | |
Boolean | transferKeepInSpool | default FALSE |
String | eventIds | list separated by ';' or ',' |
Boolean | renewSubscription | default FALSE |
Boolean | errorToOutput | default FALSE |
String | manPageContent | |
Integer | lifeTime | in days |
Integer | retryCount | default 0 |
Integer | retryFrequency | in seconds |
String | inputFile | file on ECMWF file system |
To list all your ECaccess Jobs:
...
All parameters for the Event Request are listed in table 12. Table 12: Parameters for an Event Request. For additional information please see the ecaccess-event-create manpage.
Type | Name | Comment |
String | name | |
String | comment | |
Boolean | isPublic | default FALSE |
Boolean | overwrite | default FALSE |
String | title | |
String | metadata |
To grant an ECaccess Event (e.g. 807):
...
All parameters for the Grant Event Request are listed in table 13. Table 13: Parameters for a Grant Event Request. For additional information please see the ecaccess-event-grant manpage.
Type | Name | Comment |
Boolean | subscribe | default FALSE |
Boolean | notify | default FALSE |
String | userList | multiple users separated by a ',' |
To trigger an ECaccess Event (e.g. 807):
...
All parameters for the Send Event Request are listed in table 14. Table 14: Parameters for the Send Event Request. For additional information please see the ecaccess-event-send manpage.
Type | Name | Comment |
String | env | multiple variables separated by a ';' |
String | delay | specified in [w]eeks, [d]ays, [h]ours, [m]inutes or [s]econds (e.g. 1w or 2d) |
String | at | in the format 'yyyy-MM-dd HH:mm' |
Integer | seq |
To clear an ECaccess Event (e.g. 807):
...
All parameters for the ECtrans Request are listed in table 15. Table 15: Parameters for the ECtrans Request. For additional information please see the ecaccess-ectrans-request manpage.
Type | Name | Comment |
String | gatewayName | default current Gateway |
String | remoteLocation | in the format association-name[@protocol] |
String | sourceFileName | |
String | targetFileName | |
Integer | retryCount | |
Integer | retryFrequency | frequency of retries in seconds (default: 600 seconds) |
String | maximumDuration | e.g. 10m or 1h, <0 to deactivate (default 12h) |
String | minimumDuration | e.g. 30s or 10m, <0 to deactivate (default 10m) |
Long | minimumRate | bytes/s (default 10240) |
Integer | priority | |
String | lifeTime | in [w]eeks, [d]ays, [h]ours, [m]inutes or [s]econds (e.g. 1w or 2d) |
Boolean | deleteSource | default FALSE |
Boolean | keepInSpool | default FALSE |
String | userMailAddress | |
Boolean | sendMailOnSuccess | |
Boolean | sendMailOnFailure | |
Boolean | sendMailOnRetry | |
String | ifTargetFileExists | 'reject', 'append', 'resume' or 'overwrite' |
To restart an ECtrans Transfer:
...