Skip to content

Commit

Permalink
RSPY-491 - fix CADIP Session OData queries
Browse files Browse the repository at this point in the history
  • Loading branch information
vprivat-ads committed Oct 29, 2024
1 parent 6fd21b6 commit cbf930a
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 92 deletions.
138 changes: 102 additions & 36 deletions services/cadip/config/cadip_ws_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ cadip:
free_text_search_operations:
$filter:
union: ' OR '
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- 'SessionID in {SessionIds}'
- 'SessionID in ({SessionIds})'
- 'SessionID eq {SessionID}'
- 'PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}'
- 'PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}'
Expand Down Expand Up @@ -189,10 +189,10 @@ ins:
free_text_search_operations:
$filter:
union: ' OR '
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- 'SessionID in {SessionIds}'
- 'SessionID in ({SessionIds})'
- 'SessionID eq {SessionID}'
- 'PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}'
- 'PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}'
Expand Down Expand Up @@ -288,10 +288,10 @@ mps:
free_text_search_operations:
$filter:
union: ' OR '
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- 'SessionID in {SessionIds}'
- 'SessionID in ({SessionIds})'
- 'SessionID eq {SessionID}'
- 'PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}'
- 'PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}'
Expand Down Expand Up @@ -387,10 +387,10 @@ mti:
free_text_search_operations:
$filter:
union: ' OR '
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- 'SessionID in {SessionIds}'
- 'SessionID in ({SessionIds})'
- 'SessionID eq {SessionID}'
- 'PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}'
- 'PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}'
Expand Down Expand Up @@ -486,10 +486,10 @@ nsg:
free_text_search_operations:
$filter:
union: ' OR '
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- 'SessionID in {SessionIds}'
- 'SessionID in ({SessionIds})'
- 'SessionID eq {SessionID}'
- 'PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}'
- 'PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}'
Expand Down Expand Up @@ -585,10 +585,10 @@ sgs:
free_text_search_operations:
$filter:
union: ' OR '
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- 'SessionID in {SessionIds}'
- 'SessionID in ({SessionIds})'
- 'SessionID eq {SessionID}'
- 'PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}'
- 'PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}'
Expand Down Expand Up @@ -632,7 +632,7 @@ cadip_session:
type: ODataV4Search
api_endpoint: "http://127.0.0.1:5000/Sessions"
need_auth: true
results_entry: responses | $
results_entry: $.value
metadata_mapping:
id:
- null
Expand Down Expand Up @@ -719,13 +719,13 @@ cadip_session:
free_text_search_operations:
$filter:
union: " OR "
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- "SessionId in {SessionIds}"
- "SessionId in ({SessionIds})"
- "SessionId eq {SessionId}"
- "Satellite eq {platform}"
- "Satellite in {platforms}"
- "Satellite in ({platforms})"
- "PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}"
- "PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}"

Expand All @@ -734,6 +734,17 @@ cadip_session:
next_page_url_tpl: "{url}?{search}&$top={items_per_page}&$expand=Files"
total_items_nb_key_path: "$.total"

sort:
sort_by_tpl: '&$orderby={sort_param} {sort_order}'
sort_param_mapping:
startTimeFromAscendingNode: DownlinkStart
completionTimeFromAscendingNode: DownlinkStop
publicationDate: PublicationDate
sort_order_mapping:
ascending: asc
descending: desc
max_sort_params: 1

download:
type: HTTPDownload
base_uri: "https://127.0.0.1:5000/Sessions"
Expand Down Expand Up @@ -767,7 +778,7 @@ ins_session:
type: ODataV4Search
api_endpoint: "http://127.0.0.1:5000/Sessions"
need_auth: true
results_entry: responses | $
results_entry: $.value
metadata_mapping:
id:
- null
Expand Down Expand Up @@ -854,13 +865,13 @@ ins_session:
free_text_search_operations:
$filter:
union: " OR "
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- "SessionId in {SessionIds}"
- "SessionId in ({SessionIds})"
- "SessionId eq {SessionId}"
- "Satellite eq {platform}"
- "Satellite in {platforms}"
- "Satellite in ({platforms})"
- "PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}"
- "PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}"

Expand All @@ -869,6 +880,17 @@ ins_session:
next_page_url_tpl: "{url}?{search}&$top={items_per_page}&$expand=Files"
total_items_nb_key_path: "$.total"

sort:
sort_by_tpl: '&$orderby={sort_param} {sort_order}'
sort_param_mapping:
startTimeFromAscendingNode: DownlinkStart
completionTimeFromAscendingNode: DownlinkStop
publicationDate: PublicationDate
sort_order_mapping:
ascending: asc
descending: desc
max_sort_params: 1

download:
type: HTTPDownload
base_uri: "https://127.0.0.1:5100/Sessions"
Expand Down Expand Up @@ -902,7 +924,7 @@ mps_session:
type: ODataV4Search
api_endpoint: "http://127.0.0.1:5101/Sessions"
need_auth: true
results_entry: responses | $
results_entry: $.value
metadata_mapping:
id:
- null
Expand Down Expand Up @@ -989,13 +1011,13 @@ mps_session:
free_text_search_operations:
$filter:
union: " OR "
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- "SessionId in {SessionIds}"
- "SessionId in ({SessionIds})"
- "SessionId eq {SessionId}"
- "Satellite eq {platform}"
- "Satellite in {platforms}"
- "Satellite in ({platforms})"
- "PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}"
- "PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}"

Expand All @@ -1004,6 +1026,17 @@ mps_session:
next_page_url_tpl: "{url}?{search}&$top={items_per_page}&$expand=Files"
total_items_nb_key_path: "$.total"

sort:
sort_by_tpl: '&$orderby={sort_param} {sort_order}'
sort_param_mapping:
startTimeFromAscendingNode: DownlinkStart
completionTimeFromAscendingNode: DownlinkStop
publicationDate: PublicationDate
sort_order_mapping:
ascending: asc
descending: desc
max_sort_params: 1

download:
type: HTTPDownload
base_uri: "https://127.0.0.1:5101/Sessions"
Expand Down Expand Up @@ -1037,7 +1070,7 @@ mti_session:
type: ODataV4Search
api_endpoint: "http://127.0.0.1:5102/Sessions"
need_auth: true
results_entry: responses | $
results_entry: $.value
metadata_mapping:
id:
- null
Expand Down Expand Up @@ -1124,13 +1157,13 @@ mti_session:
free_text_search_operations:
$filter:
union: " OR "
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- "SessionId in {SessionIds}"
- "SessionId in ({SessionIds})"
- "SessionId eq {SessionId}"
- "Satellite eq {platform}"
- "Satellite in {platforms}"
- "Satellite in ({platforms})"
- "PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}"
- "PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}"

Expand All @@ -1139,6 +1172,17 @@ mti_session:
next_page_url_tpl: "{url}?{search}&$top={items_per_page}&$expand=Files"
total_items_nb_key_path: "$.total"

sort:
sort_by_tpl: '&$orderby={sort_param} {sort_order}'
sort_param_mapping:
startTimeFromAscendingNode: DownlinkStart
completionTimeFromAscendingNode: DownlinkStop
publicationDate: PublicationDate
sort_order_mapping:
ascending: asc
descending: desc
max_sort_params: 1

download:
type: HTTPDownload
base_uri: "https://127.0.0.1:5102/Sessions"
Expand Down Expand Up @@ -1172,7 +1216,7 @@ nsg_session:
type: ODataV4Search
api_endpoint: "http://127.0.0.1:5103/Sessions"
need_auth: true
results_entry: responses | $
results_entry: $.value
metadata_mapping:
id:
- null
Expand Down Expand Up @@ -1259,13 +1303,13 @@ nsg_session:
free_text_search_operations:
$filter:
union: " OR "
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- "SessionId in {SessionIds}"
- "SessionId in ({SessionIds})"
- "SessionId eq {SessionId}"
- "Satellite eq {platform}"
- "Satellite in {platforms}"
- "Satellite in ({platforms})"
- "PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}"
- "PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}"

Expand All @@ -1274,6 +1318,17 @@ nsg_session:
next_page_url_tpl: "{url}?{search}&$top={items_per_page}&$expand=Files"
total_items_nb_key_path: "$.total"

sort:
sort_by_tpl: '&$orderby={sort_param} {sort_order}'
sort_param_mapping:
startTimeFromAscendingNode: DownlinkStart
completionTimeFromAscendingNode: DownlinkStop
publicationDate: PublicationDate
sort_order_mapping:
ascending: asc
descending: desc
max_sort_params: 1

download:
type: HTTPDownload
base_uri: "https://127.0.0.1:5103/Sessions"
Expand Down Expand Up @@ -1307,7 +1362,7 @@ sgs_session:
type: ODataV4Search
api_endpoint: "http://127.0.0.1:5104/Sessions"
need_auth: true
results_entry: responses | $
results_entry: $.value
metadata_mapping:
id:
- null
Expand Down Expand Up @@ -1394,13 +1449,13 @@ sgs_session:
free_text_search_operations:
$filter:
union: " OR "
wrapper: '"{}"'
wrapper: '{}'
operations:
and:
- "SessionId in {SessionIds}"
- "SessionId in ({SessionIds})"
- "SessionId eq {SessionId}"
- "Satellite eq {platform}"
- "Satellite in {platforms}"
- "Satellite in ({platforms})"
- "PublicationDate gt {startTimeFromAscendingNode#to_iso_utc_datetime}"
- "PublicationDate lt {completionTimeFromAscendingNode#to_iso_utc_datetime}"

Expand All @@ -1409,6 +1464,17 @@ sgs_session:
next_page_url_tpl: "{url}?{search}&$top={items_per_page}&$expand=Files"
total_items_nb_key_path: "$.total"

sort:
sort_by_tpl: '&$orderby={sort_param} {sort_order}'
sort_param_mapping:
startTimeFromAscendingNode: DownlinkStart
completionTimeFromAscendingNode: DownlinkStop
publicationDate: PublicationDate
sort_order_mapping:
ascending: asc
descending: desc
max_sort_params: 1

download:
type: HTTPDownload
base_uri: "https://127.0.0.1:5104/Sessions"
Expand Down
Loading

0 comments on commit cbf930a

Please sign in to comment.