Open yumaoka opened 8 years ago
format for gp-config.json
-
{
"credentials": { … }
}
Perhaps mention that cf csk
and related could be used from the command line to work with credentials.
cf csk mygp mykey
cf service-key mygp mykey | tail +2 > creds.json
also the credentials url should end in /rest
per https://github.com/IBM-Bluemix/gp-js-client/issues/33
Bluemix console "Credentials" tab for a service shows -
{
"url": "https://gp-rest.ng.bluemix.net/translate/rest",
"userId": "2ba50aeb88e61a371c9906e569a950f3",
"password": "3UTlbuS/igbWn1MshQ66GEn4LNMIMDw2",
"instanceId": "49c520f1208e6c27388e9ac4ec0358ec"
}
Connections - view credentials in App page shows -
{
"gp-test": [
{
"credentials": {
"url": "https://gp-rest.ng.bluemix.net/translate/rest",
"userId": "c5bd4c4a6c578f9c835fa57b7981915d",
"password": "ImhQN0xKIGZCaRDpA/b3QLY62akqzKjz",
"instanceId": "1581368afcb8e40c0b10f889f3a32662"
},
"syslog_drain_url": null,
"label": "gp-test",
"provider": null,
"plan": "standard",
"name": "yoshito-gp-test",
"tags": [
"dev_ops",
"ibm_created",
"ibm_dedicated_public",
"ibm_release"
]
}
]
}
My preference is to use the first one as the primary format when credentials are provided in a JSON format for client SDK and tools.
GP SDKs and tools should support common configuration file (JSON file which store credentials and options) and/or environment variables. We should have a page explaining these configuration file/variables in this repository, so GP SDKs/tools can link to the page.