Versions Compared

Key

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

Purpose

Data upload (and download) can be done using various mechanisms : 

...

This document describes the data upload mechanism via the REST API method, where users can upload a PGP encrypted XML file.

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.

...

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


 

Upload

Now we know the path is correct and we can do an upload using cURL: 

...

Code Block
curl -i -X PUT -H "Authorization:Basic d21.....uZT=="   -T "./test.pgp"  'https://staging-dataupload.wmda.info/api/v2/io/ION0999/'

 

You may use the API also to fetch your reports : Use the following endpoint to fetch an array with filedescriptors:

Code Block
https://staging-dataupload.wmda.info/api/v2/fs/reports-ion0999/?children=f


 

 



In RESTLET :


                       

Click on Code to get raw CURL syntax:

...