create-db.sh 81.8 KB
Newer Older
1
2
#!/bin/sh
set -e
3

4
5
6
# 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')

François Agneray's avatar
François Agneray committed
7
8
9
# Create the settings database (only tables)
./vendor/bin/doctrine orm:schema-tool:create

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Add settings for anis-admin GUI
curl -d '{"name":"search_flag","label":"Search flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/select
curl -d '{"name":"search_type","label":"Search Type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/select
curl -d '{"name":"operator","label":"Operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/select
curl -d '{"name":"renderer","label":"Renderer"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/select
curl -d '{"name":"renderer_detail","label":"Renderer detail"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/select

curl -d '{"label":"ID","value":"ID","display":10,"select_name":"search_flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"RA","value":"RA","display":20,"select_name":"search_flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"DEC","value":"DEC","display":30,"select_name":"search_flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Z","value":"Z","display":40,"select_name":"search_flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Z_FLAG","value":"Z_FLAG","display":50,"select_name":"search_flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"SPECTRUM_1D","value":"SPECTRUM_1D","display":60,"select_name":"search_flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"SPECTRUM_1D_NOISE","value":"SPECTRUM_1D_NOISE","display":70,"select_name":"search_flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"SPECTRUM_1D_SKY","value":"SPECTRUM_1D_SKY","display":80,"select_name":"search_flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"SPECTRUM_2D","value":"SPECTRUM_2D","display":90,"select_name":"search_flag"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option

curl -d '{"label":"Field","value":"field","display":10,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Between","value":"between","display":20,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Select","value":"select","display":30,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Select multiple","value":"select-multiple","display":40,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Datalist","value":"datalist","display":50,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"List","value":"list","display":60,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Radio","value":"radio","display":70,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Checkbox","value":"checkbox","display":80,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Between date","value":"between-date","display":90,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Date","value":"date","display":100,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Time","value":"time","display":110,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Date time","value":"date-time","display":120,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"JSON","value":"json","display":130,"select_name":"search_type"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option

curl -d '{"label":"=","value":"eq","display":10,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"≠","value":"neq","display":20,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":">","value":"gt","display":30,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":">=","value":"gte","display":40,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"<","value":"lt","display":50,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"<=","value":"lte","display":60,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"like","value":"lk","display":70,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"not like","value":"nlk","display":80,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"in","value":"in","display":90,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"not in","value":"nin","display":100,"select_name":"operator"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option

curl -d '{"label":"Detail page","value":"detail","display":10,"select_name":"renderer"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Download file","value":"download","display":20,"select_name":"renderer"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Link (file, web page...)","value":"link","display":30,"select_name":"renderer"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Display image (png, jpg...)","value":"image","display":40,"select_name":"renderer"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Display json","value":"json","display":50,"select_name":"renderer"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option

curl -d '{"label":"Image","value":"img","display":10,"select_name":"renderer_detail"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option
curl -d '{"label":"Spectra graph","value":"spectra_graph","display":20,"select_name":"renderer_detail"}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/option

Tifenn Guillas's avatar
Tifenn Guillas committed
61
# Add database
62
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
63

Tifenn Guillas's avatar
Tifenn Guillas committed
64
# Add default instance
65
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
François Agneray's avatar
François Agneray committed
66

Tifenn Guillas's avatar
Tifenn Guillas committed
67
# Add ANIS, SVOM and COLIBRI projects
68
69
70
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
Tifenn Guillas's avatar
Tifenn Guillas committed
71
72

# Add default dataset family and ANIS datasets
73
74
75
76
77
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
78

Tifenn Guillas's avatar
Tifenn Guillas committed
79
# Add ANIS obs_cat default criteria family, default output family and default output category
80
81
82
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
Tifenn Guillas's avatar
Tifenn Guillas committed
83
84

# Add SVOM dataset family and SVOM datasets
85
86
87
88
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
Tifenn Guillas's avatar
Tifenn Guillas committed
89
90

# Add SVOM l1 criteria families, default output family and default output category
91
92
93
94
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
Tifenn Guillas's avatar
Tifenn Guillas committed
95
96

# Edit SVOM l1 attributes
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
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
Tifenn Guillas's avatar
Tifenn Guillas committed
120
121

# Add SVOM products criteria families, default output family and default output category
122
123
124
125
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
Tifenn Guillas's avatar
Tifenn Guillas committed
126
127

# Edit SVOM products attributes
128
129
130
131
132
133
134
135
136
137
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
Tifenn Guillas's avatar
Tifenn Guillas committed
138
139

# Add SVOM sp_cards criteria family, default output family and default output category
140
141
142
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
Tifenn Guillas's avatar
Tifenn Guillas committed
143
144

# Edit SVOM sp_cards attributes
145
146
147
148
149
150
151
152
153
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
Tifenn Guillas's avatar
Tifenn Guillas committed
154

Tifenn Guillas's avatar
Tifenn Guillas committed
155
# Add COLIBRI dataset family and COLIBRI dataset
156
157
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
Tifenn Guillas's avatar
Tifenn Guillas committed
158
159

# Add COLIBRI anis_observation default criteria family, output families and output categories
160
161
162
163
164
165
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
Tifenn Guillas's avatar
Tifenn Guillas committed
166
167

# Edit COLIBRI anis_observation attributes
168
169
170
171
172
173
174
175
176
177
178
179
180
181
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
182
183

# Add ANIS vipers_dr2_w1 default criteria family, default output family and default output category
184
185
186
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
187
188

# Edit ANIS vipers_dr2_w1 attributes
189
190
191
192
193
194
195
196
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
197

198
# Add groups
199
200
curl -d '{"label":"SVOM","datasets":["obs_cat","observations"]}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/instance/default/group
curl -d '{"label":"ASPIC","datasets":[]}' --header 'Content-Type: application/json' --header "Authorization: Bearer $admin_token" -X POST http://localhost/instance/default/group