{
    "version":"0.2.0",
    "id":"icon2i-ingestor-process",
    "title":"ICON-2I Ingestor Process",
    "description":"Collect data from ICON-2I",
    "jobControlOptions":[
        "sync-execute",
        "async-execute"
    ],
    "keywords":[
        "safer process"
    ],
    "inputs":{
        "token":{
            "title":"secret token",
            "description":"identify yourself",
            "schema":{
                "type":"string"
            }
        },
        "variable":{
            "title":"Variable",
            "description":"The variable to retrieve. Possible values are \"precipitation\" or \"water_level\".",
            "schema":{
                "type":"string",
                "enum":[
                    "precipitation",
                    "water_level"
                ]
            }
        },
        "forecast_run":{
            "title":"Forecast run",
            "description":"ICON-2I forecast runs (optional). If not provided, all the available forecast runs from current date will be considered. The forecast run must be a valid ISO format date string at hour 00:00:00 or 12:00:00 related to at least two days ago",
            "schema":{
                "type":"iso-string or list of iso-string",
                "format":"YYYY-MM-DDTHH:MM:SS or [YYYY-MM-DDTHH:MM:SS, YYYY-MM-DDTHH:MM:SS, ...]"
            }
        },
        "out_dir":{
            "title":"Output directory",
            "description":"The output directory where the data will be stored. If not provided, the data will not be stored in a local directory.",
            "schema":{
                "type":"string"
            }
        },
        "bucket_destination":{
            "title":"Bucket destination",
            "description":"The bucket destination where the data will be stored. If not provided, the data will not be stored in a bucket. If neither out nor bucket_destination are provided, the output will be returned as a feature collection.",
            "schema":{
                "type":"string"
            }
        },
        "debug":{
            "title":"Debug",
            "description":"Enable Debug mode",
            "schema":{}
        }
    },
    "outputs":{
        "status":{
            "title":"status",
            "description":"Staus of the process execution [OK or KO]",
            "schema":{
                "type":"string",
                "enum":[
                    "OK",
                    "KO"
                ]
            }
        },
        "collected_data":{
            "title":"Collected data",
            "description":"Reference to the collected data. Each entry contains the date and the S3 URI of the collected data",
            "type":"array",
            "schema":{
                "type":"object",
                "properties":{
                    "date":{
                        "type":"string"
                    },
                    "S3_uri":{
                        "type":"string"
                    }
                }
            }
        }
    },
    "example":{
        "inputs":{
            "debug":true,
            "variable":"total_precipitation",
            "lat_range":[
                44,
                44.5
            ],
            "long_range":[
                12.2,
                12.8
            ],
            "time_range":[
                "2025-09-18T00:00:00",
                "2025-09-18T08:00:00"
            ],
            "bucket_destination":"s3://saferplaces.co/SaferCastAPI/test/ICON2I"
        }
    },
    "outputTransmission":[
        "value"
    ],
    "links":[
        {
            "type":"application/json",
            "rel":"self",
            "href":"http://pygeoapi-directed-lb-1795156461.us-east-1.elb.amazonaws.com/processes/icon2i-ingestor-process?f=json",
            "title":"Process description as JSON",
            "hreflang":"en-US"
        },
        {
            "type":"text/html",
            "rel":"alternate",
            "href":"http://pygeoapi-directed-lb-1795156461.us-east-1.elb.amazonaws.com/processes/icon2i-ingestor-process?f=html",
            "title":"Process description as HTML",
            "hreflang":"en-US"
        },
        {
            "type":"text/html",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/job-list",
            "href":"http://pygeoapi-directed-lb-1795156461.us-east-1.elb.amazonaws.com/jobs?f=html",
            "title":"Jobs list as HTML",
            "hreflang":"en-US"
        },
        {
            "type":"application/json",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/job-list",
            "href":"http://pygeoapi-directed-lb-1795156461.us-east-1.elb.amazonaws.com/jobs?f=json",
            "title":"Jobs list as JSON",
            "hreflang":"en-US"
        },
        {
            "type":"application/json",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/execute",
            "href":"http://pygeoapi-directed-lb-1795156461.us-east-1.elb.amazonaws.com/processes/icon2i-ingestor-process/execution?f=json",
            "title":"Execution for this process as JSON",
            "hreflang":"en-US"
        }
    ]
}