Destroy pipeline meeting the custom criteria

I am looking for Concourse APIs to destroy the pipelines meeting certain criteria. E.g. the pipelines that have not run in the past 6 months, that haven’t had a successful run in the past 6 months etc.
To accomplish that goal, I need the APIs to get the pipelines’ metadata.
curl -H "Authorization: Bearer $token" http://<concourse-server>/api/v1/pipelines doesn’t give enough information to meet the requirements.
Any ideas would be appreciated!

I don’t know if its possible to retrieve the information you want. The REST API is not documented (and hasn’t been for a while) so the only way to figure out what it does is to run fly commands with the --verbose flag or to reference the source code. A good starting point for the former is routes.go.