# Code Complexity for a specify commit in a specific branch with API

**URL:** <https://community.codecov.com/t/code-complexity-for-a-specify-commit-in-a-specific-branch-with-api/3700>\
**Category:** Support\
**Created:** [June 7, 2022, 7:11am UTC](https://community.codecov.com/t/code-complexity-for-a-specify-commit-in-a-specific-branch-with-api/3700 "2022-06-07T07:11:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ErnestFistozz](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ernestfistozz/32/2426_2.png) [@ErnestFistozz](https://community.codecov.com/u/ErnestFistozz)\
**Post date:** [June 7, 2022, 7:11am UTC](https://community.codecov.com/t/code-complexity-for-a-specify-commit-in-a-specific-branch-with-api/3700/1 "2022-06-07T07:11:36Z")

</div>

I am trying to retrieve the code complexity for a specific commit in my master branch. Went through the documentation but there’s not much about the API to retrieve code complexity. Seems the only thing available is in the `diff` property/key returned during an API call. However, that is comparing two commits.

---

<div class="post-metadata">

**Author:** ![ErnestFistozz](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ernestfistozz/32/2426_2.png) [@ErnestFistozz](https://community.codecov.com/u/ErnestFistozz)\
**Post date:** [June 9, 2022, 11:01am UTC](https://community.codecov.com/t/code-complexity-for-a-specify-commit-in-a-specific-branch-with-api/3700/2 "2022-06-09T11:01:15Z")

</div>

Hi @tom , do you have any thoughts on this?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [June 27, 2022, 6:33pm UTC](https://community.codecov.com/t/code-complexity-for-a-specify-commit-in-a-specific-branch-with-api/3700/3 "2022-06-27T18:33:58Z")

</div>

@ErnestFistozz as far as I’m aware, there is not yet a way to get the `code complexity` of a commit via the API. I’ll let the product team know!

---

<div class="post-metadata">

**Author:** ![ErnestFistozz](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ernestfistozz/32/2426_2.png) [@ErnestFistozz](https://community.codecov.com/u/ErnestFistozz)\
**Post date:** [June 28, 2022, 6:02pm UTC](https://community.codecov.com/t/code-complexity-for-a-specify-commit-in-a-specific-branch-with-api/3700/4 "2022-06-28T18:02:03Z")

</div>

Hi @tom Is there an API to get the `code complexity` though, doesn’t necessarily have to be for a specific commit. maybe complexity for the overall project.

Asking because the UI does have a graph indicating complexity over time. together with coverage overtime.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [July 26, 2022, 9:19pm UTC](https://community.codecov.com/t/code-complexity-for-a-specify-commit-in-a-specific-branch-with-api/3700/5 "2022-07-26T21:19:54Z")

</div>

@ErnestFistozz sorry for the delay here. Unfortunately, there is not an API to do this. We are looking to revamp our API, so our product team is aware of this.
