{
    "version":"0.2.0",
    "id":"bucket-cleaner-service",
    "title":"S3 Bucket Cleaner Service",
    "description":"Delete files older than a certain number of days from a S3 bucket",
    "jobControlOptions":[
        "sync-execute",
        "async-execute"
    ],
    "keywords":[
        "safer process"
    ],
    "inputs":{
        "token":{
            "title":"secret token",
            "description":"identify yourself",
            "schema":{
                "type":"string"
            }
        },
        "directories":{
            "title":"directories",
            "description":"List of directories to clean. If empty, all directories will be cleaned",
            "schema":{
                "type":"array",
                "items":{
                    "type":"string"
                }
            }
        },
        "thresh_date":{
            "title":"thresh_date",
            "description":"Delete files older than this date. Provide a date in the format YYYY-MM-DD",
            "schema":{
                "type":"string",
                "format":"date-time"
            }
        },
        "debug":{
            "title":"Debug",
            "description":"Enable Debug mode. Can be valued as true or false",
            "schema":{}
        }
    },
    "outputs":{
        "status":{
            "title":"status",
            "description":"Staus of the process execution [OK or KO]",
            "schema":{}
        },
        "removed_files":{
            "title":"removed_files",
            "description":"List of files removed from the bucket grouped by directory",
            "schema":{}
        }
    },
    "example":{
        "inputs":{
            "token":"ABC123XYZ666",
            "debug":true,
            "directories":[
                "ADRIAC/sea_level/",
                "ARPAE_realtime/",
                "ARPAE_realtime/B13011/"
            ],
            "thresh_date":"2025-05-01"
        }
    },
    "outputTransmission":[
        "value"
    ],
    "links":[
        {
            "type":"application/json",
            "rel":"self",
            "href":"http://pygeoapi-venezia-1562001364.eu-north-1.elb.amazonaws.com/processes/bucket-cleaner-service?f=json",
            "title":"Process description as JSON",
            "hreflang":"en-US"
        },
        {
            "type":"text/html",
            "rel":"alternate",
            "href":"http://pygeoapi-venezia-1562001364.eu-north-1.elb.amazonaws.com/processes/bucket-cleaner-service?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-venezia-1562001364.eu-north-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-venezia-1562001364.eu-north-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-venezia-1562001364.eu-north-1.elb.amazonaws.com/processes/bucket-cleaner-service/execution?f=json",
            "title":"Execution for this process as JSON",
            "hreflang":"en-US"
        }
    ]
}