Versions Compared

Key

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

...

Panel
titleColorwhite
titleBGColorred
titleImportant note on security

The examples below are for educational purposes: WMDA

Please do read https://ec.haxx.se/usingcurl-netrc.html on the use of passwords and usernames if you plan to automate these procedures.

Code Block
# example use:
curl --netrc-file mycredentialsfile https://xyz.com

# the mycredentialsfile contains :
machine <xyz.com> login <johndoe@xyz.com> password <uf9873o^9ufwa>


WMDA dataupload production plan to do a maintenance and update on 8th, Nov, 2023  , which will introduce more security control.
From staging update we know this will impact the current method used in the REST API.
Below you can find some suggestions to improve current script to upload.

...

URL
SERVER URLhttps://staging-dataupload.wmda.info
URI

/api/v2/io/ION1234/

Explanations: 

  • Please refer to the file naming convention.
    This  is stated as : For XML format: The files are marked with ION numbers ( ION-1234-D or ION-1234-C)
  • The ION number is the unique ION number of an organisation sending the file.
  • The D give the information that it is a donor file and the C give the information that it is a cord blood file
METHODPUT
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/x-www-form-urlencoded

Currently

From  , we suggest

to

for upload, use -F (--form) combine which will by default have a Content-Type multipart/form-data, and can provide the file path.
See example below.

X-Rename-If-Existstrue

...