1

I'm automating some IBM Cloud workflows. One of the things I need to do is retrieve a list of resource groups via the REST API similar to bx resource groups. I can trace the REST call:

$ IBMCLOUD_TRACE=true bx resource groups
Retrieving all resource groups under account Chris Snow's Account as xxxxx...

REQUEST: [2018-09-26T06:05:52+01:00]
GET /v1/resource_groups?account_id=xxxxxx HTTP/1.1
Host: resource-manager.bluemix.net
Accept: application/json
Accept-Language: en-US
Accept-Language: en
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: IBM Cloud CLI 0.10.0 / darwin

Are different hosts used depending on region? If so, how can I determine which host to send the request to? I was hoping to find the api docs for this call at https://console.bluemix.net/apidocs but I couldn't see it.

Chris Snow
  • 23,813
  • 35
  • 144
  • 309

1 Answers1

1

The API documentation available at https://console.bluemix.net/apidocs/ is under construction and (it seems) more and more of the APIs are added. I expect that the Resource Controller API will be added soon.

Regarding the resource controller I checked the IP addresses for the following names and they all return the same base information:

  • resource-controller.bluemix.net
  • resource-manager.bluemix.net
  • resource-controller.ng.bluemix.net
  • resource-manager.ng.bluemix.net
  • resource-controller.eu-de.bluemix.net
  • resource-controller.eu-gb.bluemix.net

Because resource groups are a region-independent concept I would expect it does not matter which host name to use, it is the same database (maybe replicas). Thus, how about hardcoding resource-manager.bluemix.net for now?

data_henrik
  • 16,724
  • 2
  • 28
  • 49
  • When I use `https://resource-controller.ng.bluemix.net` the API call returns 404. I had to change it to `https://resource-manager.bluemix.net` for it to work :( – Chris Snow Sep 27 '18 at 05:13