Commit c47ecc89 authored by François Agneray's avatar François Agneray
Browse files

Fixed install (create-db.sh & init-keycloak.sh)

parent cf3785ce
Pipeline #3434 passed with stages
in 2 minutes
......@@ -58,6 +58,7 @@ phpcs:
-w /project jakzal/phpqa phpcs --standard=PSR12 --extensions=php --colors src tests
create-db:
@docker-compose exec php sh ./conf-dev/init-keycloak.sh
@docker-compose exec php sh ./conf-dev/create-db.sh
remove-pgdata:
......
......@@ -2,7 +2,7 @@ FROM php:7.3-apache
# Install modules
RUN apt-get update \
&& apt-get install -y zlib1g zlib1g-dev libpq-dev libpq5 libzip-dev zip unzip \
&& apt-get install -y zlib1g zlib1g-dev libpq-dev libpq5 libzip-dev zip unzip jq \
&& docker-php-ext-install pgsql pdo_pgsql zip bcmath
# Install pecl modules
......
#!/bin/sh
set -e
# Get Keycloak Admin token
admin_token=$(curl --location --request POST 'http://keycloak:8180/auth/realms/anis/protocol/openid-connect/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'username=cesamsi@lam.fr' --data-urlencode 'password=admin' --data-urlencode 'grant_type=password' --data-urlencode 'client_id=anis-admin' | jq -r '.access_token')
# Create the settings database (only tables)
./vendor/bin/doctrine orm:schema-tool:create
# Add database
curl -d '{"label":"Test","dbname":"anis_test","dbtype":"pdo_pgsql","dbhost":"db","dbport":5432,"dblogin":"anis","dbpassword":"anis"}' -H "Content-Type: application/json" -X POST http://localhost/database
curl -d '{"label":"Test","dbname":"anis_test","dbtype":"pdo_pgsql","dbhost":"db","dbport":5432,"dblogin":"anis","dbpassword":"anis"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/database
# Add default instance
curl -d '{"name":"default","label":"Default instance","client_url":"http://localhost:4200","config":{"search":true,"search_multiple":true}}' -H "Content-Type: application/json" -X POST http://localhost/instance
curl -d '{"name":"default","label":"Default instance","client_url":"http://localhost:4200","config":{"search":true,"search_multiple":true}}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/instance
# Add ANIS, SVOM and COLIBRI projects
curl -d '{"name":"anis_project","label":"Anis Project Test","description":"Project used for testing","link":"http://project.com","manager":"M. Durand","id_database":1}' -H "Content-Type: application/json" -X POST http://localhost/project
curl -d '{"name":"svom","label":"Svom Project Test","description":"Project used for testing","link":"http://svom.com","manager":"S. Basa","id_database":1}' -H "Content-Type: application/json" -X POST http://localhost/project
curl -d '{"name":"colibri","label":"Colibri Project Test","description":"Project used for testing","link":"http://colibri.com","manager":"S. Basa","id_database":1}' -H "Content-Type: application/json" -X POST http://localhost/project
curl -d '{"name":"anis_project","label":"Anis Project Test","description":"Project used for testing","link":"http://project.com","manager":"M. Durand","id_database":1}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/project
curl -d '{"name":"svom","label":"Svom Project Test","description":"Project used for testing","link":"http://svom.com","manager":"S. Basa","id_database":1}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/project
curl -d '{"name":"colibri","label":"Colibri Project Test","description":"Project used for testing","link":"http://colibri.com","manager":"S. Basa","id_database":1}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/project
# Add default dataset family and ANIS datasets
curl -d '{"label":"Default dataset family","display":10}' -H "Content-Type: application/json" -X POST http://localhost/instance/default/dataset-family
curl -d '{"name":"obs_cat","table_ref":"obs_cat","label":"ObsCat dataset","description":"ObsCat","display":10,"count":10000,"vo":false,"data_path":"/mnt/mount","config":{"cone_search":{"enabled":true,"column_ra":2,"column_dec":3},"selectable_row":true},"public":true,"project_name":"anis_project"}' -H "Content-Type: application/json" -X POST http://localhost/dataset-family/1/dataset
curl -d '{"name":"observations","table_ref":"observations_info","label":"Observations dataset","description":"Observations","display":20,"count":177454,"vo":false,"data_path":"/mnt/mount","config":{"selectable_row":false},"public":true,"project_name":"anis_project"}' -H "Content-Type: application/json" -X POST http://localhost/dataset-family/1/dataset
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":"/mnt/mount","config":{"selectable_row":false},"public":true,"project_name":"anis_project"}' -H "Content-Type: application/json" -X POST http://localhost/dataset-family/1/dataset
curl -d '{"name":"gama_g02_dr3","table_ref":"aspic_gama_g02","label":"GAMA G02 (DR3)","description":"GAMA G02 dataset","display":40,"count":8,"vo":false,"data_path":"/mnt/mount","config":{"selectable_row":false},"public":true,"project_name":"anis_project"}' -H "Content-Type: application/json" -X POST http://localhost/dataset-family/1/dataset
curl -d '{"label":"Default dataset family","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/instance/default/dataset-family
curl -d '{"name":"obs_cat","table_ref":"obs_cat","label":"ObsCat dataset","description":"ObsCat","display":10,"count":10000,"vo":false,"data_path":"/mnt/mount","config":{"cone_search":{"enabled":true,"column_ra":2,"column_dec":3},"selectable_row":true},"public":true,"project_name":"anis_project"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset-family/1/dataset
curl -d '{"name":"observations","table_ref":"observations_info","label":"Observations dataset","description":"Observations","display":20,"count":177454,"vo":false,"data_path":"/mnt/mount","config":{"selectable_row":false},"public":true,"project_name":"anis_project"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset-family/1/dataset
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":"/mnt/mount","config":{"selectable_row":false},"public":true,"project_name":"anis_project"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset-family/1/dataset
curl -d '{"name":"gama_g02_dr3","table_ref":"aspic_gama_g02","label":"GAMA G02 (DR3)","description":"GAMA G02 dataset","display":40,"count":8,"vo":false,"data_path":"/mnt/mount","config":{"selectable_row":false},"public":true,"project_name":"anis_project"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset-family/1/dataset
# Add ANIS obs_cat default criteria family, default output family and default output category
curl -d '{"label":"Default criteria family","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/obs_cat/criteria-family
curl -d '{"label":"Default output family","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/obs_cat/output-family
curl -d '{"label":"Default output category","display":10}' -H "Content-Type: application/json" -X POST http://localhost/output-family/1/output-category
curl -d '{"label":"Default criteria family","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/obs_cat/criteria-family
curl -d '{"label":"Default output family","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/obs_cat/output-family
curl -d '{"label":"Default output category","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/output-family/1/output-category
# Add SVOM dataset family and SVOM datasets
curl -d '{"label":"Svom dataset family","display":20}' -H "Content-Type: application/json" -X POST http://localhost/instance/default/dataset-family
curl -d '{"name":"l1","table_ref":"public.v_rawproducts","label":"L0 & L1","description":"L0 & L1 products list","display":10,"count":0,"vo":false,"data_path":"/mnt/mount","config":{"results_server_link":{"enabled":true},"selectable_row":false},"public":true,"project_name":"svom"}' -H "Content-Type: application/json" -X POST http://localhost/dataset-family/2/dataset
curl -d '{"name":"products","table_ref":"public.v_products","label":"Scientific Products","description":"SR3 & SR4 products list","display":20,"count":0,"vo":false,"data_path":"/mnt/mount","config":{"results_server_link":{"enabled":true},"selectable_row":false},"public":true,"project_name":"svom"}' -H "Content-Type: application/json" -X POST http://localhost/dataset-family/2/dataset
curl -d '{"name":"sp_cards","table_ref":"sp_cards","label":"SP Metadata","description":"Contains metadata of scientific products (Core Program & General Program)","display":30,"count":100,"vo":false,"data_path":"/mnt/mount","config":{"results_server_link":{"enabled":true},"selectable_row":false},"public":true,"project_name":"svom"}' -H "Content-Type: application/json" -X POST http://localhost/dataset-family/2/dataset
curl -d '{"label":"Svom dataset family","display":20}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/instance/default/dataset-family
curl -d '{"name":"l1","table_ref":"public.v_rawproducts","label":"L0 & L1","description":"L0 & L1 products list","display":10,"count":0,"vo":false,"data_path":"/mnt/mount","config":{"results_server_link":{"enabled":true},"selectable_row":false},"public":true,"project_name":"svom"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset-family/2/dataset
curl -d '{"name":"products","table_ref":"public.v_products","label":"Scientific Products","description":"SR3 & SR4 products list","display":20,"count":0,"vo":false,"data_path":"/mnt/mount","config":{"results_server_link":{"enabled":true},"selectable_row":false},"public":true,"project_name":"svom"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset-family/2/dataset
curl -d '{"name":"sp_cards","table_ref":"sp_cards","label":"SP Metadata","description":"Contains metadata of scientific products (Core Program & General Program)","display":30,"count":100,"vo":false,"data_path":"/mnt/mount","config":{"results_server_link":{"enabled":true},"selectable_row":false},"public":true,"project_name":"svom"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset-family/2/dataset
# Add SVOM l1 criteria families, default output family and default output category
curl -d '{"label":"Obs","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/l1/criteria-family
curl -d '{"label":"Card","display":20}' -H "Content-Type: application/json" -X POST http://localhost/dataset/l1/criteria-family
curl -d '{"label":"Default","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/l1/output-family
curl -d '{"label":"Default","display":10}' -H "Content-Type: application/json" -X POST http://localhost/output-family/2/output-category
curl -d '{"label":"Obs","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/l1/criteria-family
curl -d '{"label":"Card","display":20}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/l1/criteria-family
curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/l1/output-family
curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/output-family/2/output-category
# Edit SVOM l1 attributes
curl -d '{"id":1,"name":"rawproduct_id","table_name":"public.v_rawproducts","label":"rawproduct_id","form_label":"Raw product ID","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"field","type":"integer","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"json","display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/1
curl -d '{"id":2,"name":"filename","table_name":"public.v_rawproducts","label":"filename","form_label":"Filename","description":null,"output_display":20,"criteria_display":20,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/2
curl -d '{"id":3,"name":"level","table_name":"public.v_rawproducts","label":"level","form_label":"Level","description":null,"output_display":30,"criteria_display":30,"search_flag":null,"search_type":"select-multiple","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":false,"renderer_detail":null,"options":[{"label":"L0d","value":"L0d","display":10},{"label":"L0e","value":"L0e","display":20},{"label":"L1","value":"L1","display":30}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/3
curl -d '{"id":4,"name":"obs_id","table_name":"public.v_rawproducts","label":"obs_id","form_label":"Observation ID","description":null,"output_display":40,"criteria_display":40,"search_flag":null,"search_type":"field","type":"bigint","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":40,"selected":true,"order_by":false,"order_display":40,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/4
curl -d '{"id":5,"name":"obs_seq","table_name":"public.v_rawproducts","label":"obs_seq","form_label":"Obs seq","description":null,"output_display":50,"criteria_display":50,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":50,"selected":true,"order_by":false,"order_display":50,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/5
curl -d '{"id":6,"name":"obs_num","table_name":"public.v_rawproducts","label":"obs_num","form_label":"Obs num","description":null,"output_display":60,"criteria_display":60,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":60,"selected":true,"order_by":false,"order_display":60,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/6
curl -d '{"id":7,"name":"obs_type","table_name":"public.v_rawproducts","label":"obs_type","form_label":"Obs type","description":null,"output_display":70,"criteria_display":70,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":70,"selected":true,"order_by":false,"order_display":70,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/7
curl -d '{"id":8,"name":"object_id","table_name":"public.v_rawproducts","label":"object_id","form_label":"Object ID","description":null,"output_display":80,"criteria_display":80,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":80,"selected":true,"order_by":false,"order_display":80,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/8
curl -d '{"id":9,"name":"source_id","table_name":"public.v_rawproducts","label":"source_id","form_label":"Source ID","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/9
curl -d '{"id":10,"name":"apid","table_name":"public.v_rawproducts","label":"apid","form_label":"Apid","description":null,"output_display":100,"criteria_display":100,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":100,"selected":true,"order_by":false,"order_display":100,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/10
curl -d '{"id":11,"name":"category","table_name":"public.v_rawproducts","label":"category","form_label":"Category","description":null,"output_display":110,"criteria_display":110,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":110,"selected":true,"order_by":false,"order_display":110,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/11
curl -d '{"id":12,"name":"instrument","table_name":"public.v_rawproducts","label":"instrument","form_label":"Instrument","description":null,"output_display":120,"criteria_display":120,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":120,"selected":true,"order_by":false,"order_display":120,"detail":false,"renderer_detail":null,"options":[{"label":"MXT","value":"MXT","display":10},{"label":"VT","value":"VT","display":20},{"label":"ECL","value":"ECL","display":30},{"label":"GRM","value":"GRM","display":40},{"label":"PDPU","value":"PDPU","display":50},{"label":"GWAC","value":"GWAC","display":60},{"label":"CGFT","value":"CGFT","display":70},{"label":"FGFT","value":"FGFT","display":80},{"label":"FPL","value":"FPL","display":90},{"label":"CPL","value":"CPL","display":100},{"label":"INS","value":"INS","display":110},{"label":"NONE","value":"NONE","display":120}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":3,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/12
curl -d '{"id":13,"name":"detector","table_name":"public.v_rawproducts","label":"detector","form_label":"Detector","description":null,"output_display":130,"criteria_display":130,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":130,"selected":true,"order_by":false,"order_display":130,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/13
curl -d '{"id":14,"name":"version","table_name":"public.v_rawproducts","label":"version","form_label":"Version","description":null,"output_display":140,"criteria_display":140,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":140,"selected":true,"order_by":false,"order_display":140,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/14
curl -d '{"id":15,"name":"ext_name","table_name":"public.v_rawproducts","label":"ext_name","form_label":"Ext name","description":null,"output_display":150,"criteria_display":150,"search_flag":null,"search_type":"field","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":150,"selected":true,"order_by":false,"order_display":150,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/15
curl -d '{"id":16,"name":"ext_rel","table_name":"public.v_rawproducts","label":"ext_rel","form_label":"Ext rel","description":null,"output_display":160,"criteria_display":160,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":160,"selected":true,"order_by":false,"order_display":160,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/16
curl -d '{"id":17,"name":"group_name","table_name":"public.v_rawproducts","label":"group_name","form_label":"Group name","description":null,"output_display":170,"criteria_display":170,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":170,"selected":true,"order_by":false,"order_display":170,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/17
curl -d '{"id":18,"name":"packet_id","table_name":"public.v_rawproducts","label":"packet_id","form_label":"Packet ID","description":null,"output_display":180,"criteria_display":180,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":180,"selected":true,"order_by":false,"order_display":180,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/18
curl -d '{"id":19,"name":"start_stime","table_name":"public.v_rawproducts","label":"start_stime","form_label":"Start Time","description":null,"output_display":190,"criteria_display":190,"search_flag":null,"search_type":"date","type":"datetime","operator":"gt","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":190,"selected":true,"order_by":false,"order_display":190,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/19
curl -d '{"id":20,"name":"end_stime","table_name":"public.v_rawproducts","label":"end_stime","form_label":"End Time","description":null,"output_display":200,"criteria_display":200,"search_flag":null,"search_type":"date","type":"datetime","operator":"lt","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":200,"selected":true,"order_by":false,"order_display":200,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/20
curl -d '{"id":21,"name":"conf_min","table_name":"public.v_rawproducts","label":"conf_min","form_label":"Conf min","description":null,"output_display":210,"criteria_display":210,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":210,"selected":true,"order_by":false,"order_display":210,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/21
curl -d '{"id":23,"name":"temp_low","table_name":"public.v_rawproducts","label":"temp_low","form_label":"Temperature low","description":null,"output_display":230,"criteria_display":230,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":230,"selected":true,"order_by":false,"order_display":230,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/23
curl -d '{"id":24,"name":"temp_high","table_name":"public.v_rawproducts","label":"temp_high","form_label":"Temperature high","description":null,"output_display":240,"criteria_display":240,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":240,"selected":true,"order_by":false,"order_display":240,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/l1/attribute/24
curl -d '{"id":1,"name":"rawproduct_id","table_name":"public.v_rawproducts","label":"rawproduct_id","form_label":"Raw product ID","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"field","type":"integer","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"json","display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/1
curl -d '{"id":2,"name":"filename","table_name":"public.v_rawproducts","label":"filename","form_label":"Filename","description":null,"output_display":20,"criteria_display":20,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/2
curl -d '{"id":3,"name":"level","table_name":"public.v_rawproducts","label":"level","form_label":"Level","description":null,"output_display":30,"criteria_display":30,"search_flag":null,"search_type":"select-multiple","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":false,"renderer_detail":null,"options":[{"label":"L0d","value":"L0d","display":10},{"label":"L0e","value":"L0e","display":20},{"label":"L1","value":"L1","display":30}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/3
curl -d '{"id":4,"name":"obs_id","table_name":"public.v_rawproducts","label":"obs_id","form_label":"Observation ID","description":null,"output_display":40,"criteria_display":40,"search_flag":null,"search_type":"field","type":"bigint","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":40,"selected":true,"order_by":false,"order_display":40,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/4
curl -d '{"id":5,"name":"obs_seq","table_name":"public.v_rawproducts","label":"obs_seq","form_label":"Obs seq","description":null,"output_display":50,"criteria_display":50,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":50,"selected":true,"order_by":false,"order_display":50,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/5
curl -d '{"id":6,"name":"obs_num","table_name":"public.v_rawproducts","label":"obs_num","form_label":"Obs num","description":null,"output_display":60,"criteria_display":60,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":60,"selected":true,"order_by":false,"order_display":60,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/6
curl -d '{"id":7,"name":"obs_type","table_name":"public.v_rawproducts","label":"obs_type","form_label":"Obs type","description":null,"output_display":70,"criteria_display":70,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":70,"selected":true,"order_by":false,"order_display":70,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/7
curl -d '{"id":8,"name":"object_id","table_name":"public.v_rawproducts","label":"object_id","form_label":"Object ID","description":null,"output_display":80,"criteria_display":80,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":80,"selected":true,"order_by":false,"order_display":80,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/8
curl -d '{"id":9,"name":"source_id","table_name":"public.v_rawproducts","label":"source_id","form_label":"Source ID","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/9
curl -d '{"id":10,"name":"apid","table_name":"public.v_rawproducts","label":"apid","form_label":"Apid","description":null,"output_display":100,"criteria_display":100,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":100,"selected":true,"order_by":false,"order_display":100,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/10
curl -d '{"id":11,"name":"category","table_name":"public.v_rawproducts","label":"category","form_label":"Category","description":null,"output_display":110,"criteria_display":110,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":110,"selected":true,"order_by":false,"order_display":110,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/11
curl -d '{"id":12,"name":"instrument","table_name":"public.v_rawproducts","label":"instrument","form_label":"Instrument","description":null,"output_display":120,"criteria_display":120,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":120,"selected":true,"order_by":false,"order_display":120,"detail":false,"renderer_detail":null,"options":[{"label":"MXT","value":"MXT","display":10},{"label":"VT","value":"VT","display":20},{"label":"ECL","value":"ECL","display":30},{"label":"GRM","value":"GRM","display":40},{"label":"PDPU","value":"PDPU","display":50},{"label":"GWAC","value":"GWAC","display":60},{"label":"CGFT","value":"CGFT","display":70},{"label":"FGFT","value":"FGFT","display":80},{"label":"FPL","value":"FPL","display":90},{"label":"CPL","value":"CPL","display":100},{"label":"INS","value":"INS","display":110},{"label":"NONE","value":"NONE","display":120}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":3,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/12
curl -d '{"id":13,"name":"detector","table_name":"public.v_rawproducts","label":"detector","form_label":"Detector","description":null,"output_display":130,"criteria_display":130,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":130,"selected":true,"order_by":false,"order_display":130,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/13
curl -d '{"id":14,"name":"version","table_name":"public.v_rawproducts","label":"version","form_label":"Version","description":null,"output_display":140,"criteria_display":140,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":140,"selected":true,"order_by":false,"order_display":140,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/14
curl -d '{"id":15,"name":"ext_name","table_name":"public.v_rawproducts","label":"ext_name","form_label":"Ext name","description":null,"output_display":150,"criteria_display":150,"search_flag":null,"search_type":"field","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":150,"selected":true,"order_by":false,"order_display":150,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/15
curl -d '{"id":16,"name":"ext_rel","table_name":"public.v_rawproducts","label":"ext_rel","form_label":"Ext rel","description":null,"output_display":160,"criteria_display":160,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":160,"selected":true,"order_by":false,"order_display":160,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/16
curl -d '{"id":17,"name":"group_name","table_name":"public.v_rawproducts","label":"group_name","form_label":"Group name","description":null,"output_display":170,"criteria_display":170,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":170,"selected":true,"order_by":false,"order_display":170,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/17
curl -d '{"id":18,"name":"packet_id","table_name":"public.v_rawproducts","label":"packet_id","form_label":"Packet ID","description":null,"output_display":180,"criteria_display":180,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":180,"selected":true,"order_by":false,"order_display":180,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/18
curl -d '{"id":19,"name":"start_stime","table_name":"public.v_rawproducts","label":"start_stime","form_label":"Start Time","description":null,"output_display":190,"criteria_display":190,"search_flag":null,"search_type":"date","type":"datetime","operator":"gt","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":190,"selected":true,"order_by":false,"order_display":190,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/19
curl -d '{"id":20,"name":"end_stime","table_name":"public.v_rawproducts","label":"end_stime","form_label":"End Time","description":null,"output_display":200,"criteria_display":200,"search_flag":null,"search_type":"date","type":"datetime","operator":"lt","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":200,"selected":true,"order_by":false,"order_display":200,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/20
curl -d '{"id":21,"name":"conf_min","table_name":"public.v_rawproducts","label":"conf_min","form_label":"Conf min","description":null,"output_display":210,"criteria_display":210,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":210,"selected":true,"order_by":false,"order_display":210,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/21
curl -d '{"id":23,"name":"temp_low","table_name":"public.v_rawproducts","label":"temp_low","form_label":"Temperature low","description":null,"output_display":230,"criteria_display":230,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":230,"selected":true,"order_by":false,"order_display":230,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/23
curl -d '{"id":24,"name":"temp_high","table_name":"public.v_rawproducts","label":"temp_high","form_label":"Temperature high","description":null,"output_display":240,"criteria_display":240,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":240,"selected":true,"order_by":false,"order_display":240,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/l1/attribute/24
# Add SVOM products criteria families, default output family and default output category
curl -d '{"label":"Obs","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/products/criteria-family
curl -d '{"label":"Card","display":20}' -H "Content-Type: application/json" -X POST http://localhost/dataset/products/criteria-family
curl -d '{"label":"Default","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/products/output-family
curl -d '{"label":"Default","display":10}' -H "Content-Type: application/json" -X POST http://localhost/output-family/3/output-category
curl -d '{"label":"Obs","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/products/criteria-family
curl -d '{"label":"Card","display":20}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/products/criteria-family
curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/products/output-family
curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/output-family/3/output-category
# Edit SVOM products attributes
curl -d '{"id":1,"name":"product_id","table_name":"public.v_products","label":"product_id","form_label":"Product ID","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"field","type":"integer","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":4,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/1
curl -d '{"id":2,"name":"obs_id","table_name":"public.v_products","label":"obs_id","form_label":"Observation ID","description":null,"output_display":20,"criteria_display":20,"search_flag":null,"search_type":"field","type":"bigint","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":4,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/2
curl -d '{"id":3,"name":"sp_acronym","table_name":"public.v_products","label":"sp_acronym","form_label":"Product Acronym","description":null,"output_display":30,"criteria_display":30,"search_flag":null,"search_type":"svom-json-card","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":false,"renderer_detail":null,"options":[{"label":"AV_AG_HOST","value":"AV_AG_HOST","display":10},{"label":"AV_AG_LOC","value":"AV_AG_LOC","display":20},{"label":"CLASS_EARLY","value":"CLASS_EARLY","display":30},{"label":"CRCLASS","value":"CRCLASS","display":40},{"label":"DT_GFT_i","value":"DT_GFT_i","display":50},{"label":"DT_GWAC","value":"DT_GWAC","display":60},{"label":"DT_MXT","value":"DT_MXT","display":70},{"label":"DT_VT","value":"DT_VT","display":80},{"label":"FDCHART_GWAC","value":"FDCHART_GWAC","display":90},{"label":"FDCHART_VT_B","value":"FDCHART_VT_B","display":100},{"label":"FDCHART_VT_R","value":"FDCHART_VT_R","display":110},{"label":"FLUENCE_ECL","value":"FLUENCE_ECL","display":120},{"label":"FLUENCE_ECLGRM","value":"FLUENCE_ECLGRM","display":130},{"label":"FLUENCE_GRM","value":"FLUENCE_GRM","display":140},{"label":"HR_ECL","value":"HR_ECL","display":150},{"label":"HR_ECLGRM","value":"HR_ECLGRM","display":160},{"label":"HR_GRM","value":"HR_GRM","display":170},{"label":"LAG_ECL","value":"LAG_ECL","display":180},{"label":"LAG_ECLGRM","value":"LAG_ECLGRM","display":190},{"label":"LAG_GRM","value":"LAG_GRM","display":200},{"label":"LC_ECL","value":"LC_ECL","display":210},{"label":"LC_GFT_i","value":"LC_GFT_i","display":220},{"label":"LC_GRM","value":"LC_GRM","display":230},{"label":"LC_GWAC","value":"LC_GWAC","display":240},{"label":"LC_MXT_i","value":"LC_MXT_i","display":250},{"label":"LC_PARAM_GFT","value":"LC_PARAM_GFT","display":260},{"label":"LC_PARAM_MXT","value":"LC_PARAM_MXT","display":270},{"label":"LC_PARAM_VT_B","value":"LC_PARAM_VT_B","display":280},{"label":"LC_PARAM_VT_R","value":"LC_PARAM_VT_R","display":290},{"label":"LC_VT_B","value":"LC_VT_B","display":300},{"label":"LC_VT_R","value":"LC_VT_R","display":310},{"label":"NH_HOST","value":"NH_HOST","display":320},{"label":"NH_LOC","value":"NH_LOC","display":330},{"label":"OBLC_ECL","value":"OBLC_ECL","display":340},{"label":"OBLC_GRM","value":"OBLC_GRM","display":350},{"label":"PF_ECL","value":"PF_ECL","display":360},{"label":"PF_GRM","value":"PF_GRM","display":370},{"label":"PF_GWAC","value":"PF_GWAC","display":380},{"label":"PHZ","value":"PHZ","display":390},{"label":"PO_ECL","value":"PO_ECL","display":400},{"label":"PO_GFT","value":"PO_GFT","display":410},{"label":"PO_GRM","value":"PO_GRM","display":420},{"label":"PO_GWAC","value":"PO_GWAC","display":430},{"label":"PO_MXT","value":"PO_MXT","display":440},{"label":"PO_VT","value":"PO_VT","display":450},{"label":"QCL_ECL","value":"QCL_ECL","display":460},{"label":"QCL_GRM","value":"QCL_GRM","display":470},{"label":"QF_GFT_i","value":"QF_GFT_i","display":480},{"label":"QF_GWAC","value":"QF_GWAC","display":490},{"label":"QF_MXT","value":"QF_MXT","display":500},{"label":"QF_VT_B","value":"QF_VT_B","display":510},{"label":"QF_VT_R","value":"QF_VT_R","display":520},{"label":"QHR_ECL","value":"QHR_ECL","display":530},{"label":"QHR_ECLGRM","value":"QHR_ECLGRM","display":540},{"label":"QHR_GRM","value":"QHR_GRM","display":550},{"label":"QLC_ECL","value":"QLC_ECL","display":560},{"label":"QLC_GFT_i","value":"QLC_GFT_i","display":570},{"label":"QLC_GRM","value":"QLC_GRM","display":580},{"label":"QLC_GWAC","value":"QLC_GWAC","display":590},{"label":"QLC_MXT","value":"QLC_MXT","display":600},{"label":"QLC_VT_B","value":"QLC_VT_B","display":610},{"label":"QLC_VT_R","value":"QLC_VT_R","display":620},{"label":"QPF_ECL","value":"QPF_ECL","display":630},{"label":"QPF_GRM","value":"QPF_GRM","display":640},{"label":"QPO_ECL","value":"QPO_ECL","display":650},{"label":"QPO_GRM","value":"QPO_GRM","display":660},{"label":"QPO_GWAC","value":"QPO_GWAC","display":670},{"label":"QPO_MXT","value":"QPO_MXT","display":680},{"label":"QPO_VT","value":"QPO_VT","display":690},{"label":"QSP_GRM","value":"QSP_GRM","display":700},{"label":"QSRCLIST_VT","value":"QSRCLIST_VT","display":710},{"label":"QT90_ECL","value":"QT90_ECL","display":720},{"label":"QT90_GRM","value":"QT90_GRM","display":730},{"label":"QTI_GFT_i","value":"QTI_GFT_i","display":740},{"label":"QTI_MXT","value":"QTI_MXT","display":750},{"label":"QTI_VT_B","value":"QTI_VT_B","display":760},{"label":"QTI_VT_R","value":"QTI_VT_R","display":770},{"label":"QUPLIM_GWAC","value":"QUPLIM_GWAC","display":780},{"label":"SP_ECL","value":"SP_ECL","display":790},{"label":"SP_ECLGRM","value":"SP_ECLGRM","display":800},{"label":"SP_GRM","value":"SP_GRM","display":810},{"label":"SP_MXT","value":"SP_MXT","display":820},{"label":"SP_PARAM_MXT","value":"SP_PARAM_MXT","display":830},{"label":"SP_PARAM_T_MXT","value":"SP_PARAM_T_MXT","display":840},{"label":"T90_ECL","value":"T90_ECL","display":850},{"label":"T90_GRM","value":"T90_GRM","display":860},{"label":"TT_ECL","value":"TT_ECL","display":870},{"label":"TT_GRM","value":"TT_GRM","display":880},{"label":"UPLIM_GFT_i","value":"UPLIM_GFT_i","display":890},{"label":"UPLIM_GWAC","value":"UPLIM_GWAC","display":900},{"label":"UPLIM_VT_B","value":"UPLIM_VT_B","display":910},{"label":"UPLIM_VT_R","value":"UPLIM_VT_R","display":920},{"label":"ECL-SKY-IMA","value":"ECL-SKY-IMA","display":82},{"label":"ECL-SOP-IMA","value":"ECL-SOP-IMA","display":84},{"label":"OBATT_VT","value":"OBATT_VT","display":332},{"label":"OBFIND_VT","value":"OBFIND_VT","display":334},{"label":"OBIM1B_VT","value":"OBIM1B_VT","display":336},{"label":"OBIM1R_VT","value":"OBIM1R_VT","display":338},{"label":"QIM1B_VT","value":"QIM1B_VT","display":554},{"label":"QIM1R_VT","value":"QIM1R_VT","display":556},{"label":"MXT-EVT-CAL","value":"MXT-EVT-CAL","display":315},{"label":"LAMTEST_DC1","value":"LAMTEST_DC1","display":5},{"label":"LAMTEST","value":"LAMTEST","display":4}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/3
curl -d '{"id":4,"name":"filename","table_name":"public.v_products","label":"filename","form_label":"Product URL","description":null,"output_display":40,"criteria_display":40,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"link", "renderer_config": {"href": "$value", "display": "text", "text": "$value", "icon": "fas fa-link", "blank": true}, "display_detail":40,"selected":true,"order_by":false,"order_display":40,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/4
curl -d '{"id":5,"name":"criteria","table_name":"public.v_products","label":"criteria","form_label":"Criteria","description":null,"output_display":50,"criteria_display":50,"search_flag":null,"search_type":"svom-json-kw","type":"json","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"json","display_detail":50,"selected":true,"order_by":false,"order_display":50,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/5
curl -d '{"id":6,"name":"added_at","table_name":"public.v_products","label":"added_at","form_label":"Added at","description":null,"output_display":60,"criteria_display":60,"search_flag":null,"search_type":"date","type":"datetime","operator":"gt","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":60,"selected":true,"order_by":false,"order_display":60,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":4,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/6
curl -d '{"id":7,"name":"version","table_name":"public.v_products","label":"version","form_label":"Version","description":null,"output_display":70,"criteria_display":70,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":70,"selected":true,"order_by":false,"order_display":70,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/7
curl -d '{"id":8,"name":"program","table_name":"public.v_products","label":"program","form_label":"Program","description":null,"output_display":80,"criteria_display":80,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":80,"selected":true,"order_by":false,"order_display":80,"detail":false,"renderer_detail":null,"options":[{"label":"GP","value":"GP","display":10},{"label":"CP","value":"CP","display":20}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/8
curl -d '{"id":9,"name":"instrument","table_name":"public.v_products","label":"instrument","form_label":"Instrument","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":[{"label":"GFT","value":"GFT","display":10},{"label":"MXT","value":"MXT","display":20},{"label":"GWAC","value":"GWAC","display":30},{"label":"VT","value":"VT","display":40},{"label":"GRM","value":"GRM","display":50},{"label":"ECL","value":"ECL","display":60},{"label":"ECLGRM","value":"ECLGRM","display":70},{"label":"ALL","value":"ALL","display":80}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/9
curl -d '{"id":10,"name":"type","table_name":"public.v_products","label":"type","form_label":"Type","description":null,"output_display":100,"criteria_display":100,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":100,"selected":true,"order_by":false,"order_display":100,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":3}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/products/attribute/10
curl -d '{"id":1,"name":"product_id","table_name":"public.v_products","label":"product_id","form_label":"Product ID","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"field","type":"integer","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":4,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/1
curl -d '{"id":2,"name":"obs_id","table_name":"public.v_products","label":"obs_id","form_label":"Observation ID","description":null,"output_display":20,"criteria_display":20,"search_flag":null,"search_type":"field","type":"bigint","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":4,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/2
curl -d '{"id":3,"name":"sp_acronym","table_name":"public.v_products","label":"sp_acronym","form_label":"Product Acronym","description":null,"output_display":30,"criteria_display":30,"search_flag":null,"search_type":"svom-json-card","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":false,"renderer_detail":null,"options":[{"label":"AV_AG_HOST","value":"AV_AG_HOST","display":10},{"label":"AV_AG_LOC","value":"AV_AG_LOC","display":20},{"label":"CLASS_EARLY","value":"CLASS_EARLY","display":30},{"label":"CRCLASS","value":"CRCLASS","display":40},{"label":"DT_GFT_i","value":"DT_GFT_i","display":50},{"label":"DT_GWAC","value":"DT_GWAC","display":60},{"label":"DT_MXT","value":"DT_MXT","display":70},{"label":"DT_VT","value":"DT_VT","display":80},{"label":"FDCHART_GWAC","value":"FDCHART_GWAC","display":90},{"label":"FDCHART_VT_B","value":"FDCHART_VT_B","display":100},{"label":"FDCHART_VT_R","value":"FDCHART_VT_R","display":110},{"label":"FLUENCE_ECL","value":"FLUENCE_ECL","display":120},{"label":"FLUENCE_ECLGRM","value":"FLUENCE_ECLGRM","display":130},{"label":"FLUENCE_GRM","value":"FLUENCE_GRM","display":140},{"label":"HR_ECL","value":"HR_ECL","display":150},{"label":"HR_ECLGRM","value":"HR_ECLGRM","display":160},{"label":"HR_GRM","value":"HR_GRM","display":170},{"label":"LAG_ECL","value":"LAG_ECL","display":180},{"label":"LAG_ECLGRM","value":"LAG_ECLGRM","display":190},{"label":"LAG_GRM","value":"LAG_GRM","display":200},{"label":"LC_ECL","value":"LC_ECL","display":210},{"label":"LC_GFT_i","value":"LC_GFT_i","display":220},{"label":"LC_GRM","value":"LC_GRM","display":230},{"label":"LC_GWAC","value":"LC_GWAC","display":240},{"label":"LC_MXT_i","value":"LC_MXT_i","display":250},{"label":"LC_PARAM_GFT","value":"LC_PARAM_GFT","display":260},{"label":"LC_PARAM_MXT","value":"LC_PARAM_MXT","display":270},{"label":"LC_PARAM_VT_B","value":"LC_PARAM_VT_B","display":280},{"label":"LC_PARAM_VT_R","value":"LC_PARAM_VT_R","display":290},{"label":"LC_VT_B","value":"LC_VT_B","display":300},{"label":"LC_VT_R","value":"LC_VT_R","display":310},{"label":"NH_HOST","value":"NH_HOST","display":320},{"label":"NH_LOC","value":"NH_LOC","display":330},{"label":"OBLC_ECL","value":"OBLC_ECL","display":340},{"label":"OBLC_GRM","value":"OBLC_GRM","display":350},{"label":"PF_ECL","value":"PF_ECL","display":360},{"label":"PF_GRM","value":"PF_GRM","display":370},{"label":"PF_GWAC","value":"PF_GWAC","display":380},{"label":"PHZ","value":"PHZ","display":390},{"label":"PO_ECL","value":"PO_ECL","display":400},{"label":"PO_GFT","value":"PO_GFT","display":410},{"label":"PO_GRM","value":"PO_GRM","display":420},{"label":"PO_GWAC","value":"PO_GWAC","display":430},{"label":"PO_MXT","value":"PO_MXT","display":440},{"label":"PO_VT","value":"PO_VT","display":450},{"label":"QCL_ECL","value":"QCL_ECL","display":460},{"label":"QCL_GRM","value":"QCL_GRM","display":470},{"label":"QF_GFT_i","value":"QF_GFT_i","display":480},{"label":"QF_GWAC","value":"QF_GWAC","display":490},{"label":"QF_MXT","value":"QF_MXT","display":500},{"label":"QF_VT_B","value":"QF_VT_B","display":510},{"label":"QF_VT_R","value":"QF_VT_R","display":520},{"label":"QHR_ECL","value":"QHR_ECL","display":530},{"label":"QHR_ECLGRM","value":"QHR_ECLGRM","display":540},{"label":"QHR_GRM","value":"QHR_GRM","display":550},{"label":"QLC_ECL","value":"QLC_ECL","display":560},{"label":"QLC_GFT_i","value":"QLC_GFT_i","display":570},{"label":"QLC_GRM","value":"QLC_GRM","display":580},{"label":"QLC_GWAC","value":"QLC_GWAC","display":590},{"label":"QLC_MXT","value":"QLC_MXT","display":600},{"label":"QLC_VT_B","value":"QLC_VT_B","display":610},{"label":"QLC_VT_R","value":"QLC_VT_R","display":620},{"label":"QPF_ECL","value":"QPF_ECL","display":630},{"label":"QPF_GRM","value":"QPF_GRM","display":640},{"label":"QPO_ECL","value":"QPO_ECL","display":650},{"label":"QPO_GRM","value":"QPO_GRM","display":660},{"label":"QPO_GWAC","value":"QPO_GWAC","display":670},{"label":"QPO_MXT","value":"QPO_MXT","display":680},{"label":"QPO_VT","value":"QPO_VT","display":690},{"label":"QSP_GRM","value":"QSP_GRM","display":700},{"label":"QSRCLIST_VT","value":"QSRCLIST_VT","display":710},{"label":"QT90_ECL","value":"QT90_ECL","display":720},{"label":"QT90_GRM","value":"QT90_GRM","display":730},{"label":"QTI_GFT_i","value":"QTI_GFT_i","display":740},{"label":"QTI_MXT","value":"QTI_MXT","display":750},{"label":"QTI_VT_B","value":"QTI_VT_B","display":760},{"label":"QTI_VT_R","value":"QTI_VT_R","display":770},{"label":"QUPLIM_GWAC","value":"QUPLIM_GWAC","display":780},{"label":"SP_ECL","value":"SP_ECL","display":790},{"label":"SP_ECLGRM","value":"SP_ECLGRM","display":800},{"label":"SP_GRM","value":"SP_GRM","display":810},{"label":"SP_MXT","value":"SP_MXT","display":820},{"label":"SP_PARAM_MXT","value":"SP_PARAM_MXT","display":830},{"label":"SP_PARAM_T_MXT","value":"SP_PARAM_T_MXT","display":840},{"label":"T90_ECL","value":"T90_ECL","display":850},{"label":"T90_GRM","value":"T90_GRM","display":860},{"label":"TT_ECL","value":"TT_ECL","display":870},{"label":"TT_GRM","value":"TT_GRM","display":880},{"label":"UPLIM_GFT_i","value":"UPLIM_GFT_i","display":890},{"label":"UPLIM_GWAC","value":"UPLIM_GWAC","display":900},{"label":"UPLIM_VT_B","value":"UPLIM_VT_B","display":910},{"label":"UPLIM_VT_R","value":"UPLIM_VT_R","display":920},{"label":"ECL-SKY-IMA","value":"ECL-SKY-IMA","display":82},{"label":"ECL-SOP-IMA","value":"ECL-SOP-IMA","display":84},{"label":"OBATT_VT","value":"OBATT_VT","display":332},{"label":"OBFIND_VT","value":"OBFIND_VT","display":334},{"label":"OBIM1B_VT","value":"OBIM1B_VT","display":336},{"label":"OBIM1R_VT","value":"OBIM1R_VT","display":338},{"label":"QIM1B_VT","value":"QIM1B_VT","display":554},{"label":"QIM1R_VT","value":"QIM1R_VT","display":556},{"label":"MXT-EVT-CAL","value":"MXT-EVT-CAL","display":315},{"label":"LAMTEST_DC1","value":"LAMTEST_DC1","display":5},{"label":"LAMTEST","value":"LAMTEST","display":4}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/3
curl -d '{"id":4,"name":"filename","table_name":"public.v_products","label":"filename","form_label":"Product URL","description":null,"output_display":40,"criteria_display":40,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"link", "renderer_config": {"href": "$value", "display": "text", "text": "$value", "icon": "fas fa-link", "blank": true}, "display_detail":40,"selected":true,"order_by":false,"order_display":40,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/4
curl -d '{"id":5,"name":"criteria","table_name":"public.v_products","label":"criteria","form_label":"Criteria","description":null,"output_display":50,"criteria_display":50,"search_flag":null,"search_type":"svom-json-kw","type":"json","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"json","display_detail":50,"selected":true,"order_by":false,"order_display":50,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/5
curl -d '{"id":6,"name":"added_at","table_name":"public.v_products","label":"added_at","form_label":"Added at","description":null,"output_display":60,"criteria_display":60,"search_flag":null,"search_type":"date","type":"datetime","operator":"gt","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":60,"selected":true,"order_by":false,"order_display":60,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":4,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/6
curl -d '{"id":7,"name":"version","table_name":"public.v_products","label":"version","form_label":"Version","description":null,"output_display":70,"criteria_display":70,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":70,"selected":true,"order_by":false,"order_display":70,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/7
curl -d '{"id":8,"name":"program","table_name":"public.v_products","label":"program","form_label":"Program","description":null,"output_display":80,"criteria_display":80,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":80,"selected":true,"order_by":false,"order_display":80,"detail":false,"renderer_detail":null,"options":[{"label":"GP","value":"GP","display":10},{"label":"CP","value":"CP","display":20}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/8
curl -d '{"id":9,"name":"instrument","table_name":"public.v_products","label":"instrument","form_label":"Instrument","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":[{"label":"GFT","value":"GFT","display":10},{"label":"MXT","value":"MXT","display":20},{"label":"GWAC","value":"GWAC","display":30},{"label":"VT","value":"VT","display":40},{"label":"GRM","value":"GRM","display":50},{"label":"ECL","value":"ECL","display":60},{"label":"ECLGRM","value":"ECLGRM","display":70},{"label":"ALL","value":"ALL","display":80}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/9
curl -d '{"id":10,"name":"type","table_name":"public.v_products","label":"type","form_label":"Type","description":null,"output_display":100,"criteria_display":100,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":100,"selected":true,"order_by":false,"order_display":100,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":3}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/products/attribute/10
# Add SVOM sp_cards criteria family, default output family and default output category
curl -d '{"label":"Card","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/sp_cards/criteria-family
curl -d '{"label":"Default","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/sp_cards/output-family
curl -d '{"label":"Default","display":10}' -H "Content-Type: application/json" -X POST http://localhost/output-family/4/output-category
curl -d '{"label":"Card","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/sp_cards/criteria-family
curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/sp_cards/output-family
curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/output-family/4/output-category
# Edit SVOM sp_cards attributes
curl -d '{"id":1,"name":"acronym","table_name":"sp_cards","label":"acronym","form_label":"Product Acronym","description":null,"output_display":10,"criteria_display":10,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"options":[{"label":"AV_AG_HOST","value":"AV_AG_HOST","display":10},{"label":"AV_AG_LOC","value":"AV_AG_LOC","display":20},{"label":"CLASS_EARLY","value":"CLASS_EARLY","display":30},{"label":"CRCLASS","value":"CRCLASS","display":40},{"label":"DT_GFT_i","value":"DT_GFT_i","display":50},{"label":"DT_GWAC","value":"DT_GWAC","display":60},{"label":"DT_MXT","value":"DT_MXT","display":70},{"label":"DT_VT","value":"DT_VT","display":80},{"label":"FDCHART_GWAC","value":"FDCHART_GWAC","display":90},{"label":"FDCHART_VT_B","value":"FDCHART_VT_B","display":100},{"label":"FDCHART_VT_R","value":"FDCHART_VT_R","display":110},{"label":"FLUENCE_ECL","value":"FLUENCE_ECL","display":120},{"label":"FLUENCE_ECLGRM","value":"FLUENCE_ECLGRM","display":130},{"label":"FLUENCE_GRM","value":"FLUENCE_GRM","display":140},{"label":"HR_ECL","value":"HR_ECL","display":150},{"label":"HR_ECLGRM","value":"HR_ECLGRM","display":160},{"label":"HR_GRM","value":"HR_GRM","display":170},{"label":"LAG_ECL","value":"LAG_ECL","display":180},{"label":"LAG_ECLGRM","value":"LAG_ECLGRM","display":190},{"label":"LAG_GRM","value":"LAG_GRM","display":200},{"label":"LC_ECL","value":"LC_ECL","display":210},{"label":"LC_GFT_i","value":"LC_GFT_i","display":220},{"label":"LC_GRM","value":"LC_GRM","display":230},{"label":"LC_GWAC","value":"LC_GWAC","display":240},{"label":"LC_MXT_i","value":"LC_MXT_i","display":250},{"label":"LC_PARAM_GFT","value":"LC_PARAM_GFT","display":260},{"label":"LC_PARAM_MXT","value":"LC_PARAM_MXT","display":270},{"label":"LC_PARAM_VT_B","value":"LC_PARAM_VT_B","display":280},{"label":"LC_PARAM_VT_R","value":"LC_PARAM_VT_R","display":290},{"label":"LC_VT_B","value":"LC_VT_B","display":300},{"label":"LC_VT_R","value":"LC_VT_R","display":310},{"label":"NH_HOST","value":"NH_HOST","display":320},{"label":"NH_LOC","value":"NH_LOC","display":330},{"label":"OBLC_ECL","value":"OBLC_ECL","display":340},{"label":"OBLC_GRM","value":"OBLC_GRM","display":350},{"label":"PF_ECL","value":"PF_ECL","display":360},{"label":"PF_GRM","value":"PF_GRM","display":370},{"label":"PF_GWAC","value":"PF_GWAC","display":380},{"label":"PHZ","value":"PHZ","display":390},{"label":"PO_ECL","value":"PO_ECL","display":400},{"label":"PO_GFT","value":"PO_GFT","display":410},{"label":"PO_GRM","value":"PO_GRM","display":420},{"label":"PO_GWAC","value":"PO_GWAC","display":430},{"label":"PO_MXT","value":"PO_MXT","display":440},{"label":"PO_VT","value":"PO_VT","display":450},{"label":"QCL_ECL","value":"QCL_ECL","display":460},{"label":"QCL_GRM","value":"QCL_GRM","display":470},{"label":"QF_GFT_i","value":"QF_GFT_i","display":480},{"label":"QF_GWAC","value":"QF_GWAC","display":490},{"label":"QF_MXT","value":"QF_MXT","display":500},{"label":"QF_VT_B","value":"QF_VT_B","display":510},{"label":"QF_VT_R","value":"QF_VT_R","display":520},{"label":"QHR_ECL","value":"QHR_ECL","display":530},{"label":"QHR_ECLGRM","value":"QHR_ECLGRM","display":540},{"label":"QHR_GRM","value":"QHR_GRM","display":550},{"label":"QLC_ECL","value":"QLC_ECL","display":560},{"label":"QLC_GFT_i","value":"QLC_GFT_i","display":570},{"label":"QLC_GRM","value":"QLC_GRM","display":580},{"label":"QLC_GWAC","value":"QLC_GWAC","display":590},{"label":"QLC_MXT","value":"QLC_MXT","display":600},{"label":"QLC_VT_B","value":"QLC_VT_B","display":610},{"label":"QLC_VT_R","value":"QLC_VT_R","display":620},{"label":"QPF_ECL","value":"QPF_ECL","display":630},{"label":"QPF_GRM","value":"QPF_GRM","display":640},{"label":"QPO_ECL","value":"QPO_ECL","display":650},{"label":"QPO_GRM","value":"QPO_GRM","display":660},{"label":"QPO_GWAC","value":"QPO_GWAC","display":670},{"label":"QPO_MXT","value":"QPO_MXT","display":680},{"label":"QPO_VT","value":"QPO_VT","display":690},{"label":"QSP_GRM","value":"QSP_GRM","display":700},{"label":"QSRCLIST_VT","value":"QSRCLIST_VT","display":710},{"label":"QT90_ECL","value":"QT90_ECL","display":720},{"label":"QT90_GRM","value":"QT90_GRM","display":730},{"label":"QTI_GFT_i","value":"QTI_GFT_i","display":740},{"label":"QTI_MXT","value":"QTI_MXT","display":750},{"label":"QTI_VT_B","value":"QTI_VT_B","display":760},{"label":"QTI_VT_R","value":"QTI_VT_R","display":770},{"label":"QUPLIM_GWAC","value":"QUPLIM_GWAC","display":780},{"label":"SP_ECL","value":"SP_ECL","display":790},{"label":"SP_ECLGRM","value":"SP_ECLGRM","display":800},{"label":"SP_GRM","value":"SP_GRM","display":810},{"label":"SP_MXT","value":"SP_MXT","display":820},{"label":"SP_PARAM_MXT","value":"SP_PARAM_MXT","display":830},{"label":"SP_PARAM_T_MXT","value":"SP_PARAM_T_MXT","display":840},{"label":"T90_ECL","value":"T90_ECL","display":850},{"label":"T90_GRM","value":"T90_GRM","display":860},{"label":"TT_ECL","value":"TT_ECL","display":870},{"label":"TT_GRM","value":"TT_GRM","display":880},{"label":"UPLIM_GFT_i","value":"UPLIM_GFT_i","display":890},{"label":"UPLIM_GWAC","value":"UPLIM_GWAC","display":900},{"label":"UPLIM_VT_B","value":"UPLIM_VT_B","display":910},{"label":"UPLIM_VT_R","value":"UPLIM_VT_R","display":920},{"label":"ECL-SKY-IMA","value":"ECL-SKY-IMA","display":82},{"label":"ECL-SOP-IMA","value":"ECL-SOP-IMA","display":84},{"label":"OBATT_VT","value":"OBATT_VT","display":332},{"label":"OBFIND_VT","value":"OBFIND_VT","display":334},{"label":"OBIM1B_VT","value":"OBIM1B_VT","display":336},{"label":"OBIM1R_VT","value":"OBIM1R_VT","display":338},{"label":"QIM1B_VT","value":"QIM1B_VT","display":554},{"label":"QIM1R_VT","value":"QIM1R_VT","display":556},{"label":"MXT-EVT-CAL","value":"MXT-EVT-CAL","display":315},{"label":"LAMTEST_DC1","value":"LAMTEST_DC1","display":5},{"label":"LAMTEST","value":"LAMTEST","display":4}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":4}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/sp_cards/attribute/1
curl -d '{"id":2,"name":"sp_id","table_name":"sp_cards","label":"sp_id","form_label":"SP IAP ID","description":null,"output_display":20,"criteria_display":20,"search_flag":"ID","search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":"http://svom.iap.fr/fiches/view_fiche.php?fiche=","renderer":"link","renderer_config": {"href": "$value", "display": "text", "text": "$value", "icon": "fas fa-link", "blank": true}, "display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/sp_cards/attribute/2
curl -d '{"id":3,"name":"version","table_name":"sp_cards","label":"version","form_label":"Version","description":null,"output_display":30,"criteria_display":30,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/sp_cards/attribute/3
curl -d '{"id":4,"name":"program","table_name":"sp_cards","label":"program","form_label":"Program","description":null,"output_display":40,"criteria_display":40,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":40,"selected":true,"order_by":false,"order_display":40,"detail":false,"renderer_detail":null,"options":[{"label":"GP","value":"GP","display":10},{"label":"CP","value":"CP","display":20}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":4}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/sp_cards/attribute/4
curl -d '{"id":5,"name":"instrument","table_name":"sp_cards","label":"instrument","form_label":"Instrument","description":null,"output_display":50,"criteria_display":50,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":50,"selected":true,"order_by":false,"order_display":50,"detail":false,"renderer_detail":null,"options":[{"label":"GFT","value":"GFT","display":10},{"label":"MXT","value":"MXT","display":20},{"label":"GWAC","value":"GWAC","display":30},{"label":"VT","value":"VT","display":40},{"label":"GRM","value":"GRM","display":50},{"label":"ECL","value":"ECL","display":60},{"label":"NONE","value":"NONE","display":80},{"label":"ECLGRM","value":"ECLGRM","display":70}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":4}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/sp_cards/attribute/5
curl -d '{"id":6,"name":"type","table_name":"sp_cards","label":"type","form_label":"Type","description":null,"output_display":60,"criteria_display":60,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":60,"selected":true,"order_by":false,"order_display":60,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/sp_cards/attribute/6
curl -d '{"id":7,"name":"json_schema","table_name":"sp_cards","label":"json_schema","form_label":"JSON Schema (original)","description":null,"output_display":80,"criteria_display":80,"search_flag":null,"search_type":null,"type":"json","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"json","display_detail":80,"selected":true,"order_by":false,"order_display":80,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/sp_cards/attribute/7
curl -d '{"id":8,"name":"search_kw","table_name":"sp_cards","label":"search_kw","form_label":"KWs searchable","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":null,"type":"json","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"json","display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/sp_cards/attribute/8
curl -d '{"id":9,"name":"json_schema_uploaded","table_name":"sp_cards","label":"json_schema_uploaded","form_label":"json_schema_uploaded","description":null,"output_display":70,"criteria_display":70,"search_flag":null,"search_type":null,"type":"json","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":70,"selected":true,"order_by":false,"order_display":70,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":null}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/sp_cards/attribute/9
curl -d '{"id":1,"name":"acronym","table_name":"sp_cards","label":"acronym","form_label":"Product Acronym","description":null,"output_display":10,"criteria_display":10,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"options":[{"label":"AV_AG_HOST","value":"AV_AG_HOST","display":10},{"label":"AV_AG_LOC","value":"AV_AG_LOC","display":20},{"label":"CLASS_EARLY","value":"CLASS_EARLY","display":30},{"label":"CRCLASS","value":"CRCLASS","display":40},{"label":"DT_GFT_i","value":"DT_GFT_i","display":50},{"label":"DT_GWAC","value":"DT_GWAC","display":60},{"label":"DT_MXT","value":"DT_MXT","display":70},{"label":"DT_VT","value":"DT_VT","display":80},{"label":"FDCHART_GWAC","value":"FDCHART_GWAC","display":90},{"label":"FDCHART_VT_B","value":"FDCHART_VT_B","display":100},{"label":"FDCHART_VT_R","value":"FDCHART_VT_R","display":110},{"label":"FLUENCE_ECL","value":"FLUENCE_ECL","display":120},{"label":"FLUENCE_ECLGRM","value":"FLUENCE_ECLGRM","display":130},{"label":"FLUENCE_GRM","value":"FLUENCE_GRM","display":140},{"label":"HR_ECL","value":"HR_ECL","display":150},{"label":"HR_ECLGRM","value":"HR_ECLGRM","display":160},{"label":"HR_GRM","value":"HR_GRM","display":170},{"label":"LAG_ECL","value":"LAG_ECL","display":180},{"label":"LAG_ECLGRM","value":"LAG_ECLGRM","display":190},{"label":"LAG_GRM","value":"LAG_GRM","display":200},{"label":"LC_ECL","value":"LC_ECL","display":210},{"label":"LC_GFT_i","value":"LC_GFT_i","display":220},{"label":"LC_GRM","value":"LC_GRM","display":230},{"label":"LC_GWAC","value":"LC_GWAC","display":240},{"label":"LC_MXT_i","value":"LC_MXT_i","display":250},{"label":"LC_PARAM_GFT","value":"LC_PARAM_GFT","display":260},{"label":"LC_PARAM_MXT","value":"LC_PARAM_MXT","display":270},{"label":"LC_PARAM_VT_B","value":"LC_PARAM_VT_B","display":280},{"label":"LC_PARAM_VT_R","value":"LC_PARAM_VT_R","display":290},{"label":"LC_VT_B","value":"LC_VT_B","display":300},{"label":"LC_VT_R","value":"LC_VT_R","display":310},{"label":"NH_HOST","value":"NH_HOST","display":320},{"label":"NH_LOC","value":"NH_LOC","display":330},{"label":"OBLC_ECL","value":"OBLC_ECL","display":340},{"label":"OBLC_GRM","value":"OBLC_GRM","display":350},{"label":"PF_ECL","value":"PF_ECL","display":360},{"label":"PF_GRM","value":"PF_GRM","display":370},{"label":"PF_GWAC","value":"PF_GWAC","display":380},{"label":"PHZ","value":"PHZ","display":390},{"label":"PO_ECL","value":"PO_ECL","display":400},{"label":"PO_GFT","value":"PO_GFT","display":410},{"label":"PO_GRM","value":"PO_GRM","display":420},{"label":"PO_GWAC","value":"PO_GWAC","display":430},{"label":"PO_MXT","value":"PO_MXT","display":440},{"label":"PO_VT","value":"PO_VT","display":450},{"label":"QCL_ECL","value":"QCL_ECL","display":460},{"label":"QCL_GRM","value":"QCL_GRM","display":470},{"label":"QF_GFT_i","value":"QF_GFT_i","display":480},{"label":"QF_GWAC","value":"QF_GWAC","display":490},{"label":"QF_MXT","value":"QF_MXT","display":500},{"label":"QF_VT_B","value":"QF_VT_B","display":510},{"label":"QF_VT_R","value":"QF_VT_R","display":520},{"label":"QHR_ECL","value":"QHR_ECL","display":530},{"label":"QHR_ECLGRM","value":"QHR_ECLGRM","display":540},{"label":"QHR_GRM","value":"QHR_GRM","display":550},{"label":"QLC_ECL","value":"QLC_ECL","display":560},{"label":"QLC_GFT_i","value":"QLC_GFT_i","display":570},{"label":"QLC_GRM","value":"QLC_GRM","display":580},{"label":"QLC_GWAC","value":"QLC_GWAC","display":590},{"label":"QLC_MXT","value":"QLC_MXT","display":600},{"label":"QLC_VT_B","value":"QLC_VT_B","display":610},{"label":"QLC_VT_R","value":"QLC_VT_R","display":620},{"label":"QPF_ECL","value":"QPF_ECL","display":630},{"label":"QPF_GRM","value":"QPF_GRM","display":640},{"label":"QPO_ECL","value":"QPO_ECL","display":650},{"label":"QPO_GRM","value":"QPO_GRM","display":660},{"label":"QPO_GWAC","value":"QPO_GWAC","display":670},{"label":"QPO_MXT","value":"QPO_MXT","display":680},{"label":"QPO_VT","value":"QPO_VT","display":690},{"label":"QSP_GRM","value":"QSP_GRM","display":700},{"label":"QSRCLIST_VT","value":"QSRCLIST_VT","display":710},{"label":"QT90_ECL","value":"QT90_ECL","display":720},{"label":"QT90_GRM","value":"QT90_GRM","display":730},{"label":"QTI_GFT_i","value":"QTI_GFT_i","display":740},{"label":"QTI_MXT","value":"QTI_MXT","display":750},{"label":"QTI_VT_B","value":"QTI_VT_B","display":760},{"label":"QTI_VT_R","value":"QTI_VT_R","display":770},{"label":"QUPLIM_GWAC","value":"QUPLIM_GWAC","display":780},{"label":"SP_ECL","value":"SP_ECL","display":790},{"label":"SP_ECLGRM","value":"SP_ECLGRM","display":800},{"label":"SP_GRM","value":"SP_GRM","display":810},{"label":"SP_MXT","value":"SP_MXT","display":820},{"label":"SP_PARAM_MXT","value":"SP_PARAM_MXT","display":830},{"label":"SP_PARAM_T_MXT","value":"SP_PARAM_T_MXT","display":840},{"label":"T90_ECL","value":"T90_ECL","display":850},{"label":"T90_GRM","value":"T90_GRM","display":860},{"label":"TT_ECL","value":"TT_ECL","display":870},{"label":"TT_GRM","value":"TT_GRM","display":880},{"label":"UPLIM_GFT_i","value":"UPLIM_GFT_i","display":890},{"label":"UPLIM_GWAC","value":"UPLIM_GWAC","display":900},{"label":"UPLIM_VT_B","value":"UPLIM_VT_B","display":910},{"label":"UPLIM_VT_R","value":"UPLIM_VT_R","display":920},{"label":"ECL-SKY-IMA","value":"ECL-SKY-IMA","display":82},{"label":"ECL-SOP-IMA","value":"ECL-SOP-IMA","display":84},{"label":"OBATT_VT","value":"OBATT_VT","display":332},{"label":"OBFIND_VT","value":"OBFIND_VT","display":334},{"label":"OBIM1B_VT","value":"OBIM1B_VT","display":336},{"label":"OBIM1R_VT","value":"OBIM1R_VT","display":338},{"label":"QIM1B_VT","value":"QIM1B_VT","display":554},{"label":"QIM1R_VT","value":"QIM1R_VT","display":556},{"label":"MXT-EVT-CAL","value":"MXT-EVT-CAL","display":315},{"label":"LAMTEST_DC1","value":"LAMTEST_DC1","display":5},{"label":"LAMTEST","value":"LAMTEST","display":4}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":4}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/sp_cards/attribute/1
curl -d '{"id":2,"name":"sp_id","table_name":"sp_cards","label":"sp_id","form_label":"SP IAP ID","description":null,"output_display":20,"criteria_display":20,"search_flag":"ID","search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":"http://svom.iap.fr/fiches/view_fiche.php?fiche=","renderer":"link","renderer_config": {"href": "$value", "display": "text", "text": "$value", "icon": "fas fa-link", "blank": true}, "display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/sp_cards/attribute/2
curl -d '{"id":3,"name":"version","table_name":"sp_cards","label":"version","form_label":"Version","description":null,"output_display":30,"criteria_display":30,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/sp_cards/attribute/3
curl -d '{"id":4,"name":"program","table_name":"sp_cards","label":"program","form_label":"Program","description":null,"output_display":40,"criteria_display":40,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":40,"selected":true,"order_by":false,"order_display":40,"detail":false,"renderer_detail":null,"options":[{"label":"GP","value":"GP","display":10},{"label":"CP","value":"CP","display":20}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":4}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/sp_cards/attribute/4
curl -d '{"id":5,"name":"instrument","table_name":"sp_cards","label":"instrument","form_label":"Instrument","description":null,"output_display":50,"criteria_display":50,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":50,"selected":true,"order_by":false,"order_display":50,"detail":false,"renderer_detail":null,"options":[{"label":"GFT","value":"GFT","display":10},{"label":"MXT","value":"MXT","display":20},{"label":"GWAC","value":"GWAC","display":30},{"label":"VT","value":"VT","display":40},{"label":"GRM","value":"GRM","display":50},{"label":"ECL","value":"ECL","display":60},{"label":"NONE","value":"NONE","display":80},{"label":"ECLGRM","value":"ECLGRM","display":70}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":4}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/sp_cards/attribute/5
curl -d '{"id":6,"name":"type","table_name":"sp_cards","label":"type","form_label":"Type","description":null,"output_display":60,"criteria_display":60,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":60,"selected":true,"order_by":false,"order_display":60,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/sp_cards/attribute/6
curl -d '{"id":7,"name":"json_schema","table_name":"sp_cards","label":"json_schema","form_label":"JSON Schema (original)","description":null,"output_display":80,"criteria_display":80,"search_flag":null,"search_type":null,"type":"json","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"json","display_detail":80,"selected":true,"order_by":false,"order_display":80,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/sp_cards/attribute/7
curl -d '{"id":8,"name":"search_kw","table_name":"sp_cards","label":"search_kw","form_label":"KWs searchable","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":null,"type":"json","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"json","display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/sp_cards/attribute/8
curl -d '{"id":9,"name":"json_schema_uploaded","table_name":"sp_cards","label":"json_schema_uploaded","form_label":"json_schema_uploaded","description":null,"output_display":70,"criteria_display":70,"search_flag":null,"search_type":null,"type":"json","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":70,"selected":true,"order_by":false,"order_display":70,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":null}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/sp_cards/attribute/9
# Add COLIBRI dataset family and COLIBRI dataset
curl -d '{"label":"Colibri dataset family","display":30}' -H "Content-Type: application/json" -X POST http://localhost/instance/default/dataset-family
curl -d '{"name":"anis_observation","table_ref":"anis_observation","label":"COLIBRI OBS","description":"colibri observations","display":10,"count":0,"vo":true,"data_path":"/mnt/mount","config":{"cone_search":{"enabled":true,"column_ra":2,"column_dec":3},"selectable_row":true},"public":true,"project_name":"colibri"}' -H "Content-Type: application/json" -X POST http://localhost/dataset-family/3/dataset
curl -d '{"label":"Colibri dataset family","display":30}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/instance/default/dataset-family
curl -d '{"name":"anis_observation","table_ref":"anis_observation","label":"COLIBRI OBS","description":"colibri observations","display":10,"count":0,"vo":true,"data_path":"/mnt/mount","config":{"cone_search":{"enabled":true,"column_ra":2,"column_dec":3},"selectable_row":true},"public":true,"project_name":"colibri"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset-family/3/dataset
# Add COLIBRI anis_observation default criteria family, output families and output categories
curl -d '{"label":"Default criteria family","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/anis_observation/criteria-family
curl -d '{"label":"Default parameters","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/anis_observation/output-family
curl -d '{"label":"Astrometry","display":10}' -H "Content-Type: application/json" -X POST http://localhost/output-family/5/output-category
curl -d '{"label":"Observation","display":20}' -H "Content-Type: application/json" -X POST http://localhost/output-family/5/output-category
curl -d '{"label":"Additionnal parameters","display":20}' -H "Content-Type: application/json" -X POST http://localhost/dataset/anis_observation/output-family
curl -d '{"label":"Download","display":10}' -H "Content-Type: application/json" -X POST http://localhost/output-family/6/output-category
curl -d '{"label":"Default criteria family","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/anis_observation/criteria-family
curl -d '{"label":"Default parameters","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/anis_observation/output-family
curl -d '{"label":"Astrometry","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/output-family/5/output-category
curl -d '{"label":"Observation","display":20}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/output-family/5/output-category
curl -d '{"label":"Additionnal parameters","display":20}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/anis_observation/output-family
curl -d '{"label":"Download","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/output-family/6/output-category
# Edit COLIBRI anis_observation attributes
curl -d '{"id":1,"name":"id","table_name":"anis_observation","label":"id_obs","form_label":"ID_OBS","description":"Observation Ident","output_display":10,"criteria_display":10,"search_flag":"ID","search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":5}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/1
curl -d '{"id":2,"name":"ra","table_name":"anis_observation","label":"ra","form_label":"Alpha J2000","description":"Alpha J2000","output_display":20,"criteria_display":20,"search_flag":"RA","search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":5}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/2
curl -d '{"id":3,"name":"dec","table_name":"anis_observation","label":"dec","form_label":"Delta J2000","description":"Delta J2000","output_display":30,"criteria_display":30,"search_flag":"DEC","search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":5}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/3
curl -d '{"id":4,"name":"date_time","table_name":"anis_observation","label":"date_time","form_label":"Date Time","description":"Date Time","output_display":40,"criteria_display":40,"search_flag":null,"search_type":"between-date","type":"datetime","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":40,"selected":true,"order_by":false,"order_display":40,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":7,"id_output_category":6}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/4
curl -d '{"id":5,"name":"exposure_time","table_name":"anis_observation","label":"exposure_time","form_label":"Exposure Time","description":"Exposure Time","output_display":50,"criteria_display":50,"search_flag":null,"search_type":"between","type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":50,"selected":true,"order_by":false,"order_display":50,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":7,"id_output_category":6}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/5
curl -d '{"id":6,"name":"filter","table_name":"anis_observation","label":"filter","form_label":"Filter","description":"Filter","output_display":60,"criteria_display":60,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":60,"selected":true,"order_by":false,"order_display":60,"detail":false,"renderer_detail":null,"options":[{"label":"Filter 1","value":"filter1","display":10},{"label":"Filter 2","value":"filter2","display":20}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":7,"id_output_category":6}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/6
curl -d '{"id":7,"name":"object_name","table_name":"anis_observation","label":"object_name","form_label":"Object name","description":"Object name","output_display":70,"criteria_display":70,"search_flag":"NAME","search_type":"field","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":"link/detail?dataset=anis_observation&other=","renderer":"detail-btn","display_detail":70,"selected":true,"order_by":false,"order_display":70,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":7,"id_output_category":6}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/7
curl -d '{"id":8,"name":"fits_file","table_name":"anis_observation","label":"obs_fits","form_label":"Observation (fits)","description":"Observation (fits)","output_display":80,"criteria_display":80,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":80,"selected":false,"order_by":false,"order_display":80,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/8
curl -d '{"id":9,"name":"png_file","table_name":"anis_observation","label":"png_file","form_label":"Observation (png)","description":"Observation (png)","output_display":90,"criteria_display":90,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"thumbnail","display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":6}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/9
curl -d '{"id":10,"name":"observer","table_name":"anis_observation","label":"observer","form_label":"Observer","description":"Observer","output_display":100,"criteria_display":100,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":100,"selected":true,"order_by":false,"order_display":100,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":null}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/10
curl -d '{"id":11,"name":"pack_obs","table_name":"anis_observation","label":"pack_obs","form_label":"Observation archive (zip)","description":"Observation archive (zip)","output_display":110,"criteria_display":110,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":110,"selected":false,"order_by":false,"order_display":110,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/11
curl -d '{"id":12,"name":"readme_obs","table_name":"anis_observation","label":"readme_obs","form_label":"Observation Readme (zip)","description":"Observation Readme (zip)","output_display":120,"criteria_display":120,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":120,"selected":false,"order_by":false,"order_display":120,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/12
curl -d '{"id":13,"name":"pack_calib","table_name":"anis_observation","label":"pack_calib","form_label":"Calibration archive (zip)","description":"Calibration archive (zip)","output_display":130,"criteria_display":130,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":130,"selected":false,"order_by":false,"order_display":130,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/13
curl -d '{"id":14,"name":"readme_calib","table_name":"anis_observation","label":"readme_calib","form_label":"Calibration Readme (zip)","description":"Calibration Readme (zip)","output_display":140,"criteria_display":140,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":140,"selected":false,"order_by":false,"order_display":140,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/anis_observation/attribute/14
curl -d '{"id":1,"name":"id","table_name":"anis_observation","label":"id_obs","form_label":"ID_OBS","description":"Observation Ident","output_display":10,"criteria_display":10,"search_flag":"ID","search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":5}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/1
curl -d '{"id":2,"name":"ra","table_name":"anis_observation","label":"ra","form_label":"Alpha J2000","description":"Alpha J2000","output_display":20,"criteria_display":20,"search_flag":"RA","search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":5}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/2
curl -d '{"id":3,"name":"dec","table_name":"anis_observation","label":"dec","form_label":"Delta J2000","description":"Delta J2000","output_display":30,"criteria_display":30,"search_flag":"DEC","search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":5}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/3
curl -d '{"id":4,"name":"date_time","table_name":"anis_observation","label":"date_time","form_label":"Date Time","description":"Date Time","output_display":40,"criteria_display":40,"search_flag":null,"search_type":"between-date","type":"datetime","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":40,"selected":true,"order_by":false,"order_display":40,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":7,"id_output_category":6}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/4
curl -d '{"id":5,"name":"exposure_time","table_name":"anis_observation","label":"exposure_time","form_label":"Exposure Time","description":"Exposure Time","output_display":50,"criteria_display":50,"search_flag":null,"search_type":"between","type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":50,"selected":true,"order_by":false,"order_display":50,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":7,"id_output_category":6}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/5
curl -d '{"id":6,"name":"filter","table_name":"anis_observation","label":"filter","form_label":"Filter","description":"Filter","output_display":60,"criteria_display":60,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":60,"selected":true,"order_by":false,"order_display":60,"detail":false,"renderer_detail":null,"options":[{"label":"Filter 1","value":"filter1","display":10},{"label":"Filter 2","value":"filter2","display":20}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":7,"id_output_category":6}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/6
curl -d '{"id":7,"name":"object_name","table_name":"anis_observation","label":"object_name","form_label":"Object name","description":"Object name","output_display":70,"criteria_display":70,"search_flag":"NAME","search_type":"field","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":"link/detail?dataset=anis_observation&other=","renderer":"detail-btn","display_detail":70,"selected":true,"order_by":false,"order_display":70,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":7,"id_output_category":6}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/7
curl -d '{"id":8,"name":"fits_file","table_name":"anis_observation","label":"obs_fits","form_label":"Observation (fits)","description":"Observation (fits)","output_display":80,"criteria_display":80,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":80,"selected":false,"order_by":false,"order_display":80,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/8
curl -d '{"id":9,"name":"png_file","table_name":"anis_observation","label":"png_file","form_label":"Observation (png)","description":"Observation (png)","output_display":90,"criteria_display":90,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"thumbnail","display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":6}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/9
curl -d '{"id":10,"name":"observer","table_name":"anis_observation","label":"observer","form_label":"Observer","description":"Observer","output_display":100,"criteria_display":100,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":null,"display_detail":100,"selected":true,"order_by":false,"order_display":100,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":null}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/10
curl -d '{"id":11,"name":"pack_obs","table_name":"anis_observation","label":"pack_obs","form_label":"Observation archive (zip)","description":"Observation archive (zip)","output_display":110,"criteria_display":110,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":110,"selected":false,"order_by":false,"order_display":110,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/11
curl -d '{"id":12,"name":"readme_obs","table_name":"anis_observation","label":"readme_obs","form_label":"Observation Readme (zip)","description":"Observation Readme (zip)","output_display":120,"criteria_display":120,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":120,"selected":false,"order_by":false,"order_display":120,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/12
curl -d '{"id":13,"name":"pack_calib","table_name":"anis_observation","label":"pack_calib","form_label":"Calibration archive (zip)","description":"Calibration archive (zip)","output_display":130,"criteria_display":130,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":130,"selected":false,"order_by":false,"order_display":130,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/13
curl -d '{"id":14,"name":"readme_calib","table_name":"anis_observation","label":"readme_calib","form_label":"Calibration Readme (zip)","description":"Calibration Readme (zip)","output_display":140,"criteria_display":140,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"uri_action":null,"renderer":"download","display_detail":140,"selected":false,"order_by":false,"order_display":140,"detail":false,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/anis_observation/attribute/14
# Add ANIS vipers_dr2_w1 default criteria family, default output family and default output category
curl -d '{"label":"Default criteria family","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/vipers_dr2_w1/criteria-family
curl -d '{"label":"Default output family","display":10}' -H "Content-Type: application/json" -X POST http://localhost/dataset/vipers_dr2_w1/output-family
curl -d '{"label":"Default output category","display":10}' -H "Content-Type: application/json" -X POST http://localhost/output-family/7/output-category
curl -d '{"label":"Default criteria family","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/vipers_dr2_w1/criteria-family
curl -d '{"label":"Default output family","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/dataset/vipers_dr2_w1/output-family
curl -d '{"label":"Default output category","display":10}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/output-family/7/output-category
# Edit ANIS vipers_dr2_w1 attributes
curl -d '{"id":1,"name":"num","table_name":"aspic_vipers_dr2_w1","label":"num","form_label":"num","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"list","type":"decimal","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"detail","renderer_config":{"display":"text-button","blank":"false"},"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":8,"id_output_category":8}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/1
curl -d '{"id":2,"name":"alpha","table_name":"aspic_vipers_dr2_w1","label":"alpha","form_label":"alpha","description":null,"output_display":20,"criteria_display":20,"search_flag":"RA","search_type":null,"type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/2
curl -d '{"id":3,"name":"delta","table_name":"aspic_vipers_dr2_w1","label":"delta","form_label":"delta","description":null,"output_display":30,"criteria_display":30,"search_flag":"DEC","search_type":null,"type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/3
curl -d '{"id":8,"name":"zspec","table_name":"aspic_vipers_dr2_w1","label":"zspec","form_label":"zspec","description":null,"output_display":80,"criteria_display":80,"search_flag":"Z","search_type":"between","type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":80,"selected":true,"order_by":false,"order_display":80,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":8,"id_output_category":8}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/8
curl -d '{"id":9,"name":"zflg","table_name":"aspic_vipers_dr2_w1","label":"zflg","form_label":"zflg","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":"select","type":"decimal","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":[{"label":"1","value":"1","display":10},{"label":"2","value":"2","display":20},{"label":"3","value":"3","display":30},{"label":"4","value":"4","display":40},{"label":"9","value":"9","display":50},{"label":"12","value":"12","display":60},{"label":"19","value":"19","display":70},{"label":"21","value":"21","display":80},{"label":"23","value":"23","display":90}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":8,"id_output_category":null}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/9
curl -d '{"id":56,"name":"spec1d","table_name":"aspic_vipers_dr2_w1","label":"spec1d","form_label":"spec1d","description":null,"output_display":560,"criteria_display":560,"search_flag":"SPECTRUM_1D","search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"download","renderer_config":{"display":"icon-button","text":"DOWNLOAD","icon":"fas fa-download"},"display_detail":560,"selected":true,"order_by":false,"order_display":560,"detail":true,"renderer_detail":"spectra_graph","options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/56
curl -d '{"id":57,"name":"spec1dnoise","table_name":"aspic_vipers_dr2_w1","label":"spec1dnoise","form_label":"spec1dnoise","description":null,"output_display":570,"criteria_display":570,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"download","renderer_config":{"display":"icon-button","text":"DOWNLOAD","icon":"fas fa-download"},"display_detail":570,"selected":true,"order_by":false,"order_display":570,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/57
curl -d '{"id":58,"name":"spec1dsky","table_name":"aspic_vipers_dr2_w1","label":"spec1dsky","form_label":"spec1dsky","description":null,"output_display":580,"criteria_display":580,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"download","renderer_config":{"display":"icon-button","text":"DOWNLOAD","icon":"fas fa-download"},"display_detail":580,"selected":true,"order_by":false,"order_display":580,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' -H "Content-Type: application/json" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/58
# Add users
curl -d '{"email":"charles.degaulle@lam.fr"}' -H "Content-Type: application/json" -X POST http://localhost/user
curl -d '{"email":"georges.pompidou@lam.fr"}' -H "Content-Type: application/json" -X POST http://localhost/user
curl -d '{"id":1,"name":"num","table_name":"aspic_vipers_dr2_w1","label":"num","form_label":"num","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"list","type":"decimal","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"detail","renderer_config":{"display":"text-button","blank":"false"},"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":8,"id_output_category":8}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/1
curl -d '{"id":2,"name":"alpha","table_name":"aspic_vipers_dr2_w1","label":"alpha","form_label":"alpha","description":null,"output_display":20,"criteria_display":20,"search_flag":"RA","search_type":null,"type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/2
curl -d '{"id":3,"name":"delta","table_name":"aspic_vipers_dr2_w1","label":"delta","form_label":"delta","description":null,"output_display":30,"criteria_display":30,"search_flag":"DEC","search_type":null,"type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/3
curl -d '{"id":8,"name":"zspec","table_name":"aspic_vipers_dr2_w1","label":"zspec","form_label":"zspec","description":null,"output_display":80,"criteria_display":80,"search_flag":"Z","search_type":"between","type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":80,"selected":true,"order_by":false,"order_display":80,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":8,"id_output_category":8}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/8
curl -d '{"id":9,"name":"zflg","table_name":"aspic_vipers_dr2_w1","label":"zflg","form_label":"zflg","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":"select","type":"decimal","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"options":[{"label":"1","value":"1","display":10},{"label":"2","value":"2","display":20},{"label":"3","value":"3","display":30},{"label":"4","value":"4","display":40},{"label":"9","value":"9","display":50},{"label":"12","value":"12","display":60},{"label":"19","value":"19","display":70},{"label":"21","value":"21","display":80},{"label":"23","value":"23","display":90}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":8,"id_output_category":null}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/9
curl -d '{"id":56,"name":"spec1d","table_name":"aspic_vipers_dr2_w1","label":"spec1d","form_label":"spec1d","description":null,"output_display":560,"criteria_display":560,"search_flag":"SPECTRUM_1D","search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"download","renderer_config":{"display":"icon-button","text":"DOWNLOAD","icon":"fas fa-download"},"display_detail":560,"selected":true,"order_by":false,"order_display":560,"detail":true,"renderer_detail":"spectra_graph","options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/56
curl -d '{"id":57,"name":"spec1dnoise","table_name":"aspic_vipers_dr2_w1","label":"spec1dnoise","form_label":"spec1dnoise","description":null,"output_display":570,"criteria_display":570,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"download","renderer_config":{"display":"icon-button","text":"DOWNLOAD","icon":"fas fa-download"},"display_detail":570,"selected":true,"order_by":false,"order_display":570,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/57
curl -d '{"id":58,"name":"spec1dsky","table_name":"aspic_vipers_dr2_w1","label":"spec1dsky","form_label":"spec1dsky","description":null,"output_display":580,"criteria_display":580,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"download","renderer_config":{"display":"icon-button","text":"DOWNLOAD","icon":"fas fa-download"},"display_detail":580,"selected":true,"order_by":false,"order_display":580,"detail":true,"renderer_detail":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":8}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X PUT http://localhost/dataset/vipers_dr2_w1/attribute/58
# Add groups
curl -d '{"label":"SVOM","users":["charles.degaulle@lam.fr"],"datasets":["obs_cat","observations"]}' -H "Content-Type: application/json" -X POST http://localhost/group
curl -d '{"label":"ASPIC","users":[],"datasets":[]}' -H "Content-Type: application/json" -X POST http://localhost/group
curl -d '{"label":"SVOM","datasets":["obs_cat","observations"]}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/group
curl -d '{"label":"ASPIC","datasets":[]}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/group
#!/bin/sh
set -e
# Get Keycloak Admin token
admin_token=$(curl --location --request POST 'http://keycloak:8180/auth/realms/master/protocol/openid-connect/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'username=admin' --data-urlencode 'password=admin' --data-urlencode 'grant_type=password' --data-urlencode 'client_id=admin-cli' | jq -r '.access_token')
# Create cesamsi user
curl --location --request POST 'http://keycloak:8180/auth/admin/realms/anis/users' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" --data-raw '{"firstName":"cesam-si","lastName":"cesam-si", "email":"cesamsi@lam.fr", "enabled":"true", "emailVerified":"true", "credentials":[{"type":"password","value":"admin","temporary":false}]}'
# Get anis_admin role and id_user
anis_admin_role=$(curl --location --request GET 'http://keycloak:8180/auth/admin/realms/anis/roles/anis_admin' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token")
id_user=$(curl --location --request GET 'http://keycloak:8180/auth/admin/realms/anis/users' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" | jq -r '.[0]' | jq -r '.id')
# Add anis_admin role to cesamsi user
curl --location --request POST "http://keycloak:8180/auth/admin/realms/anis/users/${id_user}/role-mappings/realm" --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" --data-raw "[${anis_admin_role}]"
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAh4woW+Tg4L3iGG9osCLi
1TD6vX/fAqX3iMfe9hi+M269FcGCl/1+Ls4gwLs/TqqFpWmg3T3bLuShHkabeGi5
CKr8hrHJMPA0NjPHuH1RUL/QyQpPgKQkmKxyUH9i3hdQtB2REcVZBmB5+JRIcUeh
cTLkpOWrRz9cquv8R7N8xD6OpdLWSFItYnOrKlR4II6EQaY0PBDyNQElXIiqTMLt
aTbXVn1suzT0NUwDTIvcxKpqTCEyM3meuIFsc+ISjff12WY5rLWoadVZHLwkfe/9
7zF3UYPb3ddZkQ/W3jQXYYMVgMHOfskXjstqH9XPkez4ovJUHukPYKsvvWWqiDCo
rwIDAQAB
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqmfw644EhXO2QURqqnLucM0qS8iE7l1fgAF44HaE+8NKeM+VaWUmPM5j0hCN9ujcsP9XOynU7t4c06T70f7csrzLVd36EUw35Z5vdLL5gEloW4eOvZYCRhybJSB3ED8qFSn0SvO01GdhUkyzFhqkfjCg0HInnTn+2PPj0x2TNsjPYWJfl9Hf9HZHc0GEZrqjV688Vjo4QlSDzdc0kDg+E7esAQE8125eca1HI6pJXF/eDL+Lg32m7+P9NxO6h3Qppqov+iSSXLF9HO6RnunFRNQgtof0wye4RU4HP9+irPR85vvLMom4THILBD95B8FyHZ8VMBr7KjfKoo7Kt4VBYQIDAQAB
-----END PUBLIC KEY-----
......@@ -89,22 +89,10 @@ final class GroupAction extends AbstractAction
private function editGroup(Group $group, array $parsedBody): void
{
$group->setLabel($parsedBody['label']);
$group->setUsers($this->getUsers($parsedBody['users']));
$group->setDatasets($this->getDatasets($parsedBody['datasets']));
$this->em->flush();
}
private function getUsers(array $listOfUsersIds)
{
if (count($listOfUsersIds) < 1) {
return array();
}
$dql = 'SELECT u FROM App\Entity\User u WHERE u.id IN (' . implode(',', $listOfUsersIds) . ')';
$query = $this->em->createQuery($dql);
return $query->getResult();
}
private function getDatasets(array $listOfDatasetsNames)
{
if (count($listOfDatasetsNames) < 1) {
......
......@@ -71,7 +71,6 @@ final class GroupListAction extends AbstractAction
private function postGroup(array $parsedBody): Group
{
$group = new Group(
$this->getUsers($parsedBody['users']),
$this->getDatasets($parsedBody['datasets'])
);
$group->setLabel($parsedBody['label']);
......@@ -82,21 +81,6 @@ final class GroupListAction extends AbstractAction
return $group;
}
private function getUsers(array $listOfUsersEmails)
{
if (count($listOfUsersEmails) < 1) {
return array();
}
$in = implode(',', array_map(function ($u) {
return "'" . $u . "'";
}, $listOfUsersEmails));
$dql = 'SELECT u FROM App\Entity\User u WHERE u.email IN (' . $in . ')';
$query = $this->em->createQuery($dql);
return $query->getResult();
}
private function getDatasets(array $listOfDatasetsNames)
{
if (count($listOfDatasetsNames) < 1) {
......
......@@ -74,7 +74,8 @@ final class AuthorizationMiddleware implements MiddlewareInterface
// Validating token (verifying expiration date and issuer)
$data = new ValidationData();
$data->setIssuer($this->settings['issuer']);
// TODO: Ajouter une config pour vérifier ou non le issuer
// $data->setIssuer($this->settings['issuer']);
if (!$token->validate($data)) {
return (new NyholmResponse())->withStatus(401);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment