scalableminds / webknossos-connect

Connect webKnossos with existing datasets (BossDB, Neuroglancer Precomputed)
GNU Affero General Public License v3.0
0 stars 0 forks source link

add dataset upload route #44

Closed jstriebel closed 5 years ago

jstriebel commented 5 years ago

For testing, run (with the correct token)

curl -d '{"neuroglancer": {"Connectomics_Department": {"ADDED": {"layers": {"image": {"source": "gs://neuroglancer-fafb-data/fafb_v14/fafb_v14_clahe","type": "image"}}}}}}' -H "Content-Type: application/json" -X POST http://localhost:8000/data/datasets?token=<TOKEN>

A new dataset should appear in the dashboard, and the data/datasets.json should be updated.

You can overwrite this dataset with another, which overwrites the previous:

curl -d '{"neuroglancer": {"Connectomics_Department": {"ADDED": {"layers": {"image": {"source": "gs://neuroglancer-public-data/kasthuri2011/image_color_corrected","type": "image"}}}}}}' -H "Content-Type: application/json" -X POST http://localhost:8000/data/datasets?token=<TOKEN>

Using invalid tokens produces a 403 Forbidden: invalid access token