⚠Due to planned maintenance you will experience short (<30 min) downtime between 08:00 - 08:30 CET.
...
URL | |
---|---|
SERVER URL | https://staging-dataupload.wmda.info |
URI | /api/v2/io/ION1234/ Explanations:
|
METHOD | PUT |
Full URL path example | For donor for organization with ION-1234, the full path is as below: https://staging-dataupload.wmda.info/api/v2/io/ION1234/ION-1234-D.gpg |
HEADER | Authorization and Content-Type are required, the other ones are optional |
Authorization | basic |
Content-Type | application/octet-stream (when your file < 128K) multipart/form-data (when your file >128K) From , Content-Type is necessaryrequired, we suggest to use it together with binary object. |
cX-Rename-If-Exists | true |
...
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: applicationmultipart/octetform-streamdata" --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: applicationmultipart/octetform-streamdata" --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.
Code Block | ||
---|---|---|
| ||
curl -i -X PUT -H "Authorization:Basic d21.....uZT==" -F "file="@/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==" -F "file="@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" |
FAQ
Question : My report states : File could not be processed due to a file decryption error, when using the API
...