<p>You should be able to get the current job &amp; status for an agent via the rest api:</p>
<p><a href="https://learn.microsoft.com/en-us/rest/api/azure/devops/distributedtask/agents/list?view=azure-devops-rest-7.0" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/rest/api/azure/devops/distributedtask/agents/list?view=azure-devops-rest-7.0</a></p>
<p>You can find the pool id via the the URL from the UI or make a separate call to:
<a href="https://dev.azure.com/%7Borganization%7D/_apis/distributedtask/pools?api-version=7.0" rel="nofollow noreferrer">https://dev.azure.com/{organization}/_apis/distributedtask/pools?api-version=7.0</a></p>

CC BY-SA 4.0
2023-07-27T10:43:02.580Z
2023-07-27T10:43:02.580Z
ste-fu
<p>I have a bunch of on-prem agents and I want to create a report that lists the jobs per agent and their status.</p>
<p>There doesn't seem to be anything in the Pipeline Analytics Metadata that references the agent that the job was run on.</p>
<p>Is this data available anywhere else?</p>

<azure-devops><azure-pipelines>
Report on job status by agent in Azure Devops
melkisadek
# Report on job status by agent in Azure Devops

(Asked by: username_0 on 2023-07-13)

I have a bunch of on-prem agents and I want to create a report that lists the jobs per agent and their status.

There doesn't seem to be anything in the Pipeline Analytics Metadata that references the agent that the job was run on.

Is this data available anywhere else?

**Tags:** azure-devops, azure-pipelines


---

## 1 answers

### Answer by username_1 on 2023-07-27. Score: 0

You should be able to get the current job & status for an agent via the rest api:

<https://learn.microsoft.com/en-us/rest/api/azure/devops/distributedtask/agents/list?view=azure-devops-rest-7.0>

You can find the pool id via the the URL from the UI or make a separate call to:
[https://dev.azure.com/{organization}/\_apis/distributedtask/pools?api-version=7.0](https://dev.azure.com/%7Borganization%7D/_apis/distributedtask/pools?api-version=7.0)


---

