Workflow statistics

Description of the feature request

Create an API endpoint that would allow to gather statistics about a workflow over a period of time :

  • Failure / Success rate
  • Reason of failure (incriminated step)
  • Number of builds ran
  • Mean duration
  • You name it…

Use case / for what or how I would use it

Monitoring the health of a workflow :

  • Is it efficient ? (and is it getting better or worse ?)
  • Is it useful ?
  • Main reason of failure ?

Thanks for the #feature-request here too, @egirot! Quite a lot of votes in under a few minutes :slight_smile: