code sample needed for the below mentioned scenarios

Hi all,
I would request your help in getting the api for the below mentioned scenarios.
I had seen the documentation.
But those are really not clear. appreciate your help in this connection.

  1. get the list of process and their process variables
  2. get the list of failed tasks along with the root cause for the failure
  3. get the list of connectors and their request params and response

Thanks
DD