# Adding a new catalog without the UI

**URL:** <https://forums.suse.com/t/adding-a-new-catalog-without-the-ui/6813>\
**Category:** Rancher 1.x\
**Created:** [July 6, 2017, 3:37pm UTC](https://forums.suse.com/t/adding-a-new-catalog-without-the-ui/6813 "2017-07-06T15:37:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andra](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@andra](https://forums.suse.com/u/andra)\
**Post date:** [July 6, 2017, 3:37pm UTC](https://forums.suse.com/t/adding-a-new-catalog-without-the-ui/6813/1 "2017-07-06T15:37:20Z")

</div>

Hello,

I am trying to add a new catalog, via Rancher-cli, but I can’t seem to fond a way to do it.  
I was able to add new catalogs via the UI, by specifying the git url and branch, but still struggle to do it via cli.

Could you please give me some hints as to how I could achieve this?

Thanks for suggestions,

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [July 9, 2017, 12:11am UTC](https://forums.suse.com/t/adding-a-new-catalog-without-the-ui/6813/2 "2017-07-09T00:11:30Z")

</div>

There is no support for this in the CLI. You can use the API though, global or per-environment?

---

<div class="post-metadata">

**Author:** ![andra](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@andra](https://forums.suse.com/u/andra)\
**Post date:** [July 10, 2017, 12:42pm UTC](https://forums.suse.com/t/adding-a-new-catalog-without-the-ui/6813/3 "2017-07-10T12:42:35Z")

</div>

Hi @vincent

Thank you for your response.  
I followed your advise in using the API, and found this discussion, here, on the forum: _[Use API to add custom catalog](http://forums.suse.com/t/use-api-to-add-custom-catalog/2324)_

I managed to add new catalogs, via PUT method, with curl, like :

curl -u “admin:script”   
-X PUT   
-H ‘Accept: application/json’   
-H ‘Content-Type: application/json’   
-d ‘{“activeValue”:“library=https://git.rancher.io/rancher-catalog.git, community=https://git.rancher.io/community-catalog.git”,“name”:“catalog.url”,“source”:“Default Environment Variables”,“value”:“library=https://git.rancher.io/rancher-catalog.git, community=https://git.rancher.io/community-catalog.git, xx=https://newurl”}’   
‘[http://localhost:8080/v1/settings/catalog.url](http://localhost:8080/v1/settings/catalog.url)’

This seems to be adding the xx catalog correctly. I don’t know, however, what the _“id”:“1as!catalog.url”_ in the [discussion](http://forums.suse.com/t/use-api-to-add-custom-catalog/2324) mentioned above is. Is this necessary?

Thanks again,

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [July 10, 2017, 6:29pm UTC](https://forums.suse.com/t/adding-a-new-catalog-without-the-ui/6813/4 "2017-07-10T18:29:39Z")

</div>

No, you only need to read and update `/v1/settings/catalog.url`. What’s returned is actually a slightly different `activeSetting` resource, but the difference is not relevant to you (or anyone really, we’re going to hide them for 2.0)
