...
title | INFORMATION |
---|
...
- Web-based interface at https://staging-dataupload.wmda.info
- Desktop applications and Sync Clients for Mac, Linux, Windows.
- REST API, using commands like cURL, or libraries like Restsharp
This document describes the data upload mechanism via the REST API method, where users can upload a PGP encrypted XML file.
...
URL | |
---|---|
SERVER URL | https://staging-dataupload.wmda.info |
URI | /api/v2/io/ION0999/ 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 an unique 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 |
METHOD | PUT |
HEADER | only Authorization is required, the other ones are optional |
Authorization | basic |
Content-Type | application/x-www-form-urlencoded |
X-Rename-If-Exists | true |
- 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
Now we know the path is correct and we can do an upload using cURL:
(for clarity we omit X-Rename-If-Exists)
Code Block |
---|
curl -i -X PUT -H "Authorization:Basic d21.....uZT==" |
...
-T "./test.pgp" |
...
'https://staging-dataupload.wmda.info/api/v2/io/ION0999/' |
In RESTLET :
Click on Code to get raw CURL syntax:
Response should be 200:
...