ibm-cloudcloud-storageibm-cloud-storageibm-cloud-applaunch

Where do you find the Config info for IBM Cloud Storage API for Javascript


Going through the tutorial for the Cloud Storage Api Javascript API (https://console.bluemix.net/docs/services/cloud-object-storage/libraries/node.html#node-js) and it ask your to fill out the config file

var config = {
    endpoint: '<endpoint>',
    apiKeyId: '<api-key>',
    ibmAuthEndpoint: 'https://iam.ng.bluemix.net/oidc/token',
    serviceInstanceId: '<resource-instance-id>',
};

I think apiKeyId is found in the certification

"cloud-object-storage": [
{
  "credentials": {
    "apikey": "**HERE**",
    "endpoints": "",
    "iam_apikey_description": "",
    "iam_apikey_name": "",
    "iam_role_crn": "",
    "iam_serviceid_crn": "",
    "resource_instance_id": ""
  },
  "syslog_drain_url": null,
  "volume_mounts": [],
  "label": "cloud-object-storage",
  "provider": null,
  "plan": "Lite",
  "name": "Cloud Object Storage-bn",
  "tags": [
    "Lite",
    "storage",
    "ibm_release",
    "ibm_created",
    "rc_compatible"
  ]
}
]

I think endpoint is found at

https://console.bluemix.net/services/cloud-object-storage/

Under EndPoints an example would be (s3-api.us-geo.objectstorage.softlayer.net)

I have no idea where serviceInstanceId is found in the IBM Cloud.


Solution

  • I believe you can retrieve the resource_instance_id you need using the following Cloud CLI commands:

    bx resource service-instances -r global

    bx resource service-instance "SERVICE NAME FROM PREVIOUS COMMAND" -r all --id