⚠Due to planned maintenance you will experience short (<30 min) downtime between 08:00 - 08:30 CET.
Info | ||
---|---|---|
| ||
This API user guide is subject to change as development of the new BMDW data upload service continues. The URL will change when we go LIVE from 1st November 2017. |
Purpose
Data upload can be done using various mechanisms :
- Web-based interface at https://staging-dataupload.wmda.info
- Desktop applications and Sync Clients for Mac, Linux, Windows.
- REST API, using commands like cURL
This document describes the data upload mechanism via the REST API method, where users can upload a PGP encrypted XML file to the new submission platformfile.
Using the REST API
To test the API you may use a tool like Restlet, a plugin for Chrome browsers to test API calls before you deploy. The server responds with a HTTP code 200 in when succesfull, but may the response body may contain detailed error messages.
...
URL | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
SERVER URL | https://staging-dataupload.wmda.info | |||||||||
URI | /pydio/api/v2/io/bmdwxmlupload/UPD-ION0000-C.pgpION0999/ UPD-ION0000-C.pgp is the filename to be used. 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 | ||||||||||
Authorization | basic | |||||||||
Content-Type | application/x-www-form-urlencoded | |||||||||
X-Rename-If-Exists | true | |||||||||
RESPONSE | ||||||||||
XML |
|
SAMPLE Request
server name should be staging-dataupload.wmda.info
Server name should be staging-dataupload.wmda.info
Please note that the URL will change to https://dataupload.wmda.info in production.
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.
Now we know the path is correct and we can do an upload:
(for clarity we omit X-Rename-If-Exists)
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