Versions Compared

Key

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

...

Run curl call as below to upload a file:

Code Block
titleInvalid after update from Oct, 27, 2022Data Manager API file upload
curl -i POST 'https://sandbox-datamanager-api.wmda.info/api/v1/files/upload' \
--header 'Authorization: Bearer ••••••' \
--header 'Content-Type: multipart/form-data'
--form 'file=@c:/path/to/file/ION-0999-D.gpg' \
--form 'ion="9999"' \
--form 'folder="upload"'

...

Below is a suggestion for curl call based on the Data Manager swagger doc 

Code Block
titleInvalid after update from Oct, 27, 2022Data Manager API file upload
curl -i POST 'https://sandbox-datamanager-api.wmda.info/api/v1/files/upload' \
--header 'Authorization: Bearer ••••••' \
--header 'Content-Type: multipart/form-data'
--form 'file=@c:/path/to/file/ION-0999-D.gpg' \
--form 'ion="9999"' \
--form 'folder="upload"'

...

Use the file list API to fetch an array of file list for the folder "report":

Code Block
titleData Manager API file list
curl POST 'https://sandbox-datamanager-api.wmda.info/api/v1/files/list' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ••••••' \
--data '{
  "ion": 9999,
  "folder": "report"
}'

...