Table of Contents |
---|
Purpose
Data upload (and download) can be done using various mechanisms :
...
- Server name should be https://staging-dataupload.wmda.info
- For production you will need https://dataupload.wmda.info
SAMPLE Request
First test the connection by using the right path and fetching the metadata : it should result in a response 200 OK.
- Look carefully at the path : here we use ion0999, that should be replaced by your ION.
- You may notice that we add the filename to the path: depending on the library you may need to add that
Upload
Now we know the path is correct and we can do an upload using cURL:
...
Warning |
---|
The curl script needs update to upload in STAGING from Oct, 27th, 2022 after maintenance/update . And the new suggested script can be used in PRODUCTION as well. So we strongly suggest API users to update, then there will be less stress after PRODUCTION update/maintenance. |
Suggestion 1:
For all the files, script as below is suggested for file larger than 128K.
Code Block | ||
---|---|---|
| ||
curl -i -X PUT -H "Authorization:Basic d21.....uZT==" -H "Content-Type: multipart/form-data" --data-binary "@/path/to/file/ION-0999-D.gpg" "https://staging-dataupload.wmda.info/api/v2/io/ION0999/" -H "X-File-Name:ION-0999-D.gpg" |
...
Code Block | ||
---|---|---|
| ||
curl -i -X PUT -H "Authorization:Basic d21.....uZT==" -H "Content-Type: multipart/form-data" --data-binary "@c:/path/to/file/ION-0999-D.gpg" "https://staging-dataupload.wmda.info/api/v2/io/ION0999/" -H "X-File-Name:ION-0999-D.gpg" |
Suggestion 2:
For files that identified as PGPG/GOG MESSAGE (open the file can see this info), then -F and -H options also work. -F already included "Content-Type: multipart/form-data", so no need to provide it any more.
...