https://hostname/db/upload?entryid=<entry id>&<param1>=0.0&<param2>=0.0&key=HIDDENwhere param1, param2, etc are the column names as specified above. One can view the example API for an entry through the Information page (from the entry menu). For the instrument example above the upload URL is of the form:
https://hostname/db/upload?entryid=5da1c7c8-57c2-4102-acfe-c02e1aa1d4e5&temp=0.0&rh=0.0&key=HIDDENNote: if the target DB entry has an alias, e.g. "site1", then that alias can be used in the API:
https://hostname/db/upload?entryid=site1&temp=0.0&rh=0.0&key=HIDDENNote: for compatability with the CHORDS system the below API is also provided:
https://hostname/measurements/url_create?instrument_id=5da1c7c8-57c2-4102-acfe-c02e1aa1d4e5&temp=0.0&rh=0.0&key=HIDDENThe key is an API key. These are defined by a site administrator in either a .properties file installed in the RAMADDA home directory or through the Admin->Site and Contact Information->Extra Properties section. The API keys are of the form:
db.apikey.<some API key>=<comma separated list of entry ids> db.apikey.<some other API key>=<comma separated list of entry ids>The above example would permit uploads to the DB entry with ID ff29d75c-8baf-4b17-b121-6c0e10eb9c60 or, the entry ID could be an ancestor entry of the target DB entry. This allows for upload access to a group of DB entries.
It is strongly encouraged to have the API key (e.g. "some_unique_password") be hard to guess.
|
Note: if no entry IDs are specified then the API key is valid for any entry.
|
db.apikey.some_unique_password=ff29d75c-8baf-4b17-b121-6c0e10eb9c60,d3016687-af06-4f06-acb5-d41bf19b8c33 db.apikey.some_other_password=ff29d75c-8baf-4b17-b121-6c0e10eb9c60The below URLs should work with the above API key definition:
https://hostname/db/upload?entryid=ff29d75c-8baf-4b17-b121-6c0e10eb9c60&temp=0.0&rh=0.0&key=some_unique_password https://hostname/db/upload?entryid=d3016687-af06-4f06-acb5-d41bf19b8c33&temp=0.0&rh=0.0&key=some_unique_password Or with the alternate URL: https://hostname/measurements/url_create?instrument_id=ff29d75c-8baf-4b17-b121-6c0e10eb9c60&temp=0.0&rh=0.0&key=some_other_passwordA JSON object is returned with either an error or an ok result.