# Extract Travis type of used VM for each job with API

**URL:** https://travis-ci.community/t/extract-travis-type-of-used-vm-for-each-job-with-api/12365
**Category:** Travis CI Discussions & Feedback
**Created:** [November 9, 2021, 9:56am UTC](https://travis-ci.community/t/extract-travis-type-of-used-vm-for-each-job-with-api/12365 "2021-11-09T09:56:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Lasamar](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lasamar/32/7369_2.png) [@Lasamar](https://travis-ci.community/u/Lasamar)
#### Post date: [November 9, 2021, 9:56am UTC](https://travis-ci.community/t/extract-travis-type-of-used-vm-for-each-job-with-api/12365/1 "2021-11-09T09:56:19Z")

</div>

Hi everyone,

I need to extract how much time the organisation I’m part of is using for each kind of VMs on Travis.  
Ideally I want to be able to generate a report with: total time of MacOs build, total time of Ubuntu build, etc.  
I tried to use the Job API, as I expected that this kind of information should be somehow visible in the job detail, but I wasn’t able to find the kind of information I’m looking for anywhere.

A possible way to achieve it is to go repo by repo on Github, parse the .travis.yml to fetch the type of required vm and then do a cross checking with the information I can extract from Travis itself. But, aside from being a very slow solution, this is clearly a workaround.

Do you know if Travis offer any kind of solution for this?

---

<div class="post-metadata">

### Author: ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)
#### Post date: [November 9, 2021, 5:33pm UTC](https://travis-ci.community/t/extract-travis-type-of-used-vm-for-each-job-with-api/12365/2 "2021-11-09T17:33:21Z")

</div>

With API v2.1, you can get a build’s configuration: [Travis CI - API V2 Reference](https://docs.travis-ci.com/api/#builds)
