# Error when using catalog API refresh

**URL:** https://community.dremio.com/t/error-when-using-catalog-api-refresh/8667
**Category:** Uncategorized
**Created:** [February 5, 2022, 11:35pm UTC](https://community.dremio.com/t/error-when-using-catalog-api-refresh/8667 "2022-02-05T23:35:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![nicor88](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@nicor88](https://community.dremio.com/u/nicor88)
#### Post date: [February 5, 2022, 11:35pm UTC](https://community.dremio.com/t/error-when-using-catalog-api-refresh/8667/1 "2022-02-05T23:35:35Z")

</div>

I’m planning to use the Catalog API refresh to update my reflections with a interval lower than 1h.

When trying to call the refresh API catalog with a specific id, using a post request on this endpoint:

`{base_url}/api/v3/catalog/{catalog_id}/refresh"`

I’m getting this error:

`{"errorMessage":"Something went wrong. Please check the log file for details, see https://docs.dremio.com/advanced-administration/log-files.html","moreInfo":"Can only refresh datasets but found [com.dremio.service.namespace.source.proto.SourceConfig]."}`

I can confirm that the id that I used is in the list of the ids that I got from `"{base_url}/api/v3/catalog"`.

Any idea on how to solve this?

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [February 8, 2022, 5:33am UTC](https://community.dremio.com/t/error-when-using-catalog-api-refresh/8667/2 "2022-02-08T05:33:08Z")

</div>

@nicor88 The catalog ID is the PDS ID and not the reflection ID

---

<div class="post-metadata">

### Author: ![nicor88](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@nicor88](https://community.dremio.com/u/nicor88)
#### Post date: [February 8, 2022, 7:51am UTC](https://community.dremio.com/t/error-when-using-catalog-api-refresh/8667/3 "2022-02-08T07:51:45Z")

</div>

As catalog\_id I’m using the ids of my Glue source that I get from the call to this URL  
`url = f"{base_url}/api/v3/catalog"`, isn’t that catalog id correct?  
I’m not using the reflection id for the call.

---

<div class="post-metadata">

### Author: ![doron](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/doron/32/294_2.png) [@doron](https://community.dremio.com/u/doron)
#### Post date: [February 8, 2022, 3:34pm UTC](https://community.dremio.com/t/error-when-using-catalog-api-refresh/8667/4 "2022-02-08T15:34:46Z")

</div>

@nicor88 The error claims you are passing in a SOURCE to the REFRESH api, but you can only refresh physical datasets.

---

<div class="post-metadata">

### Author: ![nicor88](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@nicor88](https://community.dremio.com/u/nicor88)
#### Post date: [February 8, 2022, 6:31pm UTC](https://community.dremio.com/t/error-when-using-catalog-api-refresh/8667/5 "2022-02-08T18:31:01Z")

</div>

@doron thanks, good point, I somehow missed that.

I finally managed to having working, I needed to make few API calls to get the id of the dataset to refresh, but in the end I got a 204.
