# Issue with using branch\_name / commit\_oid in data\_models API endpoint

**URL:** <https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124>\
**Category:** Report Bugs\
**Created:** [October 2, 2024, 3:37pm UTC](https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124 "2024-10-02T15:37:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anya.conti](https://community.holistics.io/user_avatar/community.holistics.io/anya.conti/32/1743_2.png) [@anya.conti](https://community.holistics.io/u/anya.conti)\
**Post date:** [October 2, 2024, 3:37pm UTC](https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124/1 "2024-10-02T15:37:58Z")

</div>

Hello!

We’re working on setting up a CI/CD script to automatically validate SQL fields in Holistics. In order to do that, we’re relying on the [data\_models API endpoint](https://docs.holistics.io/api#tag/Data-Models/operation/DataModels_List). We’re almost there but are running into an issue. When we don’t specify the branch\_name or commit\_oid, then the API call works fine. But when we specify the branch\_name or commit\_oid, then we get the a 500 response with an error that says “InternalHolisticsError”. Would really appreciate some help on this! I’m giving an example of the debug info below for one call each with branch\_name and commit\_oid:

Example of the response and debug info when we specify branch\_name

```auto
{
    "type": "InternalHolisticsError",
    "message": "Something went wrong on our server. Debug info 20241002150915_wpo83"
}

```

Example of the response and debug info when we specify commit\_oid

```auto
{
    "type": "InternalHolisticsError",
    "message": "Something went wrong on our server. Debug info 20241002151058_4x0kxb"
}

```

Thanks in advance,  
Anya

---

<div class="post-metadata">

**Author:** ![Khanh\_Tran](https://community.holistics.io/letter_avatar_proxy/v4/letter/k/8baadc/32.png) [@Khanh\_Tran](https://community.holistics.io/u/Khanh_Tran)\
**Post date:** [October 3, 2024, 3:15am UTC](https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124/2 "2024-10-03T03:15:30Z")

</div>

Hi @anya.conti

Thank you for reporting this to us and apologize for any inconvenience this may have caused. We are investigating the issue and will get back to you soon.

Best Regards,

---

<div class="post-metadata">

**Author:** ![HuyVu](https://community.holistics.io/user_avatar/community.holistics.io/huyvu/32/373_2.png) [@HuyVu](https://community.holistics.io/u/HuyVu)\
**Post date:** [October 3, 2024, 7:53am UTC](https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124/3 "2024-10-03T07:53:11Z")

</div>

Hi @anya.conti,

I think the branch although exists in Github, but it’s not available in Holistics.

May I confirm that you created the branch outside Holistics and that you haven’t logged into Holistics and switched to that branch?

If that is the case, then let us see how to directly fetch that branch from Github to support this case.

Best,  
Huy Vu

---

<div class="post-metadata">

**Author:** ![anya.conti](https://community.holistics.io/user_avatar/community.holistics.io/anya.conti/32/1743_2.png) [@anya.conti](https://community.holistics.io/u/anya.conti)\
**Post date:** [October 3, 2024, 12:42pm UTC](https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124/4 "2024-10-03T12:42:05Z")

</div>

Hi Huy,

I just opened holistics and switched to the branch and ensured the commit is showing up there and am still running into the same issue.

I also made sure I don’t have any uncommitted changes in holistics before calling the API, so it means it’s not an issue where my user can’t switch branches because I have uncommitted changes.

I also tested on a branch that’s identical to production, so I don’t think it’s an AML compilation error or anything.

All the best,  
Anya

---

<div class="post-metadata">

**Author:** ![anya.conti](https://community.holistics.io/user_avatar/community.holistics.io/anya.conti/32/1743_2.png) [@anya.conti](https://community.holistics.io/u/anya.conti)\
**Post date:** [October 10, 2024, 4:03pm UTC](https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124/5 "2024-10-10T16:03:59Z")

</div>

Hi @Khanh_Tran and @HuyVu, just wanted to check in on updates for this. Any help I can provide if you’re having trouble tracking the issue down? We would LOVE to get the automated validation fully hooked up, and I believe that this is our last step. Thanks a bunch in advance!

---

<div class="post-metadata">

**Author:** ![Khanh\_Tran](https://community.holistics.io/letter_avatar_proxy/v4/letter/k/8baadc/32.png) [@Khanh\_Tran](https://community.holistics.io/u/Khanh_Tran)\
**Post date:** [October 11, 2024, 4:06am UTC](https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124/6 "2024-10-11T04:06:14Z")

</div>

Hi @anya.conti,

We realize that the `data_models` endpoint doesn’t work well with the Git workflow, so we’re currently working on an update to improve its integration. We fully understand how important it is for you to set up your validation flow. I’ll keep you posted on our progress. 😃

Best Regards,

---

<div class="post-metadata">

**Author:** ![Khanh\_Tran](https://community.holistics.io/letter_avatar_proxy/v4/letter/k/8baadc/32.png) [@Khanh\_Tran](https://community.holistics.io/u/Khanh_Tran)\
**Post date:** [October 28, 2024, 8:26am UTC](https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124/7 "2024-10-28T08:26:20Z")

</div>

Hi @anya.conti,

We’ve released a patch to update the `data_models` API endpoint. Please check it on your side to ensure everything works. If you’re using the `branch_name`, please prefix it with `origin/`, like `origin/master` or `origin/develop`.

Thanks for your patience during the API update! Let me know if it works.

Best Regards,

---

<div class="post-metadata">

**Author:** ![anya.conti](https://community.holistics.io/user_avatar/community.holistics.io/anya.conti/32/1743_2.png) [@anya.conti](https://community.holistics.io/u/anya.conti)\
**Post date:** [October 28, 2024, 12:59pm UTC](https://community.holistics.io/t/issue-with-using-branch-name-commit-oid-in-data-models-api-endpoint/2124/8 "2024-10-28T12:59:34Z")

</div>

Amazing, confirmed that this appears to work now, thank you so much!
