Data management

Introduction

Anis-server provides datasets extracted from databases. Anis-server allows to associate files (fits, png, xml, ...) to the datasets. We will see here how to associate data with datasets.

Anis-server data path

First of all you have to specify the directory where the data will be stored. This directory will become the root directory for anis-server. Go to the docker-compose.yml file to configure the DATA_PATH environment variable.

anis_server_data_path

Here you can see that the data directory is set to /data

Admin file explorer

An administrator can list files or folders contained in the root directory. Please note that if authentication is enabled you will need to send a token to perform this action.

If you want to explore the ANIS root directory type:

curl http://localhost:8080/file-explorer

admin_file_explorer_root

If you want to explore the ASPIC directory type:

curl http://localhost:8080/file-explorer/ASPIC

admin_file_explorer_aspic_directory

Dataset data path

You can associate a data directory for each of your datasets. The directory path will start from the data root directory of anis-server. To configure the data_path of a dataset you have to fill in the property in the metamodel.

Example:

curl -d '{"name":"vipers_dr2_w1","table_ref":"aspic_vipers_dr2_w1","label":"VIPERS-W1 (DR2)","description":"VIPERS W1 dataset","display":30,"count":1000,"vo":false,"data_path":"ASPIC/VIPERS_DR2","config":{"selectable_row":false},"public":true,"project_name":"anis_project"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset

Here you can see that the data directory for this dataset is set to /ASPIC/VIPERS_DR2

Dataset file explorer

A user can list files or folders contained in the dataset directory. Please note that if the dataset is private you will need to send a token to perform this action.

curl http://localhost:8080/dataset-file-explorer/vipers_dr2_w1/spec1D

dataset_file_explorer_spec1d_directory

Dataset file download

A user can download a file from the data directory of the dataset. Please note that if the dataset is private you will need to send a token to perform this action.

wget http://localhost:8080/download-file/vipers_dr2_w1/spec1D/VIPERS_101121877_bis.fits