Chris Snow
Chris Snow

Reputation: 24588

how to view the cf rest api requests submitted from the bluemix web console?

Most of my experience with Bluemix so far has been using the web management console. I would now like to start using the cloud foundry rest API.

I've had a look through the cf rest API documentation for creating a service instance and see this:

{
  "space_guid": "bbbeed31-f908-477a-aab9-8cdcd19e1348",
  "name": "my-service-instance",
  "service_plan_guid": "fe173a83-df28-4891-8d91-46334e04600d",
  "parameters": {
    "the_service_broker": "wants this object"
  },
  "tags": [
    "accounting",
    "mongodb"
  ]
}

I have no idea what I need to set for the tags or parameters for a Bluemix service. How can I find this out on for each bluemix service?

When I instantiate a service using the Bluemix web console, is it possible to view the rest API requests that are submitted in the background so that I can reverse engineer the API calls??

Upvotes: 1

Views: 82

Answers (1)

DeejUK
DeejUK

Reputation: 13471

You won't be able to see the commands sent by the BlueMix console directly, but you could replicate the commands with the Cloud Foundry CLI and set an environment variable of CF_TRACE=true to output all requests to STDOUT. You can also set it as CF_TRACE=/path/to/file.

The UUIDs could be changed. If you're going to use the API, you'll need to look things up by name, find their UUIDs, and then use them in subsequent requests. I've been working on something similar, that really should have been implemented as a Terraform provider: https://github.com/EngineerBetter/cf-converger

Upvotes: 1

Related Questions