⚠Due to planned maintenance you will experience short (<30 min) downtime between 08:00 - 08:30 CET.
Table of Contents |
---|
To be updated
Purpose
Upload and download files in Data Manager can be done using various mechanisms :
...
This document describes the Data Manager mechanism via the REST API method, where users can upload a PGP encrypted XML file.
...
titleColor | white |
---|---|
titleBGColor | red |
title | Important 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 Bearer Token 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> |
Using the REST API
There are many ways by using different programming languages to execute API requests. WMDA provide an example by using curl for educational purpose.
To get more knowledge for usage of curl, we recommend member to read the doc for curl https://ec.haxx.se/usingcurl-netrc.html.
There are 2 steps
Step 1: Request the credential which can be used to generate the Bear Token
Step 2: Test to use the API in WMDA WMDA Data Manager swagger: https://brave-forest-04a379103.azurestaticapps.net/?urls.primaryName=Data%20Manager%20Data%20Exchange%20API#/
Step 3: Implement the API.
If you are already familiar with the API implementation, then you can skip Step 2, and test from your own implementationTo test the API you may use a tool like Restlet or Postman, a plugin for Chrome browsers to test API calls before you deploy. The server responds with a HTTP code 200 in when successful, but the response body may contain detailed error messages.
In case the upload succeeded, an XML response with meta information of the upload is generated. You may use this for own logging purposes. For more info you can read the full API specification.
...
URL | |
---|---|
SERVER URL | Staging system: https://stagingsan-dataupload.wmda.info Production system: https://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 required. |
cX-Rename-If-Exists | true |
...