Build logs via REST

My app needs to know two things

  1. the number of agents currently attached to the server
  2. the number of jobs currently in the backlog

I’ve read the APIs at but it doesn’t look like either of this information is available, even for a single repository.

Is it possible to get the information I need?

maybe does allow me to see things in a “pending” state or something? The only example is a success build.